Skip to content

REST API Overview โ€‹

The FluentBooking REST API allows you to interact with the scheduling system programmatically. It follows standard RESTful principles and is designed to be intuitive for developers familiar with the WordPress REST API.

Base URL โ€‹

All API requests should be made to the following base URL:

bash
https://yoursite.com/wp-json/fluent-booking/v2/

TIP

Always ensure you are using the v2 namespace for the most up-to-date features and stable schema.

Key Features โ€‹

๐Ÿ” Secure Authentication โ€‹

All REST API endpoints require authentication. We recommend using Basic Authentication (with Application Passwords) for development and server-to-server integrations.

๐Ÿ“ฆ JSON Format โ€‹

The API accepts and returns data in JSON format. Ensure you include the Content-Type: application/json header in your POST and PUT requests.

๐Ÿ› ๏ธ Standard HTTP Verbs โ€‹

We use standard HTTP methods to map actions to resources:

  • GET: Retrieve data (calendars, bookings, events).
  • POST: Create new records.
  • PUT / PATCH: Update existing records.
  • DELETE: Remove records.

Common Architecture โ€‹

Resource Enveloping โ€‹

Responses are generally returned as JSON objects. Collections of items are usually returned within a data key, often accompanied by meta-information like pagination.

json
{
  "data": [
    { "id": 1, "title": "Discovery Call" },
    { "id": 2, "title": "Monthly Sync" }
  ],
  "total": 24,
  "per_page": 10,
  "current_page": 1
}

Global Query Parameters โ€‹

Most GET endpoints support standardized query parameters for filtering and organizing data:

  • search: Search for resources by name or email.
  • status: Filter by record status (e.g., scheduled, cancelled).
  • per_page: Control the number of results per request.
  • page: Specify the page number for paginated results.
  • sort_by: Field name to sort the results.
  • sort_type: Direction of sorting (asc or desc).

Error Handling โ€‹

The API uses standard HTTP status codes to indicate success or failure:

  • 200 OK: Request was successful.
  • 201 Created: Resource was successfully created.
  • 400 Bad Request: Validation error or missing parameters.
  • 401 Unauthorized: Authentication failed or missing.
  • 403 Forbidden: Insufficient permissions to access the resource.
  • 404 Not Found: Resource does not exist.

Next Steps โ€‹

  1. Review the Authentication Guide to set up your first request.
  2. Explore Calendars API to manage your scheduling hosts.
  3. Learn how to Manage Bookings via the API.