Get public holidays
\<font color="#2166ae">get\</font> /api/public holiday gets all default public holidays for a given country request \<font color="#00a2e9">query parameters\</font> country \<font color="#a7b4c3">string required\</font> the country, formatted as an iso alpha 2 code https //www iban com/country codes example jp customer id \<font color="#a7b4c3">string required\</font> the unique marco identifier for your company start date \<font color="#a7b4c3">string optional\</font> start date for the date range filter, formatted as yyyy/mm/dd only public holidays after the selected start date will be returned example 2023/01/31 end date \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> end date for the date range filter, formatted as yyyy/mm/dd only public holidays before the selected end date will be returned example requests curl 'https //api marcopayroll com/api\ benkock8/api/public holiday?country=pk\&customer id=99\&start date=2023/01/01\&end date=2023/06/30' \\ h 'authorization $auth token'import requests url = "https //api marcopayroll com/api\ benkock8/api/public holiday?country=pk\&customer id=99\&start date=2023/01/01\&end date=2023/06/30" headers = { "accept" "application/json", "authorization" "your auth token" } response = requests get(url, headers=headers) print(response text){ "public holiday" { "items" \[ { "id" 28, "start date" "2022 02 05", "end date" "2022 02 05", "country" 178, "created at" 1660549163339, "updated at" 1660549163339, "deleted at" null, "last modified by" 326, "dictionary" \[ { "key" "data", "lang" "en", "value" "kashmir solidarity day" }, { "key" "data", "lang" "zh", "value" "克什米尔团结日" } ] }, { "id" 27, "start date" "2022 03 23", "end date" "2022 03 23", "country" 178, "created at" 1660549139758, "updated at" 1660549139758, "deleted at" null, "last modified by" 326, "dictionary" \[ { "key" "data", "lang" "en", "value" "pakistan day" }, { "key" "data", "lang" "zh", "value" "巴基斯坦纪念日" } ] }, { "id" 26, "start date" "2022 05 01", "end date" "2022 05 01", "country" 178, "created at" 1660549122938, "updated at" 1660549122938, "deleted at" null, "last modified by" 326, "dictionary" \[ { "key" "data", "lang" "en", "value" "labor day" }, { "key" "data", "lang" "zh", "value" "劳动节" } ] }, { "id" 25, "start date" "2022 05 03", "end date" "2022 05 05", "country" 178, "created at" 1660549106457, "updated at" 1660549106458, "deleted at" null, "last modified by" 326, "dictionary" \[ { "key" "data", "lang" "en", "value" "festival of breaking the fast" }, { "key" "data", "lang" "zh", "value" "斋戒节" } ] } ] "itemsreceived" 4, "curpage" 1, "nextpage" null, "prevpage" null, "itemstotal" 4, "pagetotal" 1, } } response (200) {public holiday} \<font color="#a7b4c3">object\</font> the public holidays {public holiday} items \<font color="#a7b4c3">array\[object]\</font> contains a list of public holidays based on the request parameters items id \<font color="#a7b4c3">integer\</font> the unique marco identifier for the public holiday items start date \<font color="#a7b4c3">string\</font> the start date of the public holiday, formatted as yyyy mm dd example 2023 12 31 items end date \<font color="#a7b4c3">string\</font> the end date of the public holiday, formatted as yyyy mm dd items country \<font color="#a7b4c3">integer\</font> the unique marco identifier for the country associated to the public holiday items created at \<font color="#a7b4c3">string\</font> unix timestamp for the public holiday's creation date items updated at \<font color="#a7b4c3">string\</font> unix timestamp for the public holiday's update date items deleted at \<font color="#a7b4c3">string\</font> unix timestamp for the public holiday's deletion date items last modified by \<font color="#a7b4c3">integer\</font> the unique marco identifier for the user who last modified the public holiday items dictionary \<font color="#a7b4c3">array\[object]\</font> contains the public holiday name and its corresponding notes in different languages dictionary key \<font color="#a7b4c3">integer\</font> the type of data valid values data, notes "data" stores the public holiday name, while "notes" stores the public holiday notes dictionary lang \<font color="#a7b4c3">integer\</font> the language that the data or notes are stored in example en dictionary value \<font color="#a7b4c3">integer\</font> the field value for the data or notes example national day {public holiday} itemsreceived \<font color="#a7b4c3">integer\</font> the number of public holidays returned in the request {public holiday} curpage \<font color="#a7b4c3">integer\</font> the current page number {public holiday} nextpage \<font color="#a7b4c3">integer\</font> the following page number {public holiday} prevpage \<font color="#a7b4c3">integer\</font> the previous page number {public holiday} itemstotal \<font color="#a7b4c3">integer\</font> the total number of public holidays in the response this number should be the same as itemsreceived {public holiday} pagetotal \<font color="#a7b4c3">integer\</font> the total number of pages