Z Zise Developers 简体中文

Update a payee nickname / favorite flag: only these two fields are editable

PATCH /v1/remit/payees/{id} scope: remittances:write
On behalf of a member · x-on-behalf-of required

The payee entity—bank, account, and holder name—is shared platform-wide, with a key derived from their fingerprint. Changing the account means a different payee. Editing in place would affect every associated member and the recipient snapshots of completed orders.

Bank details are therefore not editable: create another payee to change them. Only the private nickname and favorite flag on the association can be edited.

Present “Edit payee” as “Rename”; do not display a form users cannot actually edit.

Both fields are optional: nickname alone changes only the name; favorite alone changes only the favorite flag. Omitting both returns 400, since that likely indicates misspelled keys; a silent 200 would falsely imply success.

An empty nickname clears it; the maximum is 64 characters. favorite affects ordering in GET /v1/remit/payees, placing favorites first.

Path Parameters

FieldTypeRequiredDescription
id string Required Payee ID, accepted with or without the pye_ prefix.
FieldTypeRequiredDescription
x-on-behalf-of string Required

Request Body

Request body fields have not been declared in the specification for this operation.

Response

200Updated
{
  "id": "pye_1043",
  "nickname": "房东",
  "favorite": true
}
400invalid_fields: no editable field supplied
404not_found: payee nonexistent, not associated with this member, or already unlinked. All three produce the same response.
Request
curl -X PATCH 'https://api.zinfra.vip/v1/remit/payees/{id}' \
  -H 'x-auth-token: Bearer $TOKEN' \
  -H 'x-on-behalf-of: $MEMBER_ID' \
  -H 'content-type: application/json' \
  -d '{
    "nickname": "房东",
    "favorite": true
  }'
const res = await fetch("https://api.zinfra.vip/v1/remit/payees/{id}", {
  method: "PATCH",
  headers: {
    "x-auth-token": "Bearer $TOKEN",
    "x-on-behalf-of": "$MEMBER_ID",
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "nickname": "房东",
    "favorite": true
  }),
});
// Keep monetary amounts as strings, never numbers.
const data = await res.json();
import requests

res = requests.patch(
    "https://api.zinfra.vip/v1/remit/payees/{id}",
    headers={
        "x-auth-token": "Bearer $TOKEN",
        "x-on-behalf-of": "$MEMBER_ID",
        "content-type": "application/json",
    },
    json={
      "nickname": "房东",
      "favorite": true
    },
)
# Use Decimal(str(...)) for amounts, not float.
data = res.json()
req, _ := http.NewRequest("PATCH", "https://api.zinfra.vip/v1/remit/payees/{id}",
    strings.NewReader(`{
  "nickname": "房东",
  "favorite": true
}`))
req.Header.Set("x-auth-token", "Bearer $TOKEN")
req.Header.Set("x-on-behalf-of", "$MEMBER_ID")
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/payees/{id}"))
    .header("x-auth-token", "Bearer $TOKEN")
    .header("x-on-behalf-of", "$MEMBER_ID")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("""
{
  "nickname": "房东",
  "favorite": true
}
"""))
    .build();
// Use String / BigDecimal for amounts, not double.
$ch = curl_init('https://api.zinfra.vip/v1/remit/payees/{id}');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'PATCH',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'x-auth-token: Bearer $TOKEN',
    'x-on-behalf-of: $MEMBER_ID',
    'content-type: application/json',
  ],
  CURLOPT_POSTFIELDS => <<<'JSON'
{
  "nickname": "房东",
  "favorite": true
}
JSON,
]);
$res = curl_exec($ch);
// Use bcmath / strings for amounts, not floatval.
200
{
  "id": "pye_1043",
  "nickname": "房东",
  "favorite": true
}