REST API

Overview

The plugin provides an extended REST API for programmatic access to booking data.
The API supports advanced filtering and returns all booking statuses with flexible date range filtering.

Base URL:
/wp-json/baza-booking-calendar/v1/

The REST API for external integrations is available only in the plans that have the row REST API in the plans table. It is not in the Free plan. Without it a request returns an error with HTTP status 403 and the code plan_upgrade_required. This applies to guests too. Administrators and managers always get the data. The same applies to /disabled-time/.

Response without the plan:

{
  "code": "plan_upgrade_required",
  "message": "This feature is not available on your current plan. Please upgrade your plan to use the REST API.",
  "data": { "status": 403 }
}

Endpoints

Get All Booked Slots with Filters

Request:
GET /wp-json/baza-booking-calendar/v1/slots/

Query Parameters:

  • status (string, optional): Filter by booking status. Supports a single status or multiple comma-separated values.
  • start (string, optional): Filter by start date. Supported formats: DD.MM.YYYY, DD/MM/YYYY, YYYY-MM-DD.
  • end (string, optional): Filter by end date. Same formats as for start.
  • filter_by (string, optional): Filter type: booking_date (default) or created_date.
  • flat (boolean, optional): Return booked_slots as a flat array of bookings instead of grouped by service ID. Useful for integrations like Zapier that expect a plain list of records.
  • check_notifications (boolean, optional): Add new booking notifications to the response. Works only for administrators and managers, for others the parameter is ignored.
  • last_check (integer, optional): Time of the last notification check as a JavaScript timestamp (milliseconds). Used together with check_notifications.
  • ending_soon_minutes (integer, optional): Also return the bookings whose slot ends within this number of minutes (0 turns it off). Used together with check_notifications, same access.

Flat response for integrations:
/wp-json/baza-booking-calendar/v1/slots/?flat=1

Available Statuses

  • pending: Awaiting confirmation
  • booked: Confirmed booking
  • reject: Rejected booking
  • completed: Completed booking
  • expired: Expired booking
  • partially_booked: Partly paid booking

Request Examples

All bookings:
/wp-json/baza-booking-calendar/v1/slots/

Only active bookings:
/wp-json/baza-booking-calendar/v1/slots/?status=pending,booked

Completed and rejected bookings for June 2025:
/wp-json/baza-booking-calendar/v1/slots/?status=completed,reject&start=01.06.2025&end=30.06.2025

All bookings within a specific date range:
/wp-json/baza-booking-calendar/v1/slots/?start=01/06/2025&end=30/06/2025

Get Booked Slots for a Specific Service

Request:
GET /wp-json/baza-booking-calendar/v1/slots/?service={slug}
GET /wp-json/baza-booking-calendar/v1/slots/?service={ID}

Parameters:

  • service (string, required): Service slug or ID (e.g., massage-therapy, yoga-class, or ID).
  • status (string, optional): Same as above.
  • start (string, optional): Start date.
  • end (string, optional): End date.

You can also put the service into the path: GET /wp-json/baza-booking-calendar/v1/slots/{service}. Here {service} is the service slug or ID. The other parameters (status, start, end, filter_by) are the same.

Request Examples

All bookings for the massage service:
/wp-json/baza-booking-calendar/v1/slots/?service=massage-therapy
/wp-json/baza-booking-calendar/v1/slots/?service={ID}

Active bookings for the massage service:
/wp-json/baza-booking-calendar/v1/slots/?service=massage-therapy&status=pending,booked

Common Use Cases

Get Disabled Times (Non-working Hours, Days Off)

Request:
GET /wp-json/baza-booking-calendar/v1/disabled-time/

Parameters:

  • service (string, optional): Service slug or ID (e.g., studio-1 or ID).
  • start (string, optional): Start date.
  • end (string, optional): End date.

Request Examples

All disabled slots for the next 3 months:
/wp-json/baza-booking-calendar/v1/disabled-time/

For a specific service:
/wp-json/baza-booking-calendar/v1/disabled-time/?service=studio-1
/wp-json/baza-booking-calendar/v1/disabled-time/?service={ID}

For a specific date range:
/wp-json/baza-booking-calendar/v1/disabled-time/?start=01.12.2025&end=31.12.2025

Check Whether Bookings Changed

A light request for scripts and the public calendar. It returns a number that changes whenever a booking, a service or an additional service is created, changed or deleted. Ask for the full list of slots only when the number has changed. The answer is cached for 10 seconds.

Request:
GET /wp-json/baza-booking-calendar/v1/slots-revision

Response example:

{ "revision": "1762771234.5678" }
Last Modified: 16.11.2026