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

Update a subscription category field

Update a field label, type, or requirement while protecting stored values.

Last updated

Request

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

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.

field is the numeric ID of a custom field belonging to that category.

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 Field label, 2–255 characters.
type string No One of text, number, date, boolean, yesno, or phone. See the options endpoint for labels.
is_required boolean No Whether a subscription must supply a value. Defaults to false on creation. Always false for boolean fields, even when true is sent.

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/fields/31" \
  --header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
  --header "Accept: application/json" \
  --header "Idempotency-Key: $(uuidgen)" \
  --header "Content-Type: application/json" \
  --data '{"name":"License reference number","is_required":true}'

Response

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

JSON
{
  "data": {
    "id": 31,
    "category_id": 7,
    "name": "License reference number",
    "type": "text",
    "is_required": true,
    "has_values": false,
    "can_delete": true,
    "can_change_type": true
  }
}

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.

Behavior and constraints

A field with stored values can be renamed and have is_required changed, but changing its type returns 409. Stored values include text, zero, a false checkbox, and dates; empty placeholder rows do not block a type change.

Type editor is accepted only when the field already has that type. An unused editor field can be converted to one of the six supported types. A boolean field is always optional, including when its type is unchanged. Changing a field to required does not backfill existing subscriptions. Unsupported fields, including IDs, display order, and actual subscription values, return 422.

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.