Add a guest or group of guests to the Queue
Purpose: The purpose of this API is to add a guest or a group of guests to the queue for a given center.
Before you begin
- You need a valid API key or access token. See Set up API authentication.
Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.
Endpoint
POST /v1/queue/bookings
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| center_id | string | No | Unique identifier of the center in which you are adding the guest or a group of guests. |
| consider_online_hours | boolean | No | This parameter considers the online hours of the center. True: Will consider online hours when adding the guest to the queue. False: Does not consider online hours when adding a guest to the queue. |
| do_reprocess | boolean | No | Reprocessing lets Zenoti assign resources dynamically based on availability of the employees. True: Allows the reprocessing of the appointment based on resource availability. False: Does not allow reprocessing. |
| guests | object[] | No | Enter the guest_id in the id parameter. You can add multiple guest objects when adding a group of guests to the queue. Note: Each guest object must have a corresponding id. |
| services | object[] | No | Enter the service_id in the id parameter. You can enter multiple services for a single guest or for a group of guests. Note: Each service object must have a corresponding id. |
Response
Success (201 Created)
{}
Example
curl --request POST \
--url 'https://api.zenoti.com/v1/queue/bookings' \
--header 'Authorization: bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"center_id": "string",
"consider_online_hours": true,
"do_reprocess": true,
"guests": [
{
"...": "..."
}
],
"services": [
{
"...": "..."
}
]
}'
const response = await fetch('https://api.zenoti.com/v1/queue/bookings', {
method: 'POST',
headers: {
'Authorization': 'bearer {{access_token}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
center_id: 'string',
consider_online_hours: true,
do_reprocess: true,
guests: [
{ '...': '...' }
],
services: [
{ '...': '...' }
]
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.zenoti.com/v1/queue/bookings',
headers={
'Authorization': 'bearer {{access_token}}',
},
json={'center_id': 'string', 'consider_online_hours': True, 'do_reprocess': True, 'guests': [{'...': '...'}], 'services': [{'...': '...'}]}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
JsonSerializer.Serialize(new {
center_id = "string",
consider_online_hours = true,
do_reprocess = true,
guests = new[] {
new { ... = "..." }
},
services = new[] {
new { ... = "..." }
}
}),
Encoding.UTF8, "application/json");
var response = await client.PostAsync(
"https://api.zenoti.com/v1/queue/bookings", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/queue/bookings')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { center_id: 'string', consider_online_hours: true, do_reprocess: true, guests: [{ ...: '...' }], services: [{ ...: '...' }] }.to_json
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 |