Skip to content

Edit customer

PUT
/v1/client/{id}
curl --request PUT \
--url https://api-admin.billz.ai/v1/client/123 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01' \
--data '{ "date_of_birth": "2022-05-14", "first_name": "John", "gender": 1, "last_name": "Doe", "phone_number": [ "+998000000000" ] }'

Replaces the customer’s data entirely: a field missing from the body is cleared. Send all of the customer’s fields, including those that do not change.

phone_number replaces the list of phone numbers rather than adding to it. Numbers are stored as sent — use the international format with +.

The "success" response does not confirm that the customer was found: for a nonexistent id the response is the same.

Error codes: 400 — input validation error; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.

id
required
string

Taken from the path; the value from the body is ignored

Example
123
platform-id
string
default: 7d4a4c38-dd84-4902-b744-0488b80a4c01

Platform identifier. A static value is used for integrations.

Media typeapplication/json
object
phone_number

All of the customer’s phone numbers; they replace the current list

Array<string>
first_name

Name

string
last_name

Last name

string
gender

Gender as a number

integer format: int32
date_of_birth

Date of birth

string
chat_id

Telegram chat_id

string
Example
{
"date_of_birth": "2022-05-14",
"first_name": "John",
"gender": 1,
"last_name": "Doe",
"phone_number": [
"+998000000000"
]
}

Successful response

Media typeapplication/json

String "success"

string
Example
success