/api/v1/subscription-categories/{category}
Get a subscription category
Read subscription category settings and custom-field definitions.
Last updated
Request
GET /api/v1/subscription-categories/{category}
Requires subscription-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 a subscription category in the token’s organization. Asset 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 --request GET "https://my.assetcenter.app/api/v1/subscription-categories/7" \
--header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
--header "Accept: application/json"
Response
200 OK. Illustrative response; IDs and values will differ.
{
"data": {
"id": 7,
"name": "Software",
"description": null,
"can_delete": true,
"custom_fields": [
{
"id": 31,
"category_id": 7,
"name": "License reference",
"type": "text",
"is_required": false,
"has_values": false,
"can_delete": true,
"can_change_type": true
}
],
"contract_lookahead_days": "dont_notify"
}
}
description may be null. contract_lookahead_days uses values from category options. custom_fields contains every field definition, including any existing editor fields.
Behavior and constraints
can_delete is false if any subscription 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 subscription 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 subscriptions. 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.