Z Zise Developers 简体中文

Suspend a member at merchant level (does not affect that person under other merchants)

POST /v1/members/{id}/suspend scope: members:write
Merchant account Requires x-idempotency-key

Writes only the merchant-level status. Platform bans and blocklists are separate and are neither visible nor editable by you. These are independent controls, not two values of the same field.

Suspension blocks x-on-behalf-of calls: calls on behalf of a suspended member return member_not_found, identical to a nonexistent member. Consequently, any in-progress flow you hold for that member starts receiving 404 after suspension; this is expected.

⚠ The body is tested for equality to false: {"suspended": false} restores the member. Everything else suspends them, including no body, invalid JSON, the string in {"suspended": "false"}, and {}. Passing the string "false" suspends the member without an error.

Restoration and suspension emit the same member.suspended event, with status indicating the direction. A separate member.unsuspended event would require reading two event streams to determine whether the member can currently operate.

Path Parameters

FieldTypeRequiredDescription
id string Required external_member_id or mem_<uuid>.
FieldTypeRequiredDescription
x-idempotency-key string Required UUID v4

Request Body

FieldTypeRequiredDescription
suspended boolean Optional Only the boolean literal false restores the member. Any other value, including omission and the string "false", suspends them.

Response

200Written. status is the resulting value: suspended / normal.
{
  "id": "mem_9f1c0c8e-6f2a-4c1d-9d0b-2a7e5b3f8c41",
  "status": "suspended"
}
404member_not_found, including members belonging to another merchant.
409idempotency_key_reused · idempotency_in_progress

Emitted Events

Green = successful terminal state · Red = terminal state requiring action · Purple = intermediate state. Open an event for its payload and signature verification details.

Request
curl -X POST 'https://api.zinfra.vip/v1/members/{id}/suspend' \
  -H 'x-auth-token: Bearer $TOKEN' \
  -H 'x-idempotency-key: $IDEMPOTENCY_KEY' \
  -H 'content-type: application/json' \
  -d '{
    "suspended": false
  }'
const res = await fetch("https://api.zinfra.vip/v1/members/{id}/suspend", {
  method: "POST",
  headers: {
    "x-auth-token": "Bearer $TOKEN",
    "x-idempotency-key": "$IDEMPOTENCY_KEY",
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "suspended": false
  }),
});
// Keep monetary amounts as strings, never numbers.
const data = await res.json();
import requests

res = requests.post(
    "https://api.zinfra.vip/v1/members/{id}/suspend",
    headers={
        "x-auth-token": "Bearer $TOKEN",
        "x-idempotency-key": "$IDEMPOTENCY_KEY",
        "content-type": "application/json",
    },
    json={
      "suspended": false
    },
)
# Use Decimal(str(...)) for amounts, not float.
data = res.json()
req, _ := http.NewRequest("POST", "https://api.zinfra.vip/v1/members/{id}/suspend",
    strings.NewReader(`{
  "suspended": false
}`))
req.Header.Set("x-auth-token", "Bearer $TOKEN")
req.Header.Set("x-idempotency-key", "$IDEMPOTENCY_KEY")
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/members/{id}/suspend"))
    .header("x-auth-token", "Bearer $TOKEN")
    .header("x-idempotency-key", "$IDEMPOTENCY_KEY")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("""
{
  "suspended": false
}
"""))
    .build();
// Use String / BigDecimal for amounts, not double.
$ch = curl_init('https://api.zinfra.vip/v1/members/{id}/suspend');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'x-auth-token: Bearer $TOKEN',
    'x-idempotency-key: $IDEMPOTENCY_KEY',
    'content-type: application/json',
  ],
  CURLOPT_POSTFIELDS => <<<'JSON'
{
  "suspended": false
}
JSON,
]);
$res = curl_exec($ch);
// Use bcmath / strings for amounts, not floatval.
200
{
  "id": "mem_9f1c0c8e-6f2a-4c1d-9d0b-2a7e5b3f8c41",
  "status": "suspended"
}