Client Custom Fields

Update Client Custom Field Values

Writes custom field values of one client. Only the submitted fields are touched: fields left out of the payload keep their current value, and a submitted `null` clears one. Each value is validated against its field definition (type, options, length/range and regex), but the `required` flag is not enforced — it is a client-facing onboarding rule, so a caller may fill only the fields it knows. Archived fields are rejected: their collected values stay readable, but they take no new ones. Answers with the client's values, as `/api/v2/custom-fields/values` reports them.

PATCH
/api/v2/clients/{clientId}/custom-fields/values

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

clientId*integer

Client Id

Header Parameters

accept-language?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v2/clients/1/custom-fields/values" \  -H "accept-language: ja" \  -H "Content-Type: application/json" \  -d '{    "customFields": [      {        "fieldId": "0191f3c2-2d9a-7b1e-9a3c-6f4b8c1d2e3f",        "value": "7001015009087"      }    ]  }'
{  "clientId": 42,  "customFields": [    {      "fieldId": "0191f3c2-2d9a-7b1e-9a3c-6f4b8c1d2e3f",      "name": "tax_number",      "label": "Tax number",      "type": "text",      "value": "string",      "isArchived": false    }  ]}
{  "error": {    "message": "Bad Request",    "code": 0,    "details": [      {        "issue": "The selected value is invalid.",        "field": "parameter"      }    ]  }}
{  "error": {    "message": "Unauthorized"  }}
{  "error": {    "message": "Forbidden"  }}
{  "error": {    "message": "Not Found"  }}
{  "error": {    "message": "Too Many Requests"  }}
{  "error": {    "message": "Service Unavailable"  }}