Reads all Leaves
Changed onReads all Leaves
Request
- Base URLhttps://api.factorialhr.com
- URLhttps://api.factorialhr.com/api/2026-10-01/resources/timeoff/leaves
- Auth
- OAuth 2Authorization code: https://id.factorialhr.com/oauth/authorizeToken URL: https://id.factorialhr.com/api/oauth/token scopes: time_off
- or API key in header x-api-key
Query parameters
Return only the leaves with these ids.
[ "1" ]
Return only the leaves of these employees.
[ "1" ]
Return only the leaves of these leave types. Despite the singular name it takes a list.
[ "36" ]
Return only the leaves that had already started by this date (start date on or before it). Usable on its own; pair it with from for a window.
Return only the leaves that had not finished before this date, meaning they end on or after it or have no end date at all. Usable on its own; pair it with to for a window.
Retrieve only active leaves
Whether to include deleted leaves (not included by default if not specified)
Set to true for leaves that were approved, false for leaves that were rejected. Leave it unset for every leave whatever its decision. Combining approved: true with include_pending: true returns approved and still-pending leaves together.
Set to true to include leaves still awaiting a decision. On its own it returns ONLY the pending ones; alongside approved: true it returns approved and pending together.
Retrieve leave types
Retrieve leave duration
Retrieve the per-day breakdown of the leave's duration (duration_by_day_attributes)
Set to true for leaves whose leave type counts as worked time, false for those that do not. Leave it unset to get both.
Set to true for leaves whose leave type is paid, false for unpaid ones. Leave it unset to get both.
Caps the per-day duration walk at this date. For endless leaves (finish_on = nil) it pins the walk end; for closed leaves whose finish_on sits past this date it truncates the walk. Never extends a leave past its real finish_on. Must fall inside the read window (from/to or overlaps_range_from/overlaps_range_to).
Response
OK
Example response
{
"data": [
{
"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
- info
endpoint added
- info