This API provides access to public holiday data, including region-specific holidays. It supports retrieving holiday lists and checking if a specific date is a holiday in a given region. More countries and regions will be added in the future.
Gets all supported Countries of PublicHolidays
{
mt: "GetCountries"
}
{
mt: "GetCountriesResult",
result: ["DE","AT","CH"]
}
Gets all supported states of a given country
{
mt: "GetStates",
country: "DE"
}
{
mt: "GetStatesResult",
result: ["BW","BY","BE","BB","HB","HH","HE","MV","NI","NW","RP","SL","SN","ST","SH","TH"]
}
Retrieves all public holidays for a given year, country and, optionally, a specific state. If no state is specified, only nationwide holidays (valid in all states) are returned.
You will get an array with an object for each day:
{
mt: "GetHolidays",
year: "2025",
country: "DE",
state: "BW",
}
{
mt: "GetHolidaysResult",
result: [{
"date": "2025-01-01",
"international": "New Year's Day",
"name": "Neujahr"
},
{...}]
}
Allows you to check whether a given date is a public holiday in a specified country, optionally, a specific state.
The date has to be in the format YY-MM-DD.
You will get an object as result:
{
mt: "IsHoliday",
date: "2025-12-25",
country: "DE",
state: "BW",
}
{
mt: "IsHolidayResult",
result: [{date:"2025-12-25", name: "1. Weihnachtstag", international: "Christmas Day", isHolidays: true}]
}
You can consume the API com.innovaphone.publicholidays and send request to it.
var holidaysApi = start.consumeApi("com.innovaphone.publicholidays");
holidaysApi.send({ mt: "GetCountries" });
holidaysApi.send({ mt: "GetStates", country: "DE" });
holidaysApi.send({ mt: "GetHolidays", year: "2025", country: "DE" });
holidaysApi.send({ mt: "IsHoliday", date: "2025-12-25", country: "DE" });
holidaysApi.onmessage.attach(function (sender, obj) {
console.log("HolidayApi: + "JSON.stringify(obj.msg));
});