/api/v1/asset-categories/{category}/position
Reorder an asset category
Move an asset category to a new position in the category list.
Last updated
Request
PUT /api/v1/asset-categories/{category}/position
Requires asset-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 an asset 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 asset 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 --request PUT "https://my.assetcenter.app/api/v1/asset-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.
{
"data": {
"id": 7,
"name": "Vehicles",
"description": null,
"position": 0,
"end_of_life": null,
"useful_life": null,
"eol_lookahead_days": "dont_notify",
"warranty_lookahead_days": "dont_notify",
"can_delete": true,
"custom_fields": []
}
}
Behavior and constraints
Moves the category to the supplied position and renumbers the organization’s asset categories consecutively from 0. Subscription 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.