JSON Guide For Enrico 2.0

Details of Operations

All data coming to and from Enrico is UTF-8 encoded. If you host Enrico Service on your own server, substitute url https://kayaposoft.com/enrico/json/v2.0 with your own url in the following text.

Operation getHolidaysForMonth

Returns holidays for given month in given country.
Example: URL returning public holidays in Germany (Baden-Württemberg) for January 2022: https://kayaposoft.com/enrico/json/v2.0?action=getHolidaysForMonth&month=1&year=2022&country=deu&region=bw&holidayType=public_holiday

Operation getHolidaysForYear

Returns holidays for given year in given country.
Example: URL returning public holidays in Estonia for 2022: https://kayaposoft.com/enrico/json/v2.0?action=getHolidaysForYear&year=2022&country=est&holidayType=public_holiday

Operation getHolidaysForDateRange

Returns holidays for given date range in given country.
Example: URL returning public holidays in United States of America (District Of Columbia) from 04 July 2022 (including) to 04 July 2024 (including): https://kayaposoft.com/enrico/json/v2.0?action=getHolidaysForDateRange&fromDate=04-07-2022&toDate=04-07-2024&country=usa&region=dc&holidayType=public_holiday

Operation isPublicHoliday

Returns if given day is public holiday in given country.
Example: URL to check if 05 July 2022 is public holiday in Slovakia: https://kayaposoft.com/enrico/json/v2.0?action=isPublicHoliday&date=05-07-2022&country=svk

Operation isWorkDay

Returns if given day is work day in given country.
Example: URL to check if 30 July 2022 is work day in Hungary: https://kayaposoft.com/enrico/json/v2.0?action=isWorkDay&date=30-07-2022&country=hun

Operation getSupportedCountries

Returns the list of supported countries.
Example: URL to get supported countries: https://kayaposoft.com/enrico/json/v2.0?action=getSupportedCountries

Operation whereIsPublicHoliday

Returns the list of countries where given date is a public holiday.
Example: URL to get countries where 05 July 2025 is a public holiday: https://kayaposoft.com/enrico/json/v2.0/?action=whereIsPublicHoliday&date=05-07-2025

Input Parameters

ParameterDescriptionMandatoryDefault Value
countryISO 3166-1 alpha-3 country code or ISO 3166-1 alpha-2 country codeYesNo default value
region Possible values for New Zealand: ISO 3166-2:NZ codes - auk, bop, can, gis, hkb, mbh, mwt, nsn, ntl, ota, stl, tas, tki, wko, wgn, wtc, cit
Possible values for Australia: ISO 3166-2:AU codes - nsw, qld, sa, tas, vic, wa, act, nt
Possible values for Canada: ISO 3166-2:CA codes - ab, bc, mb, nb, nl, ns, on, pe, qc, sk, nt, nu, yt
Possible values for United States of America: ISO 3166-2:US codes - al, ak, az, ar, ca, co, ct, de, fl, ga, hi, id, il, in, ia, ks, ky, la, me, md, ma, mi, mn, ms, mo, mt, ne, nv, nh, nj, nm, ny, nc, nd, oh, ok, or, pa, ri, sc, sd, tn, tx, ut, vt, va, wa, wv, wi, wy, dc
Possible values for Germany: ISO 3166-2:DE codes - bw, by, be, bb, hb, hh, he, mv, ni, nw, rp, sl, sn, st, sh, th
Possible values for Great Britain: ISO 3166-2:GB codes - eng, nir, sct, wls
Yes for countries New Zealand, Australia, Canada, United States of America, Germany and Great Britain.No default value
holidayType Possible values
  • all - all holiday types
  • public_holiday - public holidays
  • observance - observances, not a public holidays
  • school_holiday - school holidays
  • other_day - other important days e.g. Mother's day, Father's day etc
  • extra_working_day - extra working days. This day takes place mostly on Saturday or Sunday and is substituted for extra public holiday.
NoALL
dateDate in format dd-mm-yyyyYesNo default value
jsonpName of the JSONP callback functionNoNo default value

Return Value

Operations getHolidaysForMonth, getHolidaysForYear and getHolidaysForDateRange

Returns the list of holidays in form:
[{
  "date": {
    "day":26,
    "month":12,
    "year":2022,
    "dayOfWeek":1
  },
  
  "name": [{
    "lang":"fr",
    "text":"Saint Etienne"
    }, 
    {
    "lang":"en",
    "text":"Boxing Day"
  }],
    
  "note": [{
    "lang":"en",
    "text":"Observed only in Alsace and Moselle"
  }],
    
  "flags": [
    "REGIONAL_HOLIDAY"
  ],
  
  "holidayType":"public_holiday"
}]
ParameterDescriptionMandatory
dateDate on which holiday takes place.
Parameter dayOfWeek specifies numerical value of week day. Monday=1, Tuesday=2, ..., Saturday=6, Sunday=7.
Yes
dateToIn case holiday takes place on more than 1 day, this is the last day of holiday duration. Previous parameter date is the first day of holiday duration. No
observedOnSpecifies the date on which holiday is observed. If missing holiday is observed on date specified in date parameter. No
nameOne or more names for the given holiday. Every name has a ISO 639-1 language code to specify the language.Yes
noteOne or more notes for the given holiday. Every note has a ISO 639-1 language code to specify the language.No
flagsOne or more flags for the given holiday. Possible flags are:
  • SHOP_CLOSING_DAY - shops are closed on this day.
  • REGIONAL_HOLIDAY - holiday does not take place in the whole country or region but only in some parts of it.
  • ADDITIONAL_HOLIDAY - holiday is an additional holiday given because main holiday takes place on Saturday or Sunday.
  • PART_DAY_HOLIDAY - holiday does not take place during the whole day.
No
holidayTypeType of the holiday. Possible values are:
  • public_holiday - public holidays
  • observance - observances, not a public holidays
  • school_holiday - school holidays
  • other_day - other important days e.g. Mother's day, Father's day etc
  • extra_working_day - extra working days. This day takes place mostly on Saturday or Sunday and is substituted for extra public holiday.
Yes

Operation isPublicHoliday

Returns flag if given day is public holiday in given country.
{
  "isPublicHoliday": true
}

Operation isWorkDay

Returns flag if given day is work day in given country.
{
  "isWorkDay": true
}

Operation getSupportedCountries

Returns the list of supported countries in form:
[{
  "countryCode": "aus",
  
  "regions": [
    "act",
    "qld",
    "nsw",
    "nt",
    "sa",
    "tas",
    "vic",
    "wa"
  ],
  
  "holidayTypes": [
    "public_holiday"
  ],
  
  "fullName": "Australia",
  
  "fromDate": {
    "day": 1,
    "month": 1,
    "year": 2011
  },
  
  "toDate": {
    "day": 31,
    "month": 12,
    "year": 32767
  }
}]
ParameterDescriptionMandatory
countryCodeISO 3166-1 alpha-3 country code.Yes
regionsISO 3166-2 list of regions in the country. This list can be empty if holiday dates do not differ across country.Yes
holidayTypesList of holiday types available for this country. Possible values are:
  • public_holiday - public holidays
  • observance - observances, not a public holidays
  • school_holiday - school holidays
  • other_day - other important days e.g. Mother's day, Father's day etc
  • extra_working_day - extra working days. This day takes place mostly on Saturday or Sunday and is substituted for extra public holiday.
Yes
fullNameDisplay name of the country.Yes
fromDateDate from which holidays are available for this country.Yes
toDateDate to which holidays are available for this country.Yes

Operation whereIsPublicHoliday

Returns the list of countries where given date is a public holiday.
[{
  "countryCode":"can",
	
  "countryFullName":"Canada",
	
  "holidayName": [{
    "lang":"en",
    "text":"Victoria Day"
    },
    {
    "lang":"fr",
    "text":"Fête de la Reine ou Journée nationale des Patriotes"
  }]
}]
ParameterDescriptionMandatory
countryCodeISO 3166-1 alpha-3 country code.Yes
countryFullNameDisplay name of the country.Yes
holidayNameOne or more names for the given holiday. Every name has a ISO 639-1 language code to specify the language.Yes
Enrico is powered by Kayapo