Get all workers' public holiday
In Marco system, we can assign different public holidays to worker. This endpoint will return all workers' public holidays.
Get all workers' public holiday
GET /get-all-ee-public-holidays
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
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}
Parameter Example
{
"customer_id": "1",
"search_start_date": null,
"search_end_date": null,
"pagination": "",
"lang": "EN"
}Response
{
"itemsReceived": 50,
"curPage": 1,
"nextPage": 2,
"prevPage": null,
"offset": 0,
"itemsTotal": 376,
"pageTotal": 8,
"items": [
{
"id": 54,
"customer_id": 1,
"date": "2023-11-08",
"public_holiday": 8,
"country": "CN",
"user": 24,
"platform_email": "[email protected]",
"public_holiday_name": "New Year's Day"
},
{
"id": 48,
"customer_id": 1,
"date": "2023-11-08",
"public_holiday": 8,
"country": "CN",
"user": 21,
"platform_email": "[email protected]",
"public_holiday_name": "New Year's Day"
},
{
"id": 49,
"customer_id": 1,
"date": "2023-11-08",
"public_holiday": 8,
"country": "CN",
"user": 2,
"platform_email": "[email protected]",
"public_holiday_name": "New Year's Day"
},
{
...
}
]
}//Token is incorrect
{
"traceId": "d2e8d2c7-2b29-4580-9106-4e2c9383b3fc",
"code": "ERROR_FATAL",
"message": "Please confirm the permissions of the token holder.",
"payload": ""
}Last updated