Fetch wait times of available stylists for a selected service

POST https://api.zenoti.com/v1/queue/available_times

Purpose: The purpose of this API is to retrieve the wait times of available stylists for a selected service in a center.

Before you begin

Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.

Endpoint

POST /v1/queue/available_times

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Query parameters

Parameter Type Required Default Description
availability_by_time_slots boolean No false If true, first available center time will be provided otherwise first slot will be provided.
skip_catalog_validation boolean No false If true, catalog validations for employees and services is skipped. If false, catalog validations for the employees and the services are performed.
skip_kiosk_validation boolean No false If true, Zenoti will not check if the employees are available in kiosk. If false, Zenoti will check if the employees are available on Kiosk.
first_available_times string No — Optional parameter, used in expand.

Request body

Field Type Required Description
center_id string No Unique identifier of the center.
consider_online_hours boolean No If true, Zenoti will consider the online hours while fetching the wait times. If false, Zenoti will not consider the online hours while fetching the wait times of available stylists.
services object No Object containing the service ids.

Response

Success (201 Created)

{}

Example

curl --request POST \
  --url 'https://api.zenoti.com/v1/queue/available_times' \
  --header 'Authorization: bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
  "center_id": "string",
  "consider_online_hours": true,
  "services": {}
}'
const response = await fetch('https://api.zenoti.com/v1/queue/available_times', {
  method: 'POST',
  headers: {
    'Authorization': 'bearer {{access_token}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
  center_id: 'string',
  consider_online_hours: true,
  services: {}
})
});
const data = await response.json();
import requests

response = requests.post(
    'https://api.zenoti.com/v1/queue/available_times',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
    json={'center_id': 'string', 'consider_online_hours': True, '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,
    services = new { }
}),
    Encoding.UTF8, "application/json");
var response = await client.PostAsync(
    "https://api.zenoti.com/v1/queue/available_times", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/queue/available_times')
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, 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