Retrieves all custom field definitions for a specific organisation's asset register, so you know what fields are available before creating or updating assets.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_custom_fieldsPath Parameters
The ID of the organisation.
Query Parameters
Current page index
11Number of items per page
20100Response Body
A hash with a data property that contains an items array of up to the limit of asset custom field definitions, ordered by most recently created first. If the organisation has no custom fields, the array will be empty.
Unique identifier of the asset custom field.
Display name of the custom field. Unique within the organisation (case-insensitive).
The data type of the custom field. Immutable after creation.
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_custom_fields" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "items": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Warranty ID", "field_type": "text" } ], "page_index": 1, "item_per_page": 20, "total_items": 1, "total_pages": 1 }}Renames an existing asset custom field definition. Only the name can be changed — the field type is immutable after creation. All existing values stored on assets for this field remain intact.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_custom_fields/:idPath Parameters
The ID of the organisation.
The ID of the custom field to update.
Request Body
New unique name for the custom field. Must be unique within the organisation (case-insensitive). Maximum 255 characters.
Response Body
The updated asset custom field with its new name.
Unique identifier of the asset custom field.
Display name of the custom field. Unique within the organisation (case-insensitive).
The data type of the custom field. Immutable after creation.
Example
curl -X PATCH \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_custom_fields/:id" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \ -H "Content-Type: application/json" \ -d '{ "name": "Warranty ID" }'Response
{ "data": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Warranty ID", "field_type": "text" }}Permanently deletes a custom field definition and all values stored for that field across every asset in the organisation. This action cannot be undone.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_custom_fields/:idPath Parameters
The ID of the organisation.
The ID of the custom field to delete.
Response Body
Returns HTTP 204 No Content on success. No response body is included.
Example
curl -X DELETE \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/asset_custom_fields/:id" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
This endpoint does not return a response body.