Z Zise Developers

通过参数提交 L1 或 L2 补件

POST /v1/kyc/supplements/{id} scope: kyc:write
代会员调用 · 必带 x-on-behalf-of 需 x-idempotency-key

按模板 index 提交答案。text 最多 500 字符,photo 为本人经 /v1/kyc/files 上传的 file_url。工单有效期为创建后 14 天。JSON 最大 128 KiB。成功后进入补件复审。

路径参数

字段类型必填说明
id string 必填
字段类型必填说明
x-on-behalf-of string 必填
x-idempotency-key string 必填

请求体

字段类型必填说明
answers object[] 必填
answers.index integer 必填 模板中的 index,不得重复
answers.value string 必填 文本或已上传的 file_url

响应

200工单与申请原子更新,等待复审
{
  "id": "ksup_456",
  "level": "L2",
  "status": "submitted"
}
400invalid_fields / invalid_request / state_invalid
403insufficient_scope
404not_found / member_not_found
409idempotency_key_reused / idempotency_in_progress
请求
curl -X POST 'https://api.zinfra.vip/v1/kyc/supplements/{id}' \
  -H 'x-auth-token: Bearer $TOKEN' \
  -H 'x-on-behalf-of: $MEMBER_ID' \
  -H 'x-idempotency-key: $IDEMPOTENCY_KEY' \
  -H 'content-type: application/json' \
  -d '{
    "answers": []
  }'
const res = await fetch("https://api.zinfra.vip/v1/kyc/supplements/{id}", {
  method: "POST",
  headers: {
    "x-auth-token": "Bearer $TOKEN",
    "x-on-behalf-of": "$MEMBER_ID",
    "x-idempotency-key": "$IDEMPOTENCY_KEY",
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "answers": []
  }),
});
// 金额按字符串读,别让它变成 number
const data = await res.json();
import requests

res = requests.post(
    "https://api.zinfra.vip/v1/kyc/supplements/{id}",
    headers={
        "x-auth-token": "Bearer $TOKEN",
        "x-on-behalf-of": "$MEMBER_ID",
        "x-idempotency-key": "$IDEMPOTENCY_KEY",
        "content-type": "application/json",
    },
    json={
      "answers": []
    },
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()
req, _ := http.NewRequest("POST", "https://api.zinfra.vip/v1/kyc/supplements/{id}",
    strings.NewReader(`{
  "answers": []
}`))
req.Header.Set("x-auth-token", "Bearer $TOKEN")
req.Header.Set("x-on-behalf-of", "$MEMBER_ID")
req.Header.Set("x-idempotency-key", "$IDEMPOTENCY_KEY")
req.Header.Set("content-type", "application/json")
res, err := http.DefaultClient.Do(req)
// 金额字段用 string 接,不要 float64
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://api.zinfra.vip/v1/kyc/supplements/{id}"))
    .header("x-auth-token", "Bearer $TOKEN")
    .header("x-on-behalf-of", "$MEMBER_ID")
    .header("x-idempotency-key", "$IDEMPOTENCY_KEY")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("""
{
  "answers": []
}
"""))
    .build();
// 金额字段用 String / BigDecimal,不要 double
$ch = curl_init('https://api.zinfra.vip/v1/kyc/supplements/{id}');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'x-auth-token: Bearer $TOKEN',
    'x-on-behalf-of: $MEMBER_ID',
    'x-idempotency-key: $IDEMPOTENCY_KEY',
    'content-type: application/json',
  ],
  CURLOPT_POSTFIELDS => <<<'JSON'
{
  "answers": []
}
JSON,
]);
$res = curl_exec($ch);
// 金额用 bcmath / 字符串,不要 floatval
200
{
  "id": "ksup_456",
  "level": "L2",
  "status": "submitted"
}