{
  "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": "照片字段说明：支持jpg、jpeg、bmp、png格式，需为生活照，大小在0-30KB之间，像素不宜过低。避免反光、污损、模糊、变形、强曝光、逆光、背光，以及人脸遮挡（如头饰、头发、口罩、墨镜）。",
        "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"
                ]
              }
            }
          }
        }
      }
    }
  },
  "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/apis/2668?tab=book"
  },
  "x-apiCode": "2668",
  "x-is-own": false,
  "x-is-op": false
}