v1

latestOpenAPI 3.1.02026-07-26549156879.0 KB
Timeoff > Leave

Creates a Leave

Creates a Leave

post/api/2026-07-01/resources/timeoff/leaves

Request body

employee_idstring required

The employee id of the leave

leave_type_idstring

The leave type id

descriptionstring

The description of the leave

start_onstring required

The valid start date of the leave following the format YYYY-MM-DD

finish_onstring

The valid end date of the leave following the format YYYY-MM-DD

half_daystring

If the leave is in: [beggining_of_day, end_of_day]

start_timestring

The start time of a leave

hours_amount_in_centsinteger

The hours amount in cents of a leave

medical_leave_typeinteger

The medical leave type

effective_onstring

The effective on date of a leave following the format YYYY-MM-DD

medical_discharge_reasonstring

The medical discharge reason of a leave

colegiate_numberinteger

The colegiate number of a leave

has_previous_relapseboolean

If the leave has previous relapse

relapse_leave_idstring

The leave relapse id

relapse_onstring

The leave relapse on date following the format YYYY-MM-DD

accident_onstring

The leave accident on date following the format YYYY-MM-DD

paternity_birth_onstring

The leave paternity birth on date following the format YYYY-MM-DD

Example request

{
  "employee_id": "1",
  "leave_type_id": "36",
  "description": "Annual family vacation",
  "start_on": "2028-09-05",
  "finish_on": "2028-09-05",
  "start_time": "09:00",
  "effective_on": "2024-05-05",
  "medical_discharge_reason": "Illness",
  "colegiate_number": 150,
  "relapse_leave_id": "1",
  "relapse_on": "2028-09-05",
  "accident_on": "2028-09-05",
  "paternity_birth_on": "2028-09-05"
}

Response

CREATED

idstring required

Identifier of the Leave

company_idstring required

Company identifier of the employee of the leave

employee_idstring required

Employee identifier of the leave

start_onstring required

The start date of the leave

finish_onstring

The end date of the leave

half_daystring

Indicates if the leave is taken as a half-day

descriptionstring

A description of the leave

reasonstring

The reason provided by the employee for taking the leave

leave_type_idstring

The identifier for the type of leave

leave_type_namestring

The name of the leave type

approvedboolean

Indicates whether the leave has been approved

employee_full_namestring

The full name of the employee taking the leave

start_timestring

The start time of the leave

hours_amount_in_centsinteger

The total number of hours taken for the leave, represented in cents

updated_atstring required

The updated at date of the leave

created_atstring

The created at date of the leave

deleted_atstring

The date when the leave was deleted

duration_attributesstring

The duration attributes of the leave

days_takennumber required

Number of days taken for paid leave

Example response

{
  "id": "1",
  "company_id": "1",
  "employee_id": "1",
  "start_on": "2028-09-05",
  "finish_on": "2028-09-05",
  "description": "Annual family vacation",
  "reason": "Medical appointment",
  "leave_type_id": "36",
  "approved": true,
  "employee_full_name": "Bob The Boss",
  "start_time": "09:00",
  "hours_amount_in_cents": 800,
  "updated_at": "2028-03-11T17:03:12.000Z",
  "created_at": "2028-03-11T17:03:12.000Z",
  "deleted_at": "2028-03-11T17:03:12.000Z",
  "days_taken": 1
}