Alladdin

Work in progress

Site en construction

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

Alladdin
POST

Create a booking

Scope: crm:booking-services.write https://api.alladdin.com/api/v2/bookings

Workflow: Always call GET /api/v2/booking-locations/{locationId}/slots first to retrieve available time slots. Use the exact from value of a slot as date_time. Collect any fields from the form array before calling this endpoint.
Creates a new booking for a specific service at a location. Requires a valid location, service, date/time, timezone and language.

Request body

object location_id string required

Location identifier

service_id string required

Service identifier

date_time string<date-time> required

Booking start time as ISO 8601 datetime. Use the exact from value returned by the slots endpoint (e.g. 2024-01-15T10:30:00+01:00). The timezone offset must match the slot timezone — do not convert to UTC.

language string required

ISO 639-1 language code

custom_fields[] object[] optional

Custom field values

key string

Custom field key

value string | null

Custom field value

Request

python
import requests

url = "https://api.alladdin.com/api/v2/bookings"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "location_id": "507f1f77bcf86cd799439011",
    "service_id": "507f1f77bcf86cd799439012",
    "date_time": "2024-01-15T10:30:00+01:00",
    "language": "es",
    "custom_fields": [
        {
            "key": "string",
            "value": "string"
        }
    ]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Responses

Response

json
{
  "id": "507f1f77bcf86cd799439011"
}

Success responses

201 Booking created application/json object id string

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 409 Conflict application/json object type string title string status integer detail string 422 Validation error application/json 429 Rate limit exceeded application/json

Next →Update a booking →