Create a time slot reservation
POST {baseUrl}/queues/{queueId}/reservations
This endpoint is used to create a preliminary reservation for a time slot.
Note that time slot reservations must be either confirmed or cancelled manually in the process, as there is no automatic mechanism to clean up stale reservations.
Body Parameters
Here’s a detailed description of the body parameters needed to create a time slot reservation:
Parameter | Type | Description |
---|---|---|
locale | string | Customer's preferred language/locale (e.g., 'en', 'ar', 'sv'). |
notification | object | Configuration for notifications, including type and settings. See Notification Structure below. |
customerInfo | string array | Optional. Customer information to attach to the ticket for staff visibility, usually includes first and last name. |
numberOfPeople | integer | Optional. The number of people the ticket is attached to. |
booking | object | Booking details, including start and end times of the selected time slot. See Booking Structure below. |
customData | object | Optional. A generic object that can be used to store any relevant ticket information for internal purposes. |
Notification Structure
Field | Type | Description |
---|---|---|
type | string | Notification type, e.g., 'phoneNumber' or 'email'. |
settings | object | Settings for the notification, including recipient details. See Settings Structure below. |
Settings Structure
Field | Type | Description |
---|---|---|
to | string | For 'phoneNumber' type, the customer phone number in E.164 format. |
recipient | string | For both 'email' and 'phoneNumber' types, the recipient's contact information. |
Booking Structure
Field | Type | Description |
---|---|---|
start | string | ISO string indicating the start date and time of the time slot. |
end | string | ISO string indicating the end date and time of the time slot. |
virtualAppointment | boolean | Optional. Indicates if the reservation is for a remote appointment. |
isEnabled | boolean | True if this reservation is for a remote appointment. |
Authentication
ApiKey header (organizational key) is required.
Request:
curl --location --request POST '{baseUrl}/queues/{queueId}/reservations' \
--header 'Content-Type: application/json' \
--header 'ApiKey: XYZ' \
--data-raw '{
"locale": "en",
"notification": {
"type": "phoneNumber",
"settings": {
"to": "+48000"
}
},
"customerInfo": ["Firstname Lastname"],
"numberOfPeople": 1,
"booking": {
"start": "2020-11-30T14:30:00.000Z",
"end": "2020-11-30T14:35:00.000Z",
"virtualAppointment": {
"isEnabled": true
}
},
"customData": {
"internalIdOrAnyOtherField": "foo",
}
}'
Response:
{
"location": null,
"type": "booking",
"priority": 100,
"locale": "en",
"notification": {
"type": "phoneNumber",
"settings": {
"to": "+48000"
}
},
"numberOfPeople": 1,
"booking": {
"start": "2020-11-30T14:30:00.000Z",
"end": "2020-11-30T14:35:00.000Z"
},
"status": "reserved",
"label": "",
"id": "5afc59af-0270-481b-a50d-73445dd21ec6",
"queue": "64aa8a7f-a616-44e8-806a-165e08d91192",
"createdAt": "2020-11-30T15:15:17.176Z",
"QRCodeCheckInPositionId": "{\"type\":\"check-in-position\",\"positionId\":\"5afc59af-0270-481b-a50d-73445dd21ec6\"}",
"bookingReminderAt": null,
"customData": {
"internalIdOrAnyOtherField": "foo",
}
}