cURL
curl --request GET \
--url https://api.novacal.io/v1/availabilities \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.novacal.io/v1/availabilities"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.novacal.io/v1/availabilities', 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.novacal.io/v1/availabilities",
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: Bearer <token>"
],
]);
$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.novacal.io/v1/availabilities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.novacal.io/v1/availabilities")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novacal.io/v1/availabilities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": 7,
"name": "Working hours",
"timezone": "Europe/Belgrade",
"is_default": true,
"working_days": [
"monday",
"tuesday"
],
"hours": {
"monday": [
{
"start": "09:00",
"end": "17:00"
}
],
"tuesday": [
{
"start": "09:00",
"end": "12:00"
},
{
"start": "14:00",
"end": "17:00"
}
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Availability Schedules
Get Availabilities
List the availability schedules on your Novacal account, including their name, timezone, working days, and open hours.
GET
/
v1
/
availabilities
cURL
curl --request GET \
--url https://api.novacal.io/v1/availabilities \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.novacal.io/v1/availabilities"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.novacal.io/v1/availabilities', 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.novacal.io/v1/availabilities",
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: Bearer <token>"
],
]);
$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.novacal.io/v1/availabilities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.novacal.io/v1/availabilities")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novacal.io/v1/availabilities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": 7,
"name": "Working hours",
"timezone": "Europe/Belgrade",
"is_default": true,
"working_days": [
"monday",
"tuesday"
],
"hours": {
"monday": [
{
"start": "09:00",
"end": "17:00"
}
],
"tuesday": [
{
"start": "09:00",
"end": "12:00"
},
{
"start": "14:00",
"end": "17:00"
}
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}What this endpoint returns
An availability schedule holds the hours you are open for bookings. This endpoint returns every schedule on your account, newest first. Each event type points to one schedule. The schedule markedis_default is the one new event types get.
Reading the hours
working_days lists the weekdays the schedule is open on. hours gives the open periods for each of those weekdays, in the timezone of the schedule. A weekday with more than one period has a break between them.
{
"timezone": "Europe/Belgrade",
"working_days": ["monday", "tuesday"],
"hours": {
"monday": [{ "start": "09:00", "end": "17:00" }],
"tuesday": [
{ "start": "09:00", "end": "12:00" },
{ "start": "14:00", "end": "17:00" }
]
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.