Remove a reservation allowed by the route policy
POST /reservations/remove/
What It Does
Remove a pending reservation, or one that has already ended. To stop an upcoming appointment, set its status to cancelled instead, so that the record and its history remain.
Authentication
Requires an API token with the write scope. Send it as a bearer token or with the configured API key header.
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
id | query | Yes | string | Resource identifier used by TheBooking. |
Request Body
This endpoint does not require a JSON request body.
Responses
| Status | Meaning | Description | Body |
|---|---|---|---|
200 | Success | Operation completed | OkEnvelope |
401 | Authentication required | Missing or invalid API token | WpRestError |
403 | Forbidden | Token lacks write scope or the operation is forbidden | WpRestError or ErrorEnvelope |
404 | Not found | Resource not found | ErrorEnvelope |
Request Example
curl -X POST "https://example.com/wp-json/thebooking/v1/API/reservations/remove/?id=123" \
-H "Authorization: Bearer $TBK_API_TOKEN"
Success Response Example
{
"status": "OK"
}