Create a booking
crm:booking-services.writehttps://api.holded.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
Location identifier
Service identifier
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.
ISO 639-1 language code
Custom field values
Custom field key
Custom field value
Request
import requests
url = "https://api.holded.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
{
"id": "507f1f77bcf86cd799439011"
}Success responses
201Booking createdapplication/jsonError responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Location not foundapplication/json409Conflictapplication/json422Validation errorapplication/json429Rate limit exceededapplication/json