Fetch wait times of a center (with center_ids or geolocation)

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

Purpose: The purpose of this API is to retrieve wait times for a list of centers or for centers in an area as per the Geolocation.

Before you begin

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

Endpoint

POST /v1/queue/center_wait_times

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

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Request body

Field Type Required Description
center_ids string No Object containing the ids of the centers for which you want to fetch the wait times. Note: Ensure the number of center_ids is less than 50. This API does not fetch the details if more than 50 center_ids are entered.
geo_latitude string No Latitude coordinate of the center. Note: If center_ids are provided, this parameter is not required.
geo_longitude string No Longitude coordinate of the center. Note: If center_ids are provided, this parameter is not required.
distance string No Range of the coordinate search. Note: If center_ids are provided, this parameter is not required.

Response

Success (201 Created)

{}

Example

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

response = requests.post(
    'https://api.zenoti.com/v1/queue/center_wait_times',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
    json={'center_ids': 'string', 'geo_latitude': 'string', 'geo_longitude': 'string', 'distance': 'string'}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
    JsonSerializer.Serialize(new {
    center_ids = "string",
    geo_latitude = "string",
    geo_longitude = "string",
    distance = "string"
}),
    Encoding.UTF8, "application/json");
var response = await client.PostAsync(
    "https://api.zenoti.com/v1/queue/center_wait_times", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/queue/center_wait_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_ids: 'string', geo_latitude: 'string', geo_longitude: 'string', distance: 'string' }.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