List Availability Rules
curl --request GET \
--url https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "rule-uuid-1",
"type": "recurring",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00",
"timezone": "America/New_York"
},
{
"id": "rule-uuid-2",
"type": "exception",
"date": "2024-12-25",
"available": false
}
]
}
Availability
List Availability Rules
List availability rules for a calendar
GET
/
api
/
v1
/
calendars
/
{calendar_id}
/
availability-rules
List Availability Rules
curl --request GET \
--url https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/calendars/{calendar_id}/availability-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "rule-uuid-1",
"type": "recurring",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00",
"timezone": "America/New_York"
},
{
"id": "rule-uuid-2",
"type": "exception",
"date": "2024-12-25",
"available": false
}
]
}
List Availability Rules
List availability rules configured for a calendar. Availability rules define booking windows (e.g., weekday 9–17) and exceptions (e.g., holidays).Endpoint
GET /api/v1/calendars/{calendar_id}/availability-rules
Path parameters
string
required
Calendar UUID.
Request headers
string
required
Bearer token. Format:
Bearer talq_your_environment_token_hereResponse
{
"success": true,
"data": [
{
"id": "rule-uuid-1",
"type": "recurring",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00",
"timezone": "America/New_York"
},
{
"id": "rule-uuid-2",
"type": "exception",
"date": "2024-12-25",
"available": false
}
]
}
Was this page helpful?