Returns a paginated list of asset categories for the organisation. Use the optional search parameter to filter categories by name.
GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_categoriesPath Parameters
organisation_iduuidrequired
The ID of the organisation.
Query Parameters
searchstring
Filter categories by name.
page_indexnumber
Current page index
Default
1Min
1item_per_pagenumber
Number of items per page
Default
20Max
100Response Body
A paginated list of asset categories for the organisation.
dataobject
itemsobject[]
iduuid
Unique identifier of the asset category.
namestring
Display name of the asset category.
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/asset_categories" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "items": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Laptop" } ], "page_index": 1, "item_per_page": 20, "total_items": 1, "total_pages": 1 }}Creates a new asset category for the organisation. Category names must be unique within the organisation.
POST
https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_categoriesPath Parameters
organisation_iduuidrequired
The ID of the organisation.
Request Body
namestringrequired
Display name of the asset category. Must be unique within the organisation.
Response Body
The newly created asset category.
dataobject
iduuid
Unique identifier of the asset category.
namestring
Display name of the asset category.
Example
curl -X POST \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_categories" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \ -H "Content-Type: application/json" \ -d '{ "name": "Laptop" }'Response
{ "data": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Laptop" }}