Skip to main content

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

  1. Create a scoped token under Settings > API & Webhooks.
  2. Verify authentication.
  3. Read the integration workflows.
  4. Browse the API reference for routes, parameters, request examples, and response examples.
  5. 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 and verification operations usually place their result in response; creation operations return the new id.

Application errors generally include:

{
"status": "KO",
"message": "Human-readable error"
}

Authentication failures are WordPress REST errors with HTTP 401; insufficient scope returns 403.