Add time-off record
POST /api/apply-ee-time-off
Adds a time-off record to one staff, using the user ID in your system (external ID). The time-off record can be added in your language of choice.
Request
Body parameters
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
leave_type string Required
The leave type.
Example: Sick Leave
lang string Required
The language settings, formatted as an uppercase ISO 639-1 code. The leave type information should be sent in the selected language.
Valid values: EN, ZH
country string Required
The country where the leave will be taken, formatted as an ISO Alpha-2 code.
Example: JP
start_date string Required
The start date of the leave request, formatted as YYYY-MM-DD.
Example: 2023-12-31
end_date string Required
The end date of the leave request, formatted as YYYY-MM-DD.
total_days string Required
The total number of days in the leave request.
notes string Optional
The notes for the time-off record. Typically contains the reason for the leave application.
decision string Optional
The decision for the leave request.
Valid values: Approve, Reject
Example Requests
Response (200)
{time_off_data} object
The time-off record details.
{time_off_data}.id integer
The unique Marco identifier for the staff's time-off record.
{time_off_data}.user integer
The unique Marco identifier for the staff.
{time_off_data}.customer_id integer
The staff's unique identifier in your company's system.
Example: 50
{time_off_data}.leave_type integer
The unique Marco identifier for the leave type.
{time_off_data}.approver integer
The unique Marco identifier for the approver.
{time_off_data}.total_days integer
The total number of days in the leave request.
{time_off_data}.start_date string
The start date of the leave request, formatted as YYYY-MM-DD.
Example: 2023-12-31
{time_off_data}.end_date string
The end date of the leave request, formatted as YYYY-MM-DD.
{time_off_data}.notes string
The notes for the time-off record. Typically contains the reason for the leave application.
{time_off_data}.reject_notes string
The rejection notes for the time-off record, if rejected.
{time_off_data}.decision string
The decision for the leave request.
Valid values: Approve, Reject
{time_off_data}.doc_list array[string]
The supporting documents for the leave application.
{time_off_data}.created_at integer
Unix timestamp for the time-off record's creation date.
{time_off_data}.updated_at integer
Unix timestamp for the time-off record's update date.
{time_off_data}.deleted_at integer
Unix timestamp for the time-off record's deletion date.
{time_off_data}.last_modified_by integer
The unique Marco identifier for the user who last modified the leave item details.
message string
The endpoint response status.