{
  "openapi": "3.0.3",
  "info": {
    "title": "实人认证",
    "description": "【人脸身份比对、人证合一、刷脸认证、人脸认证、人像对比、真人认证】输入被校验人姓名、身份证号码和一张人脸照片，与公安库身份证头像进行权威比对，返回比对分值。 直连官方，数据稳定可靠，实时查询。广泛应用于银行、保险及各种身份核查场景。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/2668-4": {
      "x-pointCode": 4,
      "x-mode": "mapping",
      "x-read-timeout": 30,
      "x-connect-timeout": 30,
      "post": {
        "summary": "身份证二要素人像比对",
        "description": "照片字段注意说明：\n支持 jpg、jpeg、bmp、png 格式\n照片为生活照，图片大小范围在0-30KB以内\n照片像素不宜太低\n照片请勿反光、污损、模糊或梯度变形\n照片请勿强曝光、逆光。背光等\n照片请勿出现人脸遮挡（头饰、头发等），勿带口罩、墨镜",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "birthday": {
                              "type": "string",
                              "description": "生日"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "0为成功，计费，其余为失败，不计费"
                            },
                            "sex": {
                              "type": "string",
                              "description": "性别：M为男性，F为女性"
                            },
                            "order": {
                              "type": "string",
                              "description": "相关流水号"
                            },
                            "county": {
                              "type": "string",
                              "description": "区县"
                            },
                            "address": {
                              "type": "string",
                              "description": "详细地址"
                            },
                            "province": {
                              "type": "string",
                              "description": "省"
                            },
                            "code": {
                              "type": "number",
                              "description": "验证标示\n0：匹配\n1：不匹配\n2：无此身份证号码\n3：身份证号与姓名匹配，照片比对失败\n4：参数不能为空\n5：四要素匹配成功，照片比对失败\n6：四要素匹配失败，照片比对成功\n7: 四要素匹配成功，照片异常\n8：身份证号与姓名匹配，照片不能确定是否为同一人\n9：身份证号与姓名匹配，库中无照片\n10：身份证号与姓名匹配，照片检测失败\n12：身份证号码不合法\n13: 照片质量异常\n14: 姓名异常\n15: 暂不支持该地域校验\n100：渠道异常，请稍后再试\n101：验证信息重复输入，避免恶意验证请间隔60秒以上再次核验\n103：24小时内相同姓名或卡号核验次数超限\n104：decrypt参数异常\n202：姓名加密信息有误，请检查\n203：身份证加密信息有误，请检查\n205：开始时间加密信息有误，请检查\n206：结束时间加密信息有误，请检查\n207：人像照片加密信息有误，请检查"
                            },
                            "msg": {
                              "type": "string",
                              "description": "说明"
                            },
                            "city": {
                              "type": "string",
                              "description": "城市"
                            },
                            "score": {
                              "type": "number",
                              "description": "置信度"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2668_4_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "姓名，测试时注意不要填错，填错一样扣减使用次数"
                  },
                  "idcard": {
                    "type": "string",
                    "description": "身份证号，测试时注意不要填错，填错一样扣减使用次数"
                  },
                  "photo": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 100001,
                    "description": "BASE64人像图片"
                  }
                },
                "required": [
                  "name",
                  "idcard",
                  "photo"
                ]
              }
            }
          }
        }
      }
    },
    "/2668-2": {
      "x-pointCode": 2,
      "x-mode": "mapping",
      "x-read-timeout": 30,
      "x-connect-timeout": 30,
      "post": {
        "summary": "身份证四要素",
        "description": "输入身份证姓名、身份证号码、有效期开始时间和有效期结束时间来核验身份信息是否匹配？以及输出地址、出生日期和性别等信息。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "birthday": {
                              "type": "string",
                              "description": "生日"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "0为成功，计费，其余为失败，不计费"
                            },
                            "sex": {
                              "type": "string",
                              "description": "性别：M为男性，F为女性"
                            },
                            "order": {
                              "type": "string",
                              "description": "相关流水号"
                            },
                            "county": {
                              "type": "string",
                              "description": "区县"
                            },
                            "address": {
                              "type": "string",
                              "description": "详细地址"
                            },
                            "province": {
                              "type": "string",
                              "description": "省"
                            },
                            "code": {
                              "type": "number",
                              "description": "验证标示\n0：匹配\n1：不匹配\n2：无此身份证号码\n3：身份证号与姓名匹配，照片比对失败\n4：参数不能为空\n5：四要素匹配，照片不匹配\n6：四要素不匹配，照片匹配\n7:  四要素匹配，照片异常\n8：身份证号与姓名匹配，照片不能确定是否为同一人\n9：身份证号与姓名匹配，库中无照片\n10：身份证号与姓名匹配，照片检测失败\n12：身份证号码不合法\n13: 照片质量异常\n14: 姓名异常\n15: 暂不支持该地域校验\n100：渠道异常，请稍后再试\n101：验证信息重复输入，避免恶意验证请间隔60秒以上再次核验\n103：24小时内相同姓名或卡号核验次数超限\n104：decrypt参数异常\n202：姓名加密信息有误，请检查\n203：身份证加密信息有误，请检查\n205：开始时间加密信息有误，请检查\n206：结束时间加密信息有误，请检查\n207：人像照片加密信息有误，请检查"
                            },
                            "msg": {
                              "type": "string",
                              "description": "说明"
                            },
                            "city": {
                              "type": "string",
                              "description": "城市"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2668_2_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "姓名，测试时注意不要填错，填错一样扣减使用次数"
                  },
                  "idcard": {
                    "type": "string",
                    "description": "身份证号，测试时注意不要填错，填错一样扣减使用次数"
                  },
                  "start": {
                    "type": "string",
                    "description": "有效期开始时间 格式 yyyyMMdd"
                  },
                  "end": {
                    "type": "string",
                    "description": "有效期结束时间 格式 yyyyMMdd \n(长期有效身份证填 00000000)"
                  }
                },
                "required": [
                  "name",
                  "idcard",
                  "start",
                  "end"
                ]
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AppKeyAuth": {
        "type": "apiKey",
        "in": "query",
        "name": "appKey",
        "description": "从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp"
      }
    },
    "schemas": {
      "ShowapiResEnvelope": {
        "type": "object",
        "description": "ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）",
        "properties": {
          "showapi_res_code": {
            "type": "integer",
            "description": "API 返回的状态码"
          },
          "showapi_res_error": {
            "type": "string",
            "description": "API 返回的错误信息"
          },
          "showapi_res_id": {
            "type": "string",
            "description": "API 请求的唯一标识"
          },
          "showapi_fee_num": {
            "type": "integer",
            "description": "API 调用计费次数"
          }
        }
      }
    }
  },
  "security": [
    {
      "AppKeyAuth": []
    }
  ],
  "externalDocs": {
    "url": "https://www.showapi.com/apiGateway/view/2668?tab=book"
  },
  "x-apiCode": "2668",
  "x-is-own": false,
  "x-is-op": false
}