Skip to main content

Update supported provider restrictions

POST /providers/edit/

What It Does

Update provider restrictions supported by the public API, such as service access.

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: object

FieldRequiredTypeDescription
idYesinteger or stringResource identifier used by TheBooking.
allowedServicesNoarray of stringService IDs the provider is allowed to handle.
restrictServicesNobooleanWhether the provider is limited to the listed services.

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/providers/edit/" \
-H "Authorization: Bearer $TBK_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": 123,
"allowedServices": [
"string"
],
"restrictServices": true
}'

JSON Body

{
"id": 123,
"allowedServices": [
"string"
],
"restrictServices": true
}

Success Response Example

{
"status": "OK"
}