---
title: Get public holidays
slug: api/get-public-holiday
description: API reference for GET endpoint: Get public holidays.
docTags: 
createdAt: 2023-12-01T09:43:55.232Z
---

:::hint{type="info"}
<font color="#2166ae">**GET**</font>**&#x20;/api/public-holiday**
:::

Gets all default public holidays for a given country.



**Request**

***

<font color="#00a2e9">**Query parameters**</font>

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**country** <font color="#a7b4c3">string Required</font>
:::

:::VerticalSplitItem
The country, formatted as an [ISO Alpha-2 code](https://www.iban.com/country-codes).

Example: JP
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**customer\_id** <font color="#a7b4c3">string Required</font>
:::

:::VerticalSplitItem
The unique Marco identifier for your company.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**start\_date** <font color="#a7b4c3">string Optional</font>
:::

:::VerticalSplitItem
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
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**end\_date** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
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**

***

::::CodeDrawer{title="Example" isResponseExpanded="true"}
:::CodeblockTabsExamples
```curl
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'
```

```python
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)
```
:::

:::CodeblockTabsResponses
```javascript
{
  "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)**

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**&#x7B;public\_holiday}** <font color="#a7b4c3">object</font>
:::

:::VerticalSplitItem
The public holidays.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;public\_holiday}.**items** <font color="#a7b4c3">array\[object\]</font>
:::

:::VerticalSplitItem
Contains a list of public holidays based on the request parameters.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
items.**id** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The unique Marco identifier for the public holiday.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
items.**start\_date** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
The start date of the public holiday, formatted as YYYY-MM-DD.

Example: 2023-12-31
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
items.**end\_date** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
The end date of the public holiday, formatted as YYYY-MM-DD.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
items.**country** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The unique Marco identifier for the country associated to the public holiday.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
items.**created\_at** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
Unix timestamp for the public holiday's creation date.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
items.**updated\_at** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
Unix timestamp for the public holiday's update date.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
items.**deleted\_at** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
Unix timestamp for the public holiday's deletion date.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
items.**last\_modified\_by** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The unique Marco identifier for the user who last modified the public holiday.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
items.**dictionary** <font color="#a7b4c3">array\[object\]</font>
:::

:::VerticalSplitItem
Contains the public holiday name and its corresponding notes in different languages.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
dictionary.**key** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The type of data.

Valid values: data, notes
"data" stores the public holiday name, while "notes" stores the public holiday notes.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
dictionary.**lang** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The language that the data or notes are stored in.

Example: EN
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
dictionary.**value** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The field value for the data or notes.

Example: National Day
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;public\_holiday}.**itemsReceived** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The number of public holidays returned in the request.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;public\_holiday}.**curPage** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The current page number.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;public\_holiday}.**nextPage** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The following page number.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;public\_holiday}.**prevPage** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The previous page number.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;public\_holiday}.**itemsTotal** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The total number of public holidays in the response. This number should be the same as `itemsReceived`.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;public\_holiday}.**pageTotal** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The total number of pages.
:::
::::

***

