Get time-off records for one staff
GET /api/ee-time-off
Gets time-off records for one staff, using the user ID in your system (external ID). The information will be displayed in your language of choice.
Request
Query parameters
lang string Required
The language settings, formatted as an uppercase ISO 639-1 code. The leave item information will be displayed in the selected language.
Valid values: EN, ZH
customer_id integer Required
The unique Marco identifier for your company.
customer_system_id string Required
The staff's unique identifier in your company's system.
Example: 50
filter string Optional
Filter for deleted items. Marco retains deleted items in the system, and you can choose whether deleted items will be returned.
Default: {"is_deleted":false}
search_start_date string Optional
Start date for the date range filter, formatted as YYYY/MM/DD. Only time-off records after the selected start date will be returned.
search_end_date string Optional
End date for the date range filter, formatted as YYYY/MM/DD. Only time-off records before the selected end date will be returned.
Example Requests
Response (200)
A successful response will return an array of objects. Each object contains one time-off record for the staff.
id integer
The unique Marco identifier for the staff's time-off record.
customer_id integer
The unique Marco identifier for the staff's company.
approver integer
The unique Marco identifier for the user who approved the time-off record.
total_days integer
The number of leave days in the time-off record.
start_date string
The start date for the time-off record, formatted as YYYY-MM-DD.
end_date string
The end date for the time-off record, formatted as YYYY-MM-DD.
notes string
The notes for the time-off record. Typically contains the reason for the leave application.
reject_notes string
The rejection notes for the time-off record, if rejected.
decision_time string
Unix timestamp for the approval decision.
decision string
The approval decision.
Valid values: Approve, Reject
doc_list array[string]
The supporting documents for the leave application.
created_at integer
Unix timestamp for the time-off record's creation date.
updated_at integer
Unix timestamp for the time-off record's update date.
deleted_at integer
Unix timestamp for the time-off record's deletion date.
created_by integer
The unique Marco identifier for the user who created the time-off record.
last_modified_by integer
The unique Marco identifier for the user who last modified the time-off record.
{leave_type} object
The leave type metadata.
{leave_type}.id integer
The unique Marco identifier for the leave type.
{leave_type}.country integer
The unique Marco identifier for the leave type's associated country.
{leave_type}.display_order integer
The display order for the leave type, when displayed in a list.
{leave_type}.day_type string
The day type for the leave type.
Valid values: Calendar, Working
{leave_type}.minimum_days integer
Minimum amount of days that should be granted to the staff.
{leave_type}.is_annual_leave boolean
Whether the leave type is an annual leave.
{leave_type}.created_at integer
Unix timestamp for the leave type's creation date.
{leave_type}.updated_at integer
Unix timestamp for the leave type's update date.
{leave_type}.last_modified_by integer
The unique Marco identifier for the user who last modified the leave type.
{leave_type}.deleted_at integer
Unix timestamp for the leave type's deletion date.
{leave_type}.leave_type_name integer
The leave type name.
Example: Sick Leave
{leave_type}.leave_type_notes string
The notes for the leave type.
{user} object
The staff's details.
{user}.id integer
The unique Marco identifier for the staff.
{user}.name integer
The staff's full name.
{user}.email integer
The staff's email, used to log into Marco.
{user}.pic
The staff's profile picture. Returned as a null value.
{user}.customer_system_id string
The staff's unique identifier in your company's system.
Example: 50
{user}.deleted_at integer
Unix timestamp for the time-off record's deletion date.