↑ ↓ to navigate · ↵ to open See all results
PUT /api/v1/subscription-categories/{category}/position

Reorder a subscription category

Move a subscription category to a new position in the category list.

Last updated

Request

PUT /api/v1/subscription-categories/{category}/position

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.

Query parameters

This endpoint does not use query parameters.

Request body

Send JSON with Content-Type: application/json.

Field Type Required Description
position integer Yes Zero-based destination, from 0 to the number of subscription categories minus 1.

Retry protection

Requires Idempotency-Key: 8–128 letters, numbers, dots, underscores, colons, or hyphens. Reuse the same method, path, body, and key for retries. Successful responses are remembered for 24 hours per token. Conflicting key reuse returns 409. Idempotency and retries.

Example

Replace the example ID with an ID from your organization. Set ASSETCENTER_API_TOKEN as described in the quick start.

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

For retries, reuse the original key instead of generating another UUID.

Response

200 OK. The moved category, in the same shape as get a category. Illustrative values.

JSON
{
  "data": {
    "id": 7,
    "name": "Software",
    "description": null,
    "position": 0,
    "can_delete": true,
    "contract_lookahead_days": "dont_notify",
    "custom_fields": []
  }
}

Behavior and constraints

Moves the category to the supplied position and renumbers the organization’s subscription categories consecutively from 0. Asset categories and other organizations keep their order. List categories returns categories in this order, and each category includes its position. Only position is accepted; any other field returns 422. Retry using the same key to replay the original response without moving the category again.

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 is unavailable in this organization. 422 identifies invalid or unsupported input, including a position outside the list. 429 means a rate limit was reached. Error handling and rate limits. 409 means conflicting key reuse.