Returns a paginated list of asset categories for the organisation. Use the optional search parameter to filter categories by name.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_categoriesPath Parameters
The ID of the organisation.
Query Parameters
Filter categories by name.
Current page index
11Number of items per page
20100Response Body
A paginated list of asset categories for the organisation.
Unique identifier of the asset category.
Display name of the asset category.
Current page index
11Number of items per page
20100Total items
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.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_categoriesPath Parameters
The ID of the organisation.
Request Body
Display name of the asset category. Must be unique within the organisation.
Response Body
The newly created asset category.
Unique identifier of the asset category.
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" }}Updates an existing asset category.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_categories/:asset_category_idPath Parameters
The ID of the organisation.
The ID of the asset category to rename.
Request Body
New display name for the asset category. Must be unique within the organisation.
Response Body
The updated asset category with its new name.
Unique identifier of the asset category.
Display name of the asset category.
Example
curl -X PATCH \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_categories/:asset_category_id" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \ -H "Content-Type: application/json" \ -d '{ "name": "Laptop" }'Response
{ "data": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Laptop" }}Permanently removes an asset category from the organisation. Assets that previously used the category remain intact with their other categories unchanged.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_categories/:asset_category_idPath Parameters
The ID of the organisation.
The ID of the asset category to delete.
Response Body
Returns HTTP 204 No Content on success. The category is permanently removed. Assets that used it remain intact with their other categories unchanged.
Example
curl -X DELETE \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_categories/:asset_category_id" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
This endpoint does not return a response body.