Skip to main content

Update a customer

POST /customers/edit/

What It Does

Update the supported customer profile fields without touching reservation history.

Authentication

Requires an API token with the write scope. Send it as a bearer token or with the configured API key header.

Parameters

This endpoint does not define query or path parameters.

Request Body

Content type: application/json

Required: Yes

Schema: CustomerEdit

FieldRequiredTypeDescription
idYesstringResource identifier used by TheBooking.
nameNostringDisplay name shown in the administration panel and booking flows.
emailNostring (email)Customer or provider email address.
phoneNostringCustomer phone number.
wpUserIdNointegerLinked WordPress user ID.
statusNointegerCurrent reservation status.
timezoneNostring or nullIANA timezone for customer-facing date and time handling.

Responses

StatusMeaningDescriptionBody
200SuccessOperation completedOkEnvelope
400Invalid requestInvalid request or application rule failureErrorEnvelope
401Authentication requiredMissing or invalid API tokenWpRestError
403ForbiddenToken lacks write scope or the operation is forbiddenWpRestError or ErrorEnvelope
404Not foundResource not foundErrorEnvelope

Request Example

curl -X POST "https://example.com/wp-json/thebooking/v1/API/customers/edit/" \
-H "Authorization: Bearer $TBK_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "resource_123",
"name": "Example name",
"email": "customer@example.com",
"phone": "+1 555 0100",
"wpUserId": 123,
"status": 1,
"timezone": "Europe/Rome"
}'

JSON Body

{
"id": "resource_123",
"name": "Example name",
"email": "customer@example.com",
"phone": "+1 555 0100",
"wpUserId": 123,
"status": 1,
"timezone": "Europe/Rome"
}

Success Response Example

{
"status": "OK"
}