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

Reorder a subscription category field

Move a custom field to a new position within its subscription category.

Last updated

Request

PUT /api/v1/subscription-categories/{category}/fields/{field}/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.

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

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 fields in this category 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 IDs with IDs 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/fields/31/position" \
  --header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
  --header "Accept: application/json" \
  --header "Idempotency-Key: $(uuidgen)" \
  --header "Content-Type: application/json" \
  --data '{"position":1}'

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

Response

200 OK. The moved field. Illustrative values.

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

Behavior and constraints

Moves the field within its category and renumbers that category’s fields consecutively from 0. Fields in other categories keep their order. Get a category returns custom_fields in this order, each with its position. Only position is accepted; any other field returns 422. Retry using the same key to replay the original response without moving the field 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 or field 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.