Timeoff > Leave

Approve alls a Leave

Changed on

Allows authorized users to approve employee time-off requests by directly approving the leave

post/api/2026-10-01/resources/timeoff/leaves/approve_all

Request

  • Base URL
    https://api.factorialhr.com
  • URL
    https://api.factorialhr.com/api/2026-10-01/resources/timeoff/leaves/approve_all
  • Auth
    • OAuth 2
      Authorization code: https://id.factorialhr.com/oauth/authorize
      Token URL: https://id.factorialhr.com/api/oauth/token scopes: time_off
    • or API key in header x-api-key

Request body

idstring required

Identifier of the Leave

Example request

{
  "id": "1"
}

Response

OK

idstring required

Identifier of the Leave

company_idstring required

ID of the company the leave belongs to

employee_idstring required

ID of the employee taking the leave

start_onstring required

First day of the leave

finish_onstring

Last day of the leave (inclusive); null while an open-ended leave has no end yet

half_daystring

Which half of the day a half-day leave covers — beginning_of_day or end_of_day; null for full-day leaves

descriptionstring

Free-text description of the leave

reasonstring

The reason provided by the employee for taking the leave

leave_type_idstring

ID of the leave type this leave is of

leave_type_namestring

Denormalised name of the leave type

approvedboolean

Tri-state approval status — true = approved, false = rejected, null = pending approval

employee_full_namestring

The full name of the employee taking the leave

start_timestring

The start time of the leave

hours_amount_in_centsinteger

Total hours the leave consumes, in hundredths of an hour (e.g. 800 = 8 hours); set for hourly leaves

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. Reflects the summed per-day used total when the per-day breakdown is computed; otherwise the leave's calendar-day duration.

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
}

Changes