API and webhooks
TheBooking exposes a versioned REST API for reading and mutating booking data and outbound webhooks for receiving plugin events.
Base URL
https://example.com/wp-json/thebooking/v1/API/
Only routes in the public /API/ namespace are supported for external clients. WordPress administration routes under /backend/ are internal implementation details.
Start here
- Create a scoped token under Settings > API & Webhooks.
- Verify authentication.
- Read the integration workflows and the guide of each resource: availability, services, providers, customers, and reservations.
- Browse the API reference for routes, parameters, request examples, and response examples.
- Add signed webhooks when the external system needs event-driven updates.
The machine-readable contract remains available as OpenAPI 3.1 YAML.
API reference sections
Response envelope
Successful responses include status: "OK". List operations and auth/verify/ return their result in response; creation operations return the new id; edit and remove operations return only the status.
Errors of TheBooking have this shape. A missing or invalid token, or a missing scope, returns the standard WordPress REST error instead, with code, message, and data.status.
{
"status": "KO",
"message": "Human-readable error"
}
Authentication failures are WordPress REST errors with HTTP 401; insufficient scope returns 403.