Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
GET

Get available slots for a location

Scope: crm:booking-services.read https://api.alladdin.com/api/v2/booking-locations/{locationId}/slots

Returns available time slots for a specific service at a location on a given day. The response also includes the booking form fields (under form) that must be collected from the user before calling Create a booking.

Parameters

Path parameters

locationId string required

Location ID (24-char hex ObjectId)

Query parameters

service_id string required

Service identifier

day string<date> required

Date in YYYY-MM-DD format

Request

python
import requests

url = "https://api.alladdin.com/api/v2/booking-locations/{locationId}/slots?service_id=value&day=2024-01-15"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Responses

Response

json
{
  "items": [
    {
      "from": "2024-01-15T10:30:00+01:00",
      "to": "2024-01-15T11:30:00+01:00",
      "duration": 3600
    }
  ],
  "form": [
    {
      "key": "name",
      "label": "Name",
      "type": "text",
      "required": true
    }
  ]
}

Success responses

200 List of available slots application/json object items[] object[] from string<date-time>

Slot start in ISO 8601 format with timezone offset. Pass this value directly as date_time when creating a booking.

to string<date-time>

Slot end in ISO 8601 format with timezone offset

duration integer

Slot duration in seconds

form[] object[]

Booking form fields that must be collected from the user and passed as custom_fields when creating the booking.

key string

Field key to use in custom_fields

label string

Human-readable field label

type string

Field type

Enum: text number date email select radio checkbox required boolean

Whether the field is required

Error responses

400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Location not found application/json 429 Rate limit exceeded application/json

← PreviousGet a booking by ID →

Next →Cancel a booking →