Holiday APIs¶
Holidays¶
-
GET
/api/v1/generic/holidays/
(deprecated)¶
-
GET
/api/v1/generic/holidays/years/
(string: instance_name)/countries/
(string: sub_instance_name)/
¶
-
GET
/api/v1/generic/holidays/countries/
(string: instance_name)/years/
(string: sub_instance_name)/
¶ Retrieve the holidays list for provided country and year
Example request:
GET /api/v1/generic/holidays/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "year": 2019, "country": "BE" }
- Request JSON Object:
year (integer) –
the year you want to retrieve the holidays for
country (string) –
the country you want to retrieve the holidays for
Example request:
GET /api/v1/generic/holidays/countries/BE/years/ HTTP/1.1 Host: example.com
Example request:
GET /api/v1/generic/holidays/years/2019/countries/BE/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK { "holidays": [ { "name": "Christmas Day", "description": "Christmas Day is one of the biggest Christian celebrations and falls on December 25 in the Gregorian calendar.", "date": "2019-12-25", "type": "public" }, ... ] }
- Response JSON Object:
holidays (array) – a list of objects as defined as Holiday Object
- Status Codes:
200 OK – no error
404 Not Found – No holidays found for the provided country and year.
404 Not Found – The remote server is not configured or is not reachable.
Holidays countries¶
-
GET
/api/v1/generic/holidays/countries/
¶ Retrieve the countries list
Example request:
GET /api/v1/generic/holidays/countries/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK { "countries": [ "BE", "NL" ] }
- Response JSON Object:
countries (array) – a list of countries of the public holidays.
- Status Codes:
200 OK – no error
404 Not Found – Holidays not found.
Holidays countries by year¶
-
GET
/api/v1/generic/holidays/years/
(string: instance_name)/countries/
¶ Retrieve the countries list for provided year
Example request:
GET /api/v1/generic/holidays/years/2019/countries/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK { "countries": [ "BE", "NL" ] }
- Response JSON Object:
countries (array) – a list of countries of the public holidays.
- Status Codes:
200 OK – no error
404 Not Found – Holidays not found for the provided year.
Holidays years¶
-
GET
/api/v1/generic/holidays/years/
¶ Retrieve the years list
Example request:
GET /api/v1/generic/holidays/years/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK { "years": [ "2019", "2020" ] }
- Response JSON Object:
years (array) – a list of years of the public holidays.
- Status Codes:
200 OK – no error
404 Not Found – Holidays not found.
Holidays years by country¶
-
GET
/api/v1/generic/holidays/countries/
(string: instance_name)/years/
¶ Retrieve the years list for provided country
Example request:
GET /api/v1/generic/holidays/countries/BE/years/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK { "years": [ "2019", "2020" ] }
- Response JSON Object:
years (array) – a list of years of the public holidays.
- Status Codes:
200 OK – no error
404 Not Found – No holidays found for the provided country.
Holiday Object¶
Name |
Type |
Description |
---|---|---|
name |
String |
The name of the holiday event. |
description |
String |
The description of the holiday event. |
date |
String |
The date of the holiday event. |
type |
String |
The type of the holiday event. Could be “public” |