This endpoint retrieves a paginated list of time off types available within the specified organisation.
GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/leave_categoriesPath Parameters
organisation_iduuidrequired
The ID of the organisation to retrieve
Query Parameters
page_indexnumber
Current page index
Default
1Min
1item_per_pagenumber
Number of items per page
Default
20Max
100Response Body
A hash with a data property that contains an array of time off type objects and pagination information.
dataobject
itemsobject[]
iduuid
Unique identifier for the time off type.
namestring
The name of the time off type.
unit_typestring
The unit type for this time off type (e.g., days, hours).
page_indexnumber
Current page index
Default
1Min
1item_per_pagenumber
Number of items per page
Default
20Max
100total_itemsnumber
Total items
total_pagesnumber
Total pages
Example
curl -X GET \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/leave_categories" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "items": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Annual Leave", "unit_type": "days" }, { "id": "b2c3d4e5-f6g7-8901-bcde-f23456789012", "name": "Sick Leave", "unit_type": "hours" }, { "id": "c3d4e5f6-g7h8-9012-cdef-345678901234", "name": "Personal Leave", "unit_type": "days" } ], "page_index": 1, "item_per_page": 20, "total_items": 3, "total_pages": 1 }}