to navigate · to open See all results
GET /api/v1/asset-categories/{category}

Get an asset category

Read asset category settings and custom-field definitions.

Last updated

Request

GET /api/v1/asset-categories/{category}

Requires asset-categories:read. The token creator must remain an active administrator of the token’s organization. Category permissions.

Send Authorization: Bearer YOUR_API_TOKEN and Accept: application/json.

category is the numeric ID of an asset category in the token’s organization. Subscription categories are unavailable here.

Query parameters

This endpoint does not use query parameters.

Example

Set ASSETCENTER_API_TOKEN as described in the quick start. Replace example IDs with values from your organization.

cURL / Bash
curl --request GET "https://my.assetcenter.app/api/v1/asset-categories/7" \
  --header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
  --header "Accept: application/json"

Response

200 OK. Illustrative response; IDs and values will differ.

JSON
{
  "data": {
    "id": 7,
    "name": "Vehicles",
    "description": null,
    "end_of_life": null,
    "useful_life": null,
    "eol_lookahead_days": "dont_notify",
    "warranty_lookahead_days": "dont_notify",
    "can_delete": true,
    "custom_fields": [
      {
        "id": 31,
        "category_id": 7,
        "name": "Registration",
        "type": "text",
        "is_required": false,
        "has_values": false,
        "can_delete": true,
        "can_change_type": true
      }
    ]
  }
}

end_of_life is measured in months; useful_life is measured in years. Both are integer or null. Description may be null. Notification fields use values from category options. custom_fields contains every field definition, including any existing editor fields.

Behavior and constraints

can_delete is false if any asset uses the category, regardless of status, or if its fields retain values. These flags describe current data constraints; they do not grant token permissions.

Responses describe the field definition and contain no asset values. has_values includes a stored zero, a false checkbox, or any stored date or text. can_delete and can_change_type describe current data constraints; they do not grant token permissions. Use field IDs as keys in custom_fields when writing assets. Custom-field values.

Errors

401 means the customer bearer token is missing, expired, revoked, or invalid. 403 means the required permission is missing or the token creator is no longer an active organization administrator. 404 means the category or field is unavailable in this organization. 422 identifies invalid or unsupported input. 429 means a rate limit was reached. Error handling and rate limits.