Skip to main content

Remove a service without reservations

POST /services/remove/

What It Does

Remove a service only when the route policy allows it and no protected reservation history blocks the operation.

Authentication

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

Parameters

NameLocationRequiredTypeDescription
idqueryYesstringResource identifier used by TheBooking.

Request Body

This endpoint does not require a JSON request body.

Responses

StatusMeaningDescriptionBody
200SuccessOperation completedOkEnvelope
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/services/remove/?id=123" \
-H "Authorization: Bearer $TBK_API_TOKEN"

Success Response Example

{
"status": "OK"
}