Get staff's public holiday

In Marco system, we can assign different public holidays to worker. This endpoint will return the public holidays of one worker.

Get worker's public holiday

GET /get-ee-public-holidays

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Required
Description

email

string

Account email of the user

customer_id

number

The unique Marco identifier for your company

lang

string

This feature allows users from different linguistic backgrounds to interact with the system in their native or preferred language, enhancing user experience and accessibility. Now the system only has English and Chinese language. Format as "EN" or "ZH".

search_start_date

date

Start date for the date range filter, formatted as YYYY/MM/DD. Only public holidays after the selected start date will be returned.

search_end_date

date

End date for the date range filter, formatted as YYYY/MM/DD. Only public holidays before the selected end date will be returned.

pagination

json

Each page returns 50 records. By defualt, the first page data is returned. Example: {"page":2}

unit_type

string

which response type do you want to receive? Format as: "Period" or "Days" If it is empty, default as "Days". Then it will return public holidays in date format. Else it will return date period.

Parameter Example

{
  "customer_id": "1",
  "email": "[email protected]",
  "search_start_date": "2024-01-01",
  "search_end_date": "2024-06-01",
  "pagination": "",
  "lang": "EN",
  "unit_type":"Days"
}

Response

//if unit_type is Days:
{
    "itemsReceived": 10,
    "curPage": 1,
    "nextPage": null,
    "prevPage": null,
    "offset": 0,
    "itemsTotal": 10,
    "pageTotal": 1,
    "items": [
        {
            "id": 48384,
            "customer_id": 1,
            "date": "2024-02-10",
            "public_holiday": 319,
            "country": "CN",
            "user": 2232,
            "public_holiday_name": "Chinese Lunar New Year's Day",
            "platform_email": "[email protected]"
        },
        {
            "id": 48385,
            "customer_id": 1,
            "date": "2024-02-11",
            "public_holiday": 319,
            "country": "CN",
            "user": 2232,
            "public_holiday_name": "Chinese Lunar New Year's Day",
            "platform_email": "[email protected]"
        },
        {
            "id": 48386,
            "customer_id": 1,
            "date": "2024-02-12",
            "public_holiday": 319,
            "country": "CN",
            "user": 2232,
            "public_holiday_name": "Chinese Lunar New Year's Day",
            "platform_email": "[email protected]"
        },
        {
            "id": 48387,
            "customer_id": 1,
            "date": "2024-02-13",
            "public_holiday": 319,
            "country": "CN",
            "user": 2232,
            "public_holiday_name": "Chinese Lunar New Year's Day",
            "platform_email": "[email protected]"
        },
        {
            "id": 48388,
            "customer_id": 1,
            "date": "2024-02-14",
            "public_holiday": 319,
            "country": "CN",
            "user": 2232,
            "public_holiday_name": "Chinese Lunar New Year's Day",
            "platform_email": "[email protected]"
        },
        {
            "id": 48389,
            "customer_id": 1,
            "date": "2024-02-15",
            "public_holiday": 319,
            "country": "CN",
            "user": 2232,
            "public_holiday_name": "Chinese Lunar New Year's Day",
            "platform_email": "[email protected]"
        },
        {
            "id": 48390,
            "customer_id": 1,
            "date": "2024-02-16",
            "public_holiday": 319,
            "country": "CN",
            "user": 2232,
            "public_holiday_name": "Chinese Lunar New Year's Day",
            "platform_email": "[email protected]"
        },
        {
            "id": 48391,
            "customer_id": 1,
            "date": "2024-02-17",
            "public_holiday": 319,
            "country": "CN",
            "user": 2232,
            "public_holiday_name": "Chinese Lunar New Year's Day",
            "platform_email": "[email protected]"
        },
        {
            "id": 17828,
            "customer_id": 1,
            "date": "2024-05-01",
            "public_holiday": 1703,
            "country": "SG",
            "user": 2232,
            "public_holiday_name": "Labor Day",
            "platform_email": "[email protected]"
        },
        {
            "id": 17829,
            "customer_id": 1,
            "date": "2024-05-22",
            "public_holiday": 1704,
            "country": "SG",
            "user": 2232,
            "public_holiday_name": "Vesak Day",
            "platform_email": "[email protected]"
        }
    ]
}

//if unit_type is Period:
{
    "itemsReceived": 3,
    "curPage": 1,
    "nextPage": null,
    "prevPage": null,
    "offset": 0,
    "itemsTotal": 3,
    "pageTotal": 1,
    "items": [
        {
            "id": 17828,
            "customer_id": 1,
            "public_holiday": 1703,
            "country": "SG",
            "user": 2232,
            "public_holiday_name": "Labor Day",
            "platform_email": "[email protected]",
            "start_date": "2024-05-01",
            "end_date": "2024-05-01"
        },
        {
            "id": 17829,
            "customer_id": 1,
            "public_holiday": 1704,
            "country": "SG",
            "user": 2232,
            "public_holiday_name": "Vesak Day",
            "platform_email": "[email protected]",
            "start_date": "2024-05-22",
            "end_date": "2024-05-22"
        },
        {
            "id": 48384,
            "customer_id": 1,
            "public_holiday": 319,
            "country": "CN",
            "user": 2232,
            "public_holiday_name": "Chinese Lunar New Year's Day",
            "platform_email": "[email protected]",
            "start_date": "2024-02-10",
            "end_date": "2024-02-17"
        }
    ]
}

Last updated