API Reference
Time
Get public holidays
get get /api/public holiday gets all default public holidays for a given country request query parameters query parameters country string required string required the country, formatted as an iso alpha 2 code example jp customer id string required string required the unique marco identifier for your company start date string optional string optional 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 string string optional optional 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} object object the public holidays {public holiday} items array\[object] array\[object] contains a list of public holidays based on the request parameters items id integer integer the unique marco identifier for the public holiday items start date string string the start date of the public holiday, formatted as yyyy mm dd example 2023 12 31 items end date string string the end date of the public holiday, formatted as yyyy mm dd items country integer integer the unique marco identifier for the country associated to the public holiday items created at string string unix timestamp for the public holiday's creation date items updated at string string unix timestamp for the public holiday's update date items deleted at string string unix timestamp for the public holiday's deletion date items last modified by integer integer the unique marco identifier for the user who last modified the public holiday items dictionary array\[object] array\[object] contains the public holiday name and its corresponding notes in different languages dictionary key integer integer the type of data valid values data, notes "data" stores the public holiday name, while "notes" stores the public holiday notes dictionary lang integer integer the language that the data or notes are stored in example en dictionary value integer integer the field value for the data or notes example national day {public holiday} itemsreceived integer integer the number of public holidays returned in the request {public holiday} curpage integer integer the current page number {public holiday} nextpage integer integer the following page number {public holiday} prevpage integer integer the previous page number {public holiday} itemstotal integer integer the total number of public holidays in the response this number should be the same as itemsreceived {public holiday} pagetotal integer integer the total number of pages