In this quick post, we will use API – OpenHolidays API to gather information about current and future public holidays (and school holidays). It’s a great tool, for example, any absence app in Power Platform.

Let’s see what responses the OpenHolidays is giving. We will be interested in the following two options.

The first one return public holidays for giving year, the source w Poland is Ustawa z dnia 18 stycznia 1951 r. o dniach wolnych od pracy.

PublicHolidays
https://openholidaysapi.org/PublicHolidays?
  countryIsoCode={countryIsoCode}
  &languageIsoCode={languageIsoCode}
  &validFrom={validFrom}
  &validTo={validTo}

The next one is about school holidays, source – https://www.gov.pl/web/edukacja/kalendarz-roku-szkolnego (for now, only next 2025 year):

SchoolHolidays
https://openholidaysapi.org/SchoolHolidays?
  countryIsoCode={countryIsoCode}
  &languageIsoCode={languageIsoCode}
  &validFrom={validFrom}
  &validTo={validTo}

The API is general very simply, but I added some more maybe useful futures. So I created SPO list:

[1] In Poland, if the holiday is on Saturday, employers must give employees an additional day off. So I added two columns where that situation exists. Furthermore, HR can add that day manual. 

The flow:

Perhaps the action Set isHolidayOnSaturday need some attention. I use a formula. I used dayOfWeek to valid if that day is Saturday – 6 :

fx
equals(dayOfWeek(outputs('startDate')),6)

And the list:


Okay, the school holidays have interesting data: subdivisions.

JSON
  {
    "id": "b780e061-8ddb-4baf-9069-d5702a697a38",
    "startDate": "2024-01-22",
    "endDate": "2024-02-04",
    "type": "School",
    "name": [
      {
        "language": "PL",
        "text": "Ferie zimowe"
      }
    ],
    "nationwide": false,
    "subdivisions": [
      {
        "code": "PL-PK",
        "shortName": "PK"
      },
      {
        "code": "PL-WN",
        "shortName": "WN"
      }
    ]
  }

I couldn’t find the exact ISO PL-xy code, but I mapped it to the codes we have in the API to full polish names of voivodeships:

VoivodshipCode
DolnośląskiePL-DS
Kujawsko-pomorskiePL-KP
ŁódzkiePL-LD
LubelskiePL-LU
LubuskiePL-LB
MałopolskiePL-MA
MazowieckiePL-MZ
MazowieckiePL-OP
PodkarpackiePL-PK
PodlaskiePL-PD
PomorskiePL-PM
ŚląskiePL-SL
ŚwiętokrzyskiePL-SK
Warmińsko-mazurskiePL-WN
WielkopolskiePL-WP
ZachodniopomorskiePL-ZP

Mine flow for Polish school holidays:

And quick description. In voivodships is JSON:

JSON
[
  {
    "voivodship": "Dolnośląskie",
    "code": "PL-DS"
  },
  {
    "voivodship": "Kujawsko-pomorskie",
    "code": "PL-KP"
  },
  {
    "voivodship": "Łódzkie",
    "code": "PL-LD"
  },
  {
    "voivodship": "Lubelskie",
    "code": "PL-LU"
  },
  {
    "voivodship": "Lubuskie",
    "code": "PL-LB"
  },
  {
    "voivodship": "Małopolskie",
    "code": "PL-MA"
  },
  {
    "voivodship": "Mazowieckie",
    "code": "PL-MZ"
  },
  {
    "voivodship": "Opolskie",
    "code": "PL-OP"
  },
  {
    "voivodship": "Podkarpackie",
    "code": "PL-PK"
  },
  {
    "voivodship": "Podlaskie",
    "code": "PL-PD"
  },
  {
    "voivodship": "Pomorskie",
    "code": "PL-PM"
  },
  {
    "voivodship": "Śląskie",
    "code": "PL-SL"
  },
  {
    "voivodship": "Świętokrzyskie",
    "code": "PL-SK"
  },
  {
    "voivodship": "Warmińsko-mazurskie",
    "code": "PL-WN"
  },
  {
    "voivodship": "Wielkopolskie",
    "code": "PL-WP"
  },
  {
    "voivodship": "Zachodniopomorskie",
    "code": "PL-ZP"
  }
]

In Apply to each subdivisions - SH as input parameter is

fx
outputs('subdivisions_-_SH')

Filter voivodships - SH:

fx
//From
@{outputs('voivodships')}

//Filter Query
@equals(@{item().code},@{items('Apply_to_each_subdivisions_-_SH')['code']})

voivodship - SH:

fx
@{body('Filter_voivodships_-_SH')[0]['voivodship']}

After successful running the flow, the list has a date:

Okay, that’s it. As you can see, even a simple API can serve as an extensive source of data that can be used for business purposes. For example, as I mentioned, to build an application database of applications. These holidays can also be added to employees’ calendars so that they remember and know their days off.