Get one user's time off records
Get time off records for one staff, the system will return all the time off records of this worker in the languge of choice. And you can filter them by a date period.
Get one user's time off records
GET /get-ee-time-off
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
customer_id
string
The unique Marco identifier for your company.
lang
string
Leave type language
email
string
Email of the user
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
Parameter Example
{
"customer_id": "1",
"lang": "EN",
"search_start_date": null,
"search_end_date": null,
"email": "[email protected]",
"unit_type": "Days"
}Response
[
{
"id": 930,
"customer_id": 1,
"leave_type": 101,
"start_date": "2024-09-26",
"end_date": "2024-09-27",
"notes": "",
"doc_list": [],
"decision_time": null,
"decision": "Approve",
"reject_notes": "",
"user": 2232,
"platform_email": "[email protected]",
"leave_type_name": "Annual Leave",
"leave_type_notes": "Employees with 1-10 years of work experience are entitled to 5 days; 10-20 years of work experience, entitled to 10 days; 20 or more years of work experience, entitled to 15 days. Offical holidays and public holidays are not counted in annual leave.",
"unit_type": "Days",
"total": 2
},
{
"id": 931,
"customer_id": 1,
"leave_type": 101,
"start_date": "2024-10-23",
"end_date": "2024-10-29",
"notes": "",
"doc_list": [],
"decision_time": null,
"decision": "Approve",
"reject_notes": "",
"user": 2232,
"platform_email": "[email protected]",
"leave_type_name": "Annual Leave",
"leave_type_notes": "Employees with 1-10 years of work experience are entitled to 5 days; 10-20 years of work experience, entitled to 10 days; 20 or more years of work experience, entitled to 15 days. Offical holidays and public holidays are not counted in annual leave.",
"unit_type": "Days",
"total": 5
},
{
"id": 932,
"customer_id": 1,
"leave_type": 423,
"start_date": "2024-10-30",
"end_date": "2024-11-01",
"notes": "",
"doc_list": [],
"decision_time": null,
"decision": "",
"reject_notes": "",
"user": 2232,
"platform_email": "[email protected]",
"leave_type_name": "Annual Leave",
"leave_type_notes": "The annual leave only entitled to employees who has worked for employer for at least 3 months, employee can only apply for annual leave after working for 3 months. The days of annual leave may related to year of service, the 1st year entitled to 7 days, and one more day for years after, at the 8th year and afterwards, 14 days maximum",
"unit_type": "Days",
"total": 1.5
},
{
"id": 933,
"customer_id": 1,
"leave_type": 101,
"start_date": "2024-11-12",
"end_date": "2024-11-13",
"notes": "",
"doc_list": [],
"decision_time": null,
"decision": "Approve",
"reject_notes": "",
"user": 2232,
"platform_email": "[email protected]",
"leave_type_name": "Annual Leave",
"leave_type_notes": "Employees with 1-10 years of work experience are entitled to 5 days; 10-20 years of work experience, entitled to 10 days; 20 or more years of work experience, entitled to 15 days. Offical holidays and public holidays are not counted in annual leave.",
"unit_type": "Days",
"total": 2
},
{
"id": 947,
"customer_id": 1,
"leave_type": 423,
"start_date": "2024-11-02",
"end_date": "2024-11-02",
"notes": "",
"doc_list": [],
"decision_time": null,
"decision": "",
"reject_notes": "",
"user": 2232,
"platform_email": "[email protected]",
"leave_type_name": "Annual Leave",
"leave_type_notes": "The annual leave only entitled to employees who has worked for employer for at least 3 months, employee can only apply for annual leave after working for 3 months. The days of annual leave may related to year of service, the 1st year entitled to 7 days, and one more day for years after, at the 8th year and afterwards, 14 days maximum",
"unit_type": "Days",
"total": 0.625
},
{
"id": 950,
"customer_id": 1,
"leave_type": 101,
"start_date": "2024-09-18",
"end_date": "2024-09-18",
"notes": "",
"doc_list": [],
"decision_time": null,
"decision": "Approve",
"reject_notes": "",
"user": 2232,
"platform_email": "[email protected]",email": "[email protected]"
},
"leave_type_name": "Annual Leave",
"leave_type_notes": "Employees with 1-10 years of work experience are entitled to 5 days; 10-20 years of work experience, entitled to 10 days; 20 or more years of work experience, entitled to 15 days. Offical holidays and public holidays are not counted in annual leave.",
"unit_type": "Days",
"total": 0.046875
},
{
"id": 951,
"customer_id": 1,
"leave_type": 101,
"start_date": "2024-09-06",
"end_date": "2024-09-06",
"notes": "Testing",
"doc_list": [],
"decision_time": 1725667200000,
"decision": "Approve",
"reject_notes": "",
"user": 2232,
"platform_email": "[email protected]",
"leave_type_name": "Annual Leave",
"leave_type_notes": "Employees with 1-10 years of work experience are entitled to 5 days; 10-20 years of work experience, entitled to 10 days; 20 or more years of work experience, entitled to 15 days. Offical holidays and public holidays are not counted in annual leave.",
"unit_type": "Days",
"total": 1
}
]{
"error": "Invalid request"
}Last updated