curl --request GET \
--url https://api.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/ \
--header 'X-Initdesk-Token: <api-key>'import requests
url = "https://api.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/"
headers = {"X-Initdesk-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Initdesk-Token': '<api-key>'}};
fetch('https://api.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/', 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.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Initdesk-Token: <api-key>"
],
]);
$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.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Initdesk-Token", "<api-key>")
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.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/")
.header("X-Initdesk-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Initdesk-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 123,
"date": "2023-12-25",
"name": "<string>",
"repeats_yearly": true,
"opens_at": "<string>",
"closes_at": "<string>"
}Retrieve business hours exception
Date exceptions. Members read. Owners, admins, and tokens write.
curl --request GET \
--url https://api.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/ \
--header 'X-Initdesk-Token: <api-key>'import requests
url = "https://api.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/"
headers = {"X-Initdesk-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Initdesk-Token': '<api-key>'}};
fetch('https://api.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/', 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.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Initdesk-Token: <api-key>"
],
]);
$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.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Initdesk-Token", "<api-key>")
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.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/")
.header("X-Initdesk-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.initdesk.com/organizations/{organization_id}/business-hours/exceptions/{pk}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Initdesk-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 123,
"date": "2023-12-25",
"name": "<string>",
"repeats_yearly": true,
"opens_at": "<string>",
"closes_at": "<string>"
}Authorizations
Path Parameters
A unique integer value identifying this Business hours exception.
^[-a-zA-Z0-9_]+$Response
One date that replaces that weekday. Both times null means closed.
Set both opens_at and closes_at for one custom range, or leave both null. Times may be HH:MM or HH:MM:SS. A close earlier than the open continues overnight. This is not the weekly_hours object.
Calendar date, YYYY-MM-DD.
Label for this date. May be empty.
64Repeat this month and day every year. February 29 repeats on leap years.
24-hour time as HH:MM or HH:MM:SS. Null together with closes_at means the date is closed.
24-hour time as HH:MM or HH:MM:SS. Earlier than opens_at continues overnight. Null together with opens_at means the date is closed.
Was this page helpful?

