to navigate · to open See all results
PATCH /api/v1/subscription-categories/{category}

Update a subscription category

Update the supplied category settings while preserving omitted values.

Last updated

Request

PATCH /api/v1/subscription-categories/{category}

Requires subscription-categories:update. 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.

Request body

Provide at least one listed field. PATCH changes only supplied fields; omitted values are preserved.

Field Type Required Description
name string No The category name, up to 255 characters. Must be unique among subscription categories in this organization.
description string or null No An optional description, up to 10,000 characters. Send null to clear it.
contract_lookahead_days string No Contract-expiry notification window. Use a value from category options. Defaults to dont_notify on creation. Cannot be null; use dont_notify to disable notifications.

Requires Idempotency-Key. Generate one key per action and keep it for retries. Successful responses are remembered for 24 hours per token. Idempotency and retries.

Example

Set ASSETCENTER_API_TOKEN as described in the quick start. Replace example IDs with values from your organization. For a retry, reuse the original key instead of generating another UUID.

cURL / Bash
curl --request PATCH "https://my.assetcenter.app/api/v1/subscription-categories/7" \
  --header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
  --header "Accept: application/json" \
  --header "Idempotency-Key: $(uuidgen)" \
  --header "Content-Type: application/json" \
  --data '{"contract_lookahead_days":"12_months"}'

Response

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

JSON
{
  "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": "12_months"
  }
}

The category has the fields described in Get a subscription category. Use the returned category ID as category_id when creating a subscription.

Behavior and constraints

Category names must be unique among subscription categories in this organization. Description can be cleared with null. contract_lookahead_days cannot be null; use dont_notify to disable contract notifications. Category type, organization, display order, and custom fields cannot be set here. Use the dedicated field endpoints to edit definitions.

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. 409 means conflicting key reuse or a data constraint described above.