# isholiday: Check if Date is a Holiday

> isholiday (Check if Date is a Holiday) is a 1001fx API function in the group Date & time: POST https://api.1001fx.com/datetime/isholiday, 1 credit per call. It works as a ready-made module in Make and n8n or as a plain HTTP call.

Checks if a date is a public holiday in a country and optionally in a state. Country codes: see [date-holidays](https://github.com/commenthol/date-holidays).

- Group: Date & time
- Endpoint: `POST https://api.1001fx.com/datetime/isholiday`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: application/json
- Credits: 1 credit per call
- Ready-made in: Make and n8n
- Docs: https://1001fx.com/functions/isholiday

## Parameters

- `date` (string (DD.MM.YYYY), required) – Date: The date to check. Your date needs to be in one of the following formats DD.MM.YYYY, DD.MM.YY, DD.MM.YYYY HH:mm, DD.MM.YY HH:mm, MM-DD-YYYY, MM-DD-YYYY HH:mm, MM-DD-YY, MM-DD-YY HH:mm.
- `country` (enum, required, one of `Afghanistan`, `AlandIslands`, `Albania`, `Algeria`, `AmericanSamoa`, `Andorra`, `Angola`, `Anguilla`, `Antarctica`, `AntiguaAndBarbuda`, `Argentina`, `Armenia`, `Aruba`, `Australia`, `Austria`, `Azerbaijan`, `Bahamas`, `Bahrain`, `Bangladesh`, `Barbados`, `Belarus`, `Belgium`, `Belize`, `Benin`, `Bermuda`, `Bhutan`, `Bolivia`, `BonaireSintEustatiusSaba`, `BosniaAndHerzegovina`, `Botswana`, `BouvetIsland`, `Brazil`, `BritishIndianOceanTerritory`, `BruneiDarussalam`, `Bulgaria`, `BurkinaFaso`, `Burundi`, `Cambodia`, `Cameroon`, `Canada`, `CapeVerde`, `CaymanIslands`, `CentralAfricanRepublic`, `Chad`, `Chile`, `China`, `ChristmasIsland`, `CocosKeelingIslands`, `Colombia`, `Comoros`, `Congo`, `CongoDemocraticRepublic`, `CookIslands`, `CostaRica`, `CoteDIvoire`, `Croatia`, `Cuba`, `Curacao`, `Cyprus`, `CzechRepublic`, `Denmark`, `Djibouti`, `Dominica`, `DominicanRepublic`, `Ecuador`, `Egypt`, `ElSalvador`, `EquatorialGuinea`, `Eritrea`, `Estonia`, `Ethiopia`, `FalklandIslands`, `FaroeIslands`, `Fiji`, `Finland`, `France`, `FrenchGuiana`, `FrenchPolynesia`, `FrenchSouthernTerritories`, `Gabon`, `Gambia`, `Georgia`, `Germany`, `Ghana`, `Gibraltar`, `Greece`, `Greenland`, `Grenada`, `Guadeloupe`, `Guam`, `Guatemala`, `Guernsey`, `Guinea`, `GuineaBissau`, `Guyana`, `Haiti`, `HeardIslandMcdonaldIslands`, `HolySeeVaticanCityState`, `Honduras`, `HongKong`, `Hungary`, `Iceland`, `India`, `Indonesia`, `Iran`, `Iraq`, `Ireland`, `IsleOfMan`, `Israel`, `Italy`, `Jamaica`, `Japan`, `Jersey`, `Jordan`, `Kazakhstan`, `Kenya`, `Kiribati`, `Korea`, `KoreaDemocraticPeoplesRepublic`, `Kuwait`, `Kyrgyzstan`, `LaoPeoplesDemocraticRepublic`, `Latvia`, `Lebanon`, `Lesotho`, `Liberia`, `LibyanArabJamahiriya`, `Liechtenstein`, `Lithuania`, `Luxembourg`, `Macao`, `Macedonia`, `Madagascar`, `Malawi`, `Malaysia`, `Maldives`, `Mali`, `Malta`, `MarshallIslands`, `Martinique`, `Mauritania`, `Mauritius`, `Mayotte`, `Mexico`, `Micronesia`, `Moldova`, `Monaco`, `Mongolia`, `Montenegro`, `Montserrat`, `Morocco`, `Mozambique`, `Myanmar`, `Namibia`, `Nauru`, `Nepal`, `Netherlands`, `NewCaledonia`, `NewZealand`, `Nicaragua`, `Niger`, `Nigeria`, `Niue`, `NorfolkIsland`, `NorthernMarianaIslands`, `Norway`, `Oman`, `Pakistan`, `Palau`, `PalestinianTerritory`, `Panama`, `PapuaNewGuinea`, `Paraguay`, `Peru`, `Philippines`, `Pitcairn`, `Poland`, `Portugal`, `PuertoRico`, `Qatar`, `Reunion`, `Romania`, `RussianFederation`, `Rwanda`, `SaintBarthelemy`, `SaintHelena`, `SaintKittsAndNevis`, `SaintLucia`, `SaintMartin`, `SaintPierreAndMiquelon`, `SaintVincentAndGrenadines`, `Samoa`, `SanMarino`, `SaoTomeAndPrincipe`, `SaudiArabia`, `Senegal`, `Serbia`, `Seychelles`, `SierraLeone`, `Singapore`, `SintMaarten`, `Slovakia`, `Slovenia`, `SolomonIslands`, `Somalia`, `SouthAfrica`, `SouthGeorgiaAndSandwichIsl`, `SouthSudan`, `Spain`, `SriLanka`, `Sudan`, `Suriname`, `SvalbardAndJanMayen`, `Swaziland`, `Sweden`, `Switzerland`, `SyrianArabRepublic`, `Taiwan`, `Tajikistan`, `Tanzania`, `Thailand`, `TimorLeste`, `Togo`, `Tokelau`, `Tonga`, `TrinidadAndTobago`, `Tunisia`, `Turkey`, `Turkmenistan`, `TurksAndCaicosIslands`, `Tuvalu`, `Uganda`, `Ukraine`, `UnitedArabEmirates`, `UnitedKingdom`, `UnitedStates`, `UnitedStatesOutlyingIslands`, `Uruguay`, `Uzbekistan`, `Vanuatu`, `Venezuela`, `Vietnam`, `VirginIslandsBritish`, `VirginIslandsUS`, `WallisAndFutuna`, `WesternSahara`, `Yemen`, `Zambia`, `Zimbabwe`, `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CW`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KR`, `KP`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SZ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`) – Country: 2 character country code or full country name without whitespaces.
- `state` (string, optional) – State code

## Use cases

- Skip automatic emails or deliveries on public holidays
- Calculate working days for an SLA without holidays
- Check holidays per German state, for example Epiphany in Bavaria

## Example: Christmas in Hesse

```bash
curl -X POST 'https://api.1001fx.com/datetime/isholiday' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"date":"25.12.2020","country":"DE","state":"HE"}'
```

Answer (HTTP 200):

```json
{
  "result": {
    "date": "2020-12-25 00:00:00",
    "start": "2020-12-24T23:00:00.000Z",
    "end": "2020-12-25T23:00:00.000Z",
    "name": "1. Weihnachtstag",
    "type": "public",
    "isHoliday": true
  }
}
```

## FAQ

**How do I select a country and a state?**

Pass country as a 2 character code or as the full country name without spaces, and optionally state as state code. The available codes are those of the date-holidays library.

**What does the answer contain?**

For a holiday: its name, type, start and end and isHoliday true. Otherwise only isHoliday false. Names come in the local language, for example 1. Weihnachtstag.

**Why is Epiphany not a holiday in Germany?**

Some holidays only apply in certain states. Epiphany is a public holiday in Bavaria, so it is found with the state set, but not for Germany as a whole.
