curl --request GET \
--url https://{tenantHost}/api/v1/portal/holidaysimport requests
url = "https://{tenantHost}/api/v1/portal/holidays"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{tenantHost}/api/v1/portal/holidays', 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://{tenantHost}/api/v1/portal/holidays",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://{tenantHost}/api/v1/portal/holidays"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenantHost}/api/v1/portal/holidays")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantHost}/api/v1/portal/holidays")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"date": "<string>",
"name": "<string>",
"type": "public",
"isHalfDay": true
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}List the days in a window that cost less than a full vacation day.
Cantonal and federal public holidays in [from, to]; for a caller who follows the school calendar, the cantonal school-holiday ranges expanded to one entry per day; and any Betriebsferien day the caller’s manager approved them to work through. Every entry means the same thing: the day costs isHalfDay ? 0.5 : 0 vacation days, and any other working weekday costs 1. Combined with EmployeeOverviewDTO.workingWeekdays that rule reproduces the server-authoritative LeaveRequestDTO.totalDays exactly. Note that a plain Betriebsferien day is deliberately absent — it consumes a full vacation day (NLE-928) — and that a school holiday inside a company closure is absent for the same reason.
curl --request GET \
--url https://{tenantHost}/api/v1/portal/holidaysimport requests
url = "https://{tenantHost}/api/v1/portal/holidays"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{tenantHost}/api/v1/portal/holidays', 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://{tenantHost}/api/v1/portal/holidays",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://{tenantHost}/api/v1/portal/holidays"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenantHost}/api/v1/portal/holidays")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantHost}/api/v1/portal/holidays")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"date": "<string>",
"name": "<string>",
"type": "public",
"isHalfDay": true
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Query Parameters
Two-letter canton code. Defaults to the caller's own canton. Federal holidays are returned regardless of the canton.
First calendar day of the window, inclusive (YYYY-MM-DD).
Last calendar day of the window, inclusive (YYYY-MM-DD). Must be on or after from, and the window must not span more than 400 days.