身份证验真是用于验证用户身份证信息相关的真实性。
API 方式
Base URL
- 新加坡节点:https://sg.apitd.net/verification/kyc/idverify/v1
- 墨西哥节点:https://mx.apitd.net/verification/kyc/idverify/v1
API
URL | 请求方式 | Content-Type | 输出格式 | 字符集 |
---|---|---|---|---|
api-base-url?partner_code=xxx&partner_key=xxx | POST | application/json | JSON | UTF-8 |
认证参数
字段 | 类型 | 含义 | 建议 | 备注 |
---|---|---|---|---|
partner_code | String | 合作方标识 | 必须 | 由 TD 分配 |
partner_key | String | 合作方密钥 | 必须 | 由 TD 分配 |
请求参数
字段 | 类型 | 含义 | 建议 | 备注 |
---|---|---|---|---|
id_number | String | 身份证件 ID 号码 | 必须 | ID number |
id_type | String | 身份证件 ID 类型 | 必须 | ID 类型枚举值: 国民身份证:national_id |
country | String | 国家 | 必须 | 国家,必填. 两位国家码,符合 ISO 3166 标准。目前支持:墨西哥(MX) |
响应参数
字段 | 类型 | 含义 | 建议 | 备注 |
---|---|---|---|---|
code | Integer | API 状态码 | 必须 | |
message | String | 状态信息 | 必须 | 在 API 异常状态下会输出具体的异常原因 |
sequence_id | String | 响应唯一码 | 必须 | 用于跟踪每次请求记录的唯一标识 |
result | String | 结果 | 必须 | 枚举值: 成功:success 失败:fail |
id_info | JSONObject | ID信息 | 条件必须 | code=200,返回该字段. |
-
Id_info数据结构
字段 字段类型 描述 curp String CURP(身份证号) nombre String 名 apellido_paterno String 姓 apellido_materno String 母亲的姓氏 sexo String 性别 fecha_nacimiento String 出生日期,格式为 DD/MM/YYYY
pais_nacimiento String 出生国家 estado_nacimiento String 出生州 datos_doc_probatorio Object 检验信息 estatus_curp String CURP的状态, Active or Not Active
datos_doc_probatorio
数据结构
datos_doc_probatorio
数据结构字段 | 字段类型 | 描述 |
---|---|---|
entidad_registro | String | 注册的实体机构 |
clave_municipio_registro | String | 市政府登记码 |
anio_reg | String | 注册年份 |
clave_entidad_registro | String | 注册实体机构的代码 |
API 状态码
Code | Message | 描述 | 是否收费 |
---|---|---|---|
200 | success | 调⽤成功 | 是 |
301 | Service not purchased | 未购买此服务 | 否 |
302 | Traffic blocked | 流量已被禁用 | 否 |
303 | Traffic insufficient | 流量不足 | 否 |
304 | Service expired | 服务已过期 | 否 |
305 | Daily maximum volume reached | 日流量已封顶 | 否 |
600 | Service Temporarily Unavailable | 限流错误 | 否 |
11350 | Internal error | 系统错误 | 否 |
11301 | {parameter} empty | {参数}为空 | 否 |
11304 | The country partner located is not open | 国家不支持 | 否 |
11340 | {parameter} error | {参数}错误 | 否 |
12701 | CURP not exist | curp不存在于库中 | 是 |
12008 | Service unavailable, please retry later | 服务暂不可用,请重试 | 否 |
响应示例
-
入参示例:
{ "country": "MX", "id_type": "national_id", "id_number": "xxxxxxxxxx" }
-
业务请求成功
{
"result": "success",
"code": 200,
"sequence_id": "53b63090c0374cad82f26a5aa4f8991e",
"message": "success",
"id_info": {
"datos_doc_probatorio": {
"clave_entidad_registro": "09",
"entidad_registro": "DISTRITO FEDERAL",
"municipio_registro": "",
"clave_municipio_registro": "010",
"anio_reg": "1978"
},
"fecha_nacimiento": "22/08/1978",
"estatus_curp": "Active",
"nombre": "ARTURO",
"apellido_paterno": "MARRUENDA",
"apellido_materno": "HUESCA",
"estado_nacimiento": "DISTRITO FEDERAL",
"pais_nacimiento": "MEXICO",
"sexo": "HOMBRE",
"curp": "MAHA78****HDFRSR07"
}
}
-
业务请求不成功
{ "result": "fail", "code": 11301, "sequence_id": "69b57131b6fb********61ccba118b60", "message": "Country error" }