Get all user's time off records

Get time off records for all workers, the system will return all the time off records in the languge of choice. And you also can filter them by a date period.

Get all user's time off records

GET /get-all-ee-time-off

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Required
Description

customer_id

string

The unique Marco identifier for your company.

lang

string

Leave type languade Valid values: EN, ZH

search_start_date

date

Start date of the date range filter, only time-off record start date on or after the selected date will be returned

search_end_date

date

End Date of the date range filter, only time off record start date on or before the selected date will be returned

unit_type

string

which response type do you want to receive? Format as: "Hours" or "Days" If it is empty, default as "Days". *1 day = 8 hours

pagination

json

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

Parameter Example:

{
  "customer_id": "1",
  "lang": "EN",
  "search_start_date": "",
  "search_end_date": "",
  "unit_type": "Hours",
  "pagination":{"page":"1"}
}

Response

{
    "itemsReceived": 50,
    "curPage": 1,
    "nextPage": 2,
    "prevPage": null,
    "offset": 0,
    "itemsTotal": 57,
    "pageTotal": 2,
    "items": [
        {
            "id": 971,
            "customer_id": 1,
            "leave_type": 10,
            "start_date": "2024-09-05",
            "end_date": "2024-09-05",
            "notes": "",
            "doc_list": [],
            "decision_time": 1725343594507,
            "decision": "Reject",
            "reject_notes": "reject",
            "user": 7,
            "platform_email": "[email protected]",
            "leave_type_name": "Bereavement Leave",
            "leave_type_notes": "Employee can be entitled with 3-day paid bereavement leave.",
            "total": 8
        },
        {
            "id": 972,
            "customer_id": 1,
            "leave_type": 10,
            "start_date": "2024-09-05",
            "end_date": "2024-09-05",
            "notes": "",
            "doc_list": [],
            "decision_time": null,
            "decision": "",
            "reject_notes": "",
            "user": 7,
            "platform_email": "[email protected]",
            "leave_type_name": "Bereavement Leave",
            "leave_type_notes": "Employee can be entitled with 3-day paid bereavement leave.",
            "total": 8
        },
        {
            ...
        }
    ]
}

Last updated