curl --request GET \
--url https://api.partoo.co/v2/holidays/{country} \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/holidays/{country}"
headers = {"x-APIKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-APIKey': '<api-key>'}};
fetch('https://api.partoo.co/v2/holidays/{country}', 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.partoo.co/v2/holidays/{country}",
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-APIKey: <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.partoo.co/v2/holidays/{country}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-APIKey", "<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.partoo.co/v2/holidays/{country}")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/holidays/{country}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-APIKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"holidays": [
{
"name": "Armistice",
"date": "2023-11-11"
},
{
"name": "Noël",
"date": "2023-12-25"
},
{
"name": "Jour de l'an",
"date": "2024-01-01"
},
{
"name": "Lundi de Pâques",
"date": "2024-04-01"
},
{
"name": "Fête du Travail",
"date": "2024-05-01"
},
{
"name": "Fête de la Victoire",
"date": "2024-05-08"
},
{
"name": "Ascension",
"date": "2024-05-09"
},
{
"name": "Lundi de Pentecôte",
"date": "2024-05-20"
},
{
"name": "Fête nationale",
"date": "2024-07-14"
},
{
"name": "Assomption",
"date": "2024-08-15"
},
{
"name": "Toussaint",
"date": "2024-11-01"
},
{
"name": "Christmas",
"date": "2024-12-25"
},
{
"name": "New Year's Day",
"date": "2025-01-01"
}
]
}{
"errors": {
"json": {}
}
}{
"errors": {
"authentication": "User not authenticated"
}
}Get holidays
This endpoint allows you to retrieve a list of upcoming bank holidays for a specified country within the next 365 days. The holidays are ordered based on their occurrence dates.
curl --request GET \
--url https://api.partoo.co/v2/holidays/{country} \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/holidays/{country}"
headers = {"x-APIKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-APIKey': '<api-key>'}};
fetch('https://api.partoo.co/v2/holidays/{country}', 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.partoo.co/v2/holidays/{country}",
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-APIKey: <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.partoo.co/v2/holidays/{country}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-APIKey", "<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.partoo.co/v2/holidays/{country}")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/holidays/{country}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-APIKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"holidays": [
{
"name": "Armistice",
"date": "2023-11-11"
},
{
"name": "Noël",
"date": "2023-12-25"
},
{
"name": "Jour de l'an",
"date": "2024-01-01"
},
{
"name": "Lundi de Pâques",
"date": "2024-04-01"
},
{
"name": "Fête du Travail",
"date": "2024-05-01"
},
{
"name": "Fête de la Victoire",
"date": "2024-05-08"
},
{
"name": "Ascension",
"date": "2024-05-09"
},
{
"name": "Lundi de Pentecôte",
"date": "2024-05-20"
},
{
"name": "Fête nationale",
"date": "2024-07-14"
},
{
"name": "Assomption",
"date": "2024-08-15"
},
{
"name": "Toussaint",
"date": "2024-11-01"
},
{
"name": "Christmas",
"date": "2024-12-25"
},
{
"name": "New Year's Day",
"date": "2025-01-01"
}
]
}{
"errors": {
"json": {}
}
}{
"errors": {
"authentication": "User not authenticated"
}
}Authorizations
The authentication system on Partoo API is using API Key that should be put in the header of the request (the name of the header is x-APIKey). An api_key is linked to a user. This user's role will give you different access level to the API features.
Path Parameters
Country code from ISO 3166 international standard - https://www.iban.com/country-codes
Query Parameters
Preferred language for holiday names. If no language is provided, the user's default language will be used. If the user's default language is unavailable, the country's primary language will be used.
fr, en, es, it, pt-br, de, ar "fr"
Response
OK
Show child attributes
Show child attributes
Was this page helpful?