Z Zise Developers 简体中文

Batch query VP onboarding progress for multiple members

POST /v1/remit/vp/applications/query scope: remittances:read
Merchant account

Query VP onboarding status for multiple members under the same merchant in one request.

Request Body

FieldTypeRequiredDescription
members string[] Required Array of merchant member identifiers; supports mixed external_member_id and mem_<uuid> inputs.

Response

200Batch results. Each item maps positionally to the corresponding request item.
{
  "items": [
    {
      "query": "vp-a",
      "member_id": "mem_7a3b7e6d-1111-2222-3333-444444444444",
      "external_member_id": "vp-a",
      "application": {
        "id": "vpa_12",
        "status": "reviewing",
        "reviewed_at": "",
        "created_at": "2026-08-13T20:00:00.000Z"
      },
      "stage": "reviewing"
    },
    {
      "query": "missing-member",
      "error": "member_not_found",
      "application": null
    }
  ]
}
400invalid_request: members is missing, empty, exceeds 100 items, or contains empty strings.
403insufficient_scope: missing remittances:read

Additional Details

Why this is a new endpoint instead of extending the old GET

The existing GET /v1/remit/vp/applications contract is "x-on-behalf-of binds exactly one member". This batch endpoint switches to a body payload containing a list of member identifiers, avoiding multi-value semantics in the single-member middleware and audit trail.

Two member identifier formats are supported

Each item in members[] may be:

  • your own external_member_id
  • the public mem_<uuid> we returned earlier

Response order matches request order

So callers can fill results back into their own batch jobs by index directly, the response keeps the same order as members[].

One missing member does not fail the whole batch

If one member does not exist or does not belong to the current merchant, only that item returns error: "member_not_found"; the overall batch still returns 200.

Request
curl -X POST 'https://api.zinfra.vip/v1/remit/vp/applications/query' \
  -H 'x-auth-token: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{
    "members": [
      "vp-a",
      "mem_7a3b7e6d-1111-2222-3333-444444444444",
      "missing-member"
    ]
  }'
const res = await fetch("https://api.zinfra.vip/v1/remit/vp/applications/query", {
  method: "POST",
  headers: {
    "x-auth-token": "Bearer $TOKEN",
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "members": [
      "vp-a",
      "mem_7a3b7e6d-1111-2222-3333-444444444444",
      "missing-member"
    ]
  }),
});
// Keep monetary amounts as strings, never numbers.
const data = await res.json();
import requests

res = requests.post(
    "https://api.zinfra.vip/v1/remit/vp/applications/query",
    headers={
        "x-auth-token": "Bearer $TOKEN",
        "content-type": "application/json",
    },
    json={
      "members": [
        "vp-a",
        "mem_7a3b7e6d-1111-2222-3333-444444444444",
        "missing-member"
      ]
    },
)
# Use Decimal(str(...)) for amounts, not float.
data = res.json()
req, _ := http.NewRequest("POST", "https://api.zinfra.vip/v1/remit/vp/applications/query",
    strings.NewReader(`{
  "members": [
    "vp-a",
    "mem_7a3b7e6d-1111-2222-3333-444444444444",
    "missing-member"
  ]
}`))
req.Header.Set("x-auth-token", "Bearer $TOKEN")
req.Header.Set("content-type", "application/json")
res, err := http.DefaultClient.Do(req)
// Decode amount fields as string, not float64.
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://api.zinfra.vip/v1/remit/vp/applications/query"))
    .header("x-auth-token", "Bearer $TOKEN")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("""
{
  "members": [
    "vp-a",
    "mem_7a3b7e6d-1111-2222-3333-444444444444",
    "missing-member"
  ]
}
"""))
    .build();
// Use String / BigDecimal for amounts, not double.
$ch = curl_init('https://api.zinfra.vip/v1/remit/vp/applications/query');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'x-auth-token: Bearer $TOKEN',
    'content-type: application/json',
  ],
  CURLOPT_POSTFIELDS => <<<'JSON'
{
  "members": [
    "vp-a",
    "mem_7a3b7e6d-1111-2222-3333-444444444444",
    "missing-member"
  ]
}
JSON,
]);
$res = curl_exec($ch);
// Use bcmath / strings for amounts, not floatval.
200
{
  "items": [
    {
      "query": "vp-a",
      "member_id": "mem_7a3b7e6d-1111-2222-3333-444444444444",
      "external_member_id": "vp-a",
      "application": {
        "id": "vpa_12",
        "status": "reviewing",
        "reviewed_at": "",
        "created_at": "2026-08-13T20:00:00.000Z"
      },
      "stage": "reviewing"
    },
    {
      "query": "missing-member",
      "error": "member_not_found",
      "application": null
    }
  ]
}