跳转到内容

组合检测API:一次调用核验多个服务

对一个手机号或邮箱同时核验多个服务。在 dashboard → 组合检测 页面自选任意数量的服务,之后只需调用一个端点——所有检测并行执行,一次响应返回全部结果。

按标识符类型分为两个端点:

端点标识符
POST /v1/check/combo/phoneE.164 手机号
POST /v1/check/combo/email邮箱地址

代码示例(使用 dashboard 上保存的组合,无需传服务列表):

curl --location 'https://api.ekycpro.com/v1/check/combo/phone' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"identifier": "+6281234567890"}'

也可以按请求覆盖已保存的组合:

curl --location 'https://api.ekycpro.com/v1/check/combo/phone' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"identifier": "+6281234567890", "service_types": ["ws", "telegram", "vk"]}'

响应示例

{
"success": true,
"transactionId": "cmb_9f2e8a7b6c5d",
"pricingStrategy": "PAY",
"data": {
"id": "cmb_9f2e8a7b6c5d",
"identifier": "+6281234567890",
"results": {
"ws": {"registered": true, "billed": true, "cost": 5000, "cost_usd": 0.005},
"telegram": {"registered": false, "billed": true, "cost": 5000, "cost_usd": 0.005},
"vk": {"registered": null, "billed": false, "cost": 0, "cost_usd": 0, "error": "NOT_FOUND"}
},
"billed_count": 2,
"total_cost": 10000,
"total_cost_usd": 0.01
}
}

HTTP 请求

POST https://api.ekycpro.com/v1/check/combo/phone

POST https://api.ekycpro.com/v1/check/combo/email

请求头

Header值
X-API-Key你的 API Key
Content-Typeapplication/json

请求体

字段类型必填说明
identifierstring是E.164 手机号(phone 端点)或邮箱地址(email 端点)
service_typesstring[]否请求级覆盖;省略时使用 dashboard 上保存的组合。所有项必须与端点类型兼容

响应字段

字段类型说明
data.idstring组合检测 ID(cmb_ 前缀)
data.resultsobject按 service_type 为键,每个服务一个节点
data.results.*.registeredbool / null注册结果;该服务无法判定时为 null
data.results.*.billedbool该服务是否计费
data.results.*.cost_usdnumber该服务实际扣费(美元)
data.results.*.errorstring仅没有结果时出现:NOT_FOUND(未查询到——上游异常、超时或库里无记录,不计费)或 insufficient balance
data.billed_countint计费服务数
data.total_cost_usdnumber本次调用合计扣费(美元)

服务专有字段(business、avatar、avatar_url)与单次检测 API 一致,合并进对应节点。

时限与部分结果

所选服务全部并行执行,调用约 10 秒内返回。到期未完成或上游异常的服务返回 error: "NOT_FOUND" 且 registered: null、不计费——已完成的服务在同一响应中照常返回。建议客户端超时设为 15 秒以上。返回 NOT_FOUND 的服务可用 POST /v1/check 单独重查。

计费

计费规则与单次检测 API 完全一致,按服务逐项结算:只有得到确定结果的服务才计费,按各服务常规单价(你的专属价照常生效)。响应逐项列出各服务费用及 total_cost_usd。执行前会按组合总价预检余额,不足时整单拒绝并返回 402。

状态码

状态码说明
200请求成功(单个服务失败不影响整体)
400identifier 非法、service_types 不支持/类型不符、或未配置组合
401API Key 无效
402余额不足以覆盖组合总价