本产品主要用于用户的三要素核验。
API 方式
Base URL
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 类型 | 必须 | 印尼-枚举值: KTP |
phone_number | String | 手机号 / 电话号码 | 必须 | 08开头10到13位,样例:081234567890 |
name | String | 姓名 | 必须 | |
country | String | 国家 | 必须 | 国家,必填. 两位国家码,符合 ISO 3166 标准。目前支持:印尼(ID) |
请求示例
{
"country":"ID",
"phone_number":"081234567890",
"id_type":"KTP",
"id_number":"3310225629467",
"name":"Joe"
}
响应参数
字段 | 类型 | 含义 | 建议 | 备注 |
---|---|---|---|---|
code | Integer | API 状态码 | 必须 | |
message | String | 状态信息 | 必须 | 在 API 异常状态下会输出具体的异常原因 |
sequence_id | String | 响应唯一码 | 必须 | 用于跟踪每次请求记录的唯一标识 |
result | String | 核验结果 | 必须 | 枚举值: 通过:pass(姓名、手机号和身份证都对应上) 不通过:fail 无纪录:no record |
reason | String | 核验原因 | 条件必须,当result=fail/ no record的时候 | 当result=fail的时候: 1. The NIK does not match with the phone number(nik不匹配手机号) 2. The NIK does not match with the name(nik不匹配姓名) 3. The NIK does not match with both name and phone number(nik不匹配姓名和手机号) 当result=no record 的时候: 1. No record for the ID number (库无NIK) 2. No record for the phone number (库无手机号) |
API状态码
code | Message | 含义 | 是否收费 |
---|---|---|---|
200 | success | 成功 | 是 |
301 | Service not purchased | 服务未购买 | 否 |
302 | Service has been suspend | 服务已被禁⽤ | 否 |
303 | Not enough balance | 流量不足 | 否 |
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 | {参数}错误 | 否 |
响应示例
- 业务成功示例
{
"code": 200,
"message": "success",
"sequence_id": "1648777165770866F82AC7F326307055",
"result": "pass"
}
- 业务失败示例
{
"code":11340,
"sequence_id":"170427842997****I3167369D6187177",
"message":"phone_number error"
}