Retrieve available slots for a service booking

GET https://api.zenoti.com/v1/bookings/{booking_id}/slots

This API helps you to retrieve available slots for the specified service booking (booking_id) on a given day. If no slots are available on that day, the API returns the next available slot on any other future day of the current week.

You can also use this API to retrieve available slots for the required group service booking (booking_id).

You can choose a specific therapist or a therapist based on a certain gender while creating a service booking; after which, a unique 32-digit booking_id is generated.

You must then specify the generated booking_id as an input parameter in the API request body to retrieve available slots for the service booking.

Before you begin

Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.

Endpoint

GET /v1/bookings/{booking_id}/slots

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Path parameters

Parameter Type Required Description
booking_id string Yes booking id

Query parameters

Parameter Type Required Default Description
check_future_day_availability boolean No false Optional If it is passed as true, this parameter verifies whether any remaining day of the current week is available to be booked for the service. The default value of this parameter is false.

Response

Success (200 OK)

{
  "slots": [
    {
      "...": "..."
    }
  ],
  "future_days": [
    {
      "...": "..."
    }
  ],
  "Error": {}
}

Response fields

Field Type Description
slots object[]
slots[].Time string
slots[].Warnings object
slots[].Priority integer
slots[].Available boolean
slots[].SalePrice object
future_days object[]
future_days[].Day string
future_days[].IsAvailable boolean
Error object

Example

curl --request GET \
  --url 'https://api.zenoti.com/v1/bookings/{booking_id}/slots' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/bookings/{booking_id}/slots', {
  method: 'GET',
  headers: {
    'Authorization': 'bearer {{access_token}}'
  },
});
const data = await response.json();
import requests

response = requests.get(
    'https://api.zenoti.com/v1/bookings/{booking_id}/slots',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var response = await client.GetAsync(
    "https://api.zenoti.com/v1/bookings/{booking_id}/slots");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/bookings/{booking_id}/slots')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
response = http.request(request)
data = JSON.parse(response.body)

Error codes

Status Description
400 400
401 Unauthorized -- invalid or expired access token
429 Too many requests -- rate limit exceeded