List all blockout times types
Description When providers are unavailable due to any reason such as lunch, training, or break, you can use Block Out Time Types to show their unavailability on the Appointment Book. you can also use pagination by passing page and size query parameters if you have huge number of records by default page is set to 1 and size is set to 10. size cannot be more than 100 which means maximum records per page cannot be more than 100.
Returns Returns a object containing the list of block out time types which are specified for the organization. Returns an error if failed to retrieve block out time types.
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/organizations/blockouttimes/types
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Response
Success (200 OK)
{
"block_out_time_types": [
{
"...": "..."
}
],
"error": {}
}
Response fields
| Field | Type | Description |
|---|---|---|
| block_out_time_types | object[] | |
| block_out_time_types[].name | string | |
| block_out_time_types[].id | integer | |
| block_out_time_types[].duration | integer | |
| error | object |
Example
curl --request GET \
--url 'https://api.zenoti.com/v1/organizations/blockouttimes/types' \
--header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/organizations/blockouttimes/types', {
method: 'GET',
headers: {
'Authorization': 'bearer {{access_token}}'
},
});
const data = await response.json();
import requests
response = requests.get(
'https://api.zenoti.com/v1/organizations/blockouttimes/types',
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/organizations/blockouttimes/types");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/organizations/blockouttimes/types')
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 |
|---|---|
| 400 | 400 |
| 401 | Unauthorized -- invalid or expired access token |
| 429 | Too many requests -- rate limit exceeded |