Get all user's leave details
Base on different country leave policy and company leave policy, HR manager will update worker's leave details monthly or annually. This interface return the leave details of all workers in this company.
This endpoint include all the leave details of workers. If you only want to get worker current used leave details, you can set is_active is true.
Get all user's leave details
GET /get-all-ee-leave-details
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
customer_id
string
The unique Marco identifier for your company.
lang
string
Leave item language
unit_type
string
which leave details's unit type do you want to receive? Format as: "Hours" or "Days" If it is empty, default as "Days". *1 day = 8 hours
filter
json
Add is_active filter to get current used leave details Filter items:
is_active: boolean
For Example: {"is_active":true}
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",
"unit_type": "Hours",
"filter": {
"is_active": "true"
},
"pagination":{"page":"1"}
}Response
//If unit_type is “Days”:
{
"itemsReceived": 48,
"curPage": 1,
"nextPage": null,
"prevPage": null,
"offset": 0,
"pageTotal": 1,
"items": [
{
"id": 2318,
"customer_id": 1,
"leave_type": 15,
"entitlement": 187.5,
"effective_date": "2022-03-09",
"carried_expiry_date": null,
"carried": 0,
"notes": "",
"country": "AU",
"user": 3014,
"platform_email": "[email protected]",
"balance": 1,
"leave_type_name": "Annual Leave",
"leave_type_notes": "The employee should be entitled 152 hours each year"
},
{
"id": 2288,
"customer_id": 1,
"leave_type": 15,
"entitlement": 1,
"effective_date": "2024-10-07",
"carried_expiry_date": null,
"carried": 0,
"notes": "",
"country": "AU",
"user": 3014,
"platform_email": "[email protected]",
"balance": 1,
"leave_type_name": "Annual Leave",
"leave_type_notes": "The employee should be entitled 152 hours each year"
},
{
...
}
]
}
//If unit_type is "Hours":
{
"itemsReceived": 48,
"curPage": 1,
"nextPage": null,
"prevPage": null,
"offset": 0,
"pageTotal": 1,
"items": [
{
"id": 2318,
"customer_id": 1,
"leave_type": 15,
"entitlement": 187.5,
"effective_date": "2022-03-09",
"carried_expiry_date": null,
"carried": 0,
"notes": "",
"country": "AU",
"user": 3014,
"platform_email": "[email protected]",
"balance": 8,
"leave_type_name": "Annual Leave",
"leave_type_notes": "The employee should be entitled 152 hours each year"
},
{
"id": 2288,
"customer_id": 1,
"leave_type": 15,
"entitlement": 1,
"effective_date": "2024-10-07",
"carried_expiry_date": null,
"carried": 0,
"notes": "",
"country": "AU",
"user": 3014,
"platform_email": "[email protected]",
"balance": 8,
"leave_type_name": "Annual Leave",
"leave_type_notes": "The employee should be entitled 152 hours each year"
},
{
...
}
]
}{
"error": "Invalid request"
}Last updated