Retrieve the list of appointments of a center
This API retrieves the list of all appointments of the specified center between the start date and end date.
You must provide appropriate details for the center_id, start_date, and end_date parameters. Optionally, you can also specify the details for the include_no_show_cancel and therapist_id parameters to filter the results.
The difference between the start_date and end_date cannot be more than seven days.
The response also includes block-out times.
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
GET /v1/appointments
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| center_id | string | Yes | — | Mandatory Unique 32-character identifier of the center. |
| start_date | string (date) | Yes | — | Mandatory Format: YYYY-MM-DD Retrieves the appointments that have appointment start date as the specified start_date. Note: start_date and end_date must be different. Default appointment start time value: 00:00:00 |
| end_date | string (date) | Yes | — | Mandatory Format: YYYY-MM-DD Retrieves the appointments that have appointment start date before the specified end_date (exclusive of end_date). For example, if you specify start_date as 2020-08-03 and end_date as 2020-08-04, this API will retrieve the list of appointments for only Aug 3, 2020. Note: start_date and end_date must be different. Default appointment end time value: 00:00:00 |
| include_no_show_cancel | boolean | No | — | Optional If true, the API includes the appointments that have status as No Show and Cancel in the response. If it is not passed by default, value will be set as false. |
| therapist_id | string | No | — | Optional Unique identifier of the therapist. If passed, the API retrieves appointments of a particular therapist; else, the API retrieves appointments of all therapists. |
Response
Success (200 OK)
{}
Example
curl --request GET \
--url 'https://api.zenoti.com/v1/appointments?center_id={{center_id}}&start_date={{start_date}}&end_date={{end_date}}' \
--header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/appointments', {
method: 'GET',
headers: {
'Authorization': 'bearer {{access_token}}'
},
});
const data = await response.json();
import requests
response = requests.get(
'https://api.zenoti.com/v1/appointments',
headers={
'Authorization': 'bearer {{access_token}}',
},
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var response = await client.GetAsync(
"https://api.zenoti.com/v1/appointments");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/appointments')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
response = http.request(request)
data = JSON.parse(response.body)
Error codes
| Status | Description |
|---|---|
| 401 | Unauthorized -- invalid or expired access token |
| 429 | Too many requests -- rate limit exceeded |