Create a Business Calendar
Create a Business Calendar. name and timezone are required. This endpoint may change or be removed without prior notice.
POST
/
v1
/
business_calendars
Create a Business Calendar
curl --request POST \
--url https://api.siit.io/v1/business_calendars \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"timezone": "<string>",
"slots": [
{
"start_time": "<string>",
"end_time": "<string>",
"on_sunday": true,
"on_monday": true,
"on_tuesday": true,
"on_wednesday": true,
"on_thursday": true,
"on_friday": true,
"on_saturday": true
}
]
}
'import requests
url = "https://api.siit.io/v1/business_calendars"
payload = {
"name": "<string>",
"timezone": "<string>",
"slots": [
{
"start_time": "<string>",
"end_time": "<string>",
"on_sunday": True,
"on_monday": True,
"on_tuesday": True,
"on_wednesday": True,
"on_thursday": True,
"on_friday": True,
"on_saturday": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
timezone: '<string>',
slots: [
{
start_time: '<string>',
end_time: '<string>',
on_sunday: true,
on_monday: true,
on_tuesday: true,
on_wednesday: true,
on_thursday: true,
on_friday: true,
on_saturday: true
}
]
})
};
fetch('https://api.siit.io/v1/business_calendars', 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.siit.io/v1/business_calendars",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'timezone' => '<string>',
'slots' => [
[
'start_time' => '<string>',
'end_time' => '<string>',
'on_sunday' => true,
'on_monday' => true,
'on_tuesday' => true,
'on_wednesday' => true,
'on_thursday' => true,
'on_friday' => true,
'on_saturday' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siit.io/v1/business_calendars"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"timezone\": \"<string>\",\n \"slots\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"on_sunday\": true,\n \"on_monday\": true,\n \"on_tuesday\": true,\n \"on_wednesday\": true,\n \"on_thursday\": true,\n \"on_friday\": true,\n \"on_saturday\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.siit.io/v1/business_calendars")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"timezone\": \"<string>\",\n \"slots\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"on_sunday\": true,\n \"on_monday\": true,\n \"on_tuesday\": true,\n \"on_wednesday\": true,\n \"on_thursday\": true,\n \"on_friday\": true,\n \"on_saturday\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siit.io/v1/business_calendars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"timezone\": \"<string>\",\n \"slots\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"on_sunday\": true,\n \"on_monday\": true,\n \"on_tuesday\": true,\n \"on_wednesday\": true,\n \"on_thursday\": true,\n \"on_friday\": true,\n \"on_saturday\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"result": {
"uid": "<string>",
"name": "<string>",
"timezone": "<string>",
"slots": [
{
"on_sunday": true,
"on_monday": true,
"on_tuesday": true,
"on_wednesday": true,
"on_thursday": true,
"on_friday": true,
"on_saturday": true,
"start_time": "<string>",
"end_time": "<string>"
}
]
}
}{
"error": "<string>",
"troubleshoot": "<string>"
}Authorizations
Body
application/json
Create a Business Calendar
curl --request POST \
--url https://api.siit.io/v1/business_calendars \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"timezone": "<string>",
"slots": [
{
"start_time": "<string>",
"end_time": "<string>",
"on_sunday": true,
"on_monday": true,
"on_tuesday": true,
"on_wednesday": true,
"on_thursday": true,
"on_friday": true,
"on_saturday": true
}
]
}
'import requests
url = "https://api.siit.io/v1/business_calendars"
payload = {
"name": "<string>",
"timezone": "<string>",
"slots": [
{
"start_time": "<string>",
"end_time": "<string>",
"on_sunday": True,
"on_monday": True,
"on_tuesday": True,
"on_wednesday": True,
"on_thursday": True,
"on_friday": True,
"on_saturday": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
timezone: '<string>',
slots: [
{
start_time: '<string>',
end_time: '<string>',
on_sunday: true,
on_monday: true,
on_tuesday: true,
on_wednesday: true,
on_thursday: true,
on_friday: true,
on_saturday: true
}
]
})
};
fetch('https://api.siit.io/v1/business_calendars', 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.siit.io/v1/business_calendars",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'timezone' => '<string>',
'slots' => [
[
'start_time' => '<string>',
'end_time' => '<string>',
'on_sunday' => true,
'on_monday' => true,
'on_tuesday' => true,
'on_wednesday' => true,
'on_thursday' => true,
'on_friday' => true,
'on_saturday' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siit.io/v1/business_calendars"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"timezone\": \"<string>\",\n \"slots\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"on_sunday\": true,\n \"on_monday\": true,\n \"on_tuesday\": true,\n \"on_wednesday\": true,\n \"on_thursday\": true,\n \"on_friday\": true,\n \"on_saturday\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.siit.io/v1/business_calendars")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"timezone\": \"<string>\",\n \"slots\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"on_sunday\": true,\n \"on_monday\": true,\n \"on_tuesday\": true,\n \"on_wednesday\": true,\n \"on_thursday\": true,\n \"on_friday\": true,\n \"on_saturday\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siit.io/v1/business_calendars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"timezone\": \"<string>\",\n \"slots\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"on_sunday\": true,\n \"on_monday\": true,\n \"on_tuesday\": true,\n \"on_wednesday\": true,\n \"on_thursday\": true,\n \"on_friday\": true,\n \"on_saturday\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"result": {
"uid": "<string>",
"name": "<string>",
"timezone": "<string>",
"slots": [
{
"on_sunday": true,
"on_monday": true,
"on_tuesday": true,
"on_wednesday": true,
"on_thursday": true,
"on_friday": true,
"on_saturday": true,
"start_time": "<string>",
"end_time": "<string>"
}
]
}
}{
"error": "<string>",
"troubleshoot": "<string>"
}
