↑ ↓ to navigate · ↵ to open See all results
PUT /api/v1/person-events/{event}/position

Reorder a person event definition

Move a person event definition to a new position in the list.

Last updated

Request

PUT /api/v1/person-events/{event}/position

Requires person-events:update and an active token creator who remains an administrator of the token’s organization. Person event setup and permissions.

Send Authorization: Bearer YOUR_API_TOKEN and Accept: application/json.

Path parameters

event integer Required
Definition ID from list definitions.

Query parameters

This endpoint does not use query parameters.

Request body

Send JSON with Content-Type: application/json.

position integer Required
Zero-based destination, from 0 to the number of definitions minus 1. Hidden definitions count too.

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/person-events/42/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. Illustrative values; IDs and positions will differ.

JSON
{
  "data": {
    "id": 42,
    "group": "person",
    "name": "Badge issued",
    "icon": "user",
    "color": "gray",
    "visible": true,
    "is_system": false,
    "is_global": false,
    "parent_id": null,
    "position": 0,
    "limit_to_categories": [],
    "cost_category_id": null,
    "sets_status": null,
    "can_delete": true,
    "fields": [
      {
        "id": 101,
        "slug": "date",
        "name": "Date",
        "datatype": "date",
        "size": "half",
        "position": 0,
        "is_system": true,
        "is_required": false,
        "visible": true,
        "has_values": false
      },
      {
        "id": 102,
        "slug": "time",
        "name": "Time",
        "datatype": "text",
        "size": "half",
        "position": 1,
        "is_system": true,
        "is_required": false,
        "visible": true,
        "has_values": false
      },
      {
        "id": 103,
        "slug": "notes",
        "name": "Notes",
        "datatype": "text",
        "size": "full",
        "position": 2,
        "is_system": true,
        "is_required": false,
        "visible": true,
        "has_values": false
      },
      {
        "id": 104,
        "slug": null,
        "name": "Badge number",
        "datatype": "text",
        "size": "full",
        "position": 3,
        "is_system": false,
        "is_required": true,
        "visible": true,
        "has_values": false
      }
    ]
  }
}

Behavior and constraints

Moves the definition to the supplied zero-based position and renumbers the person event list consecutively. Asset and location event definitions keep their order. The response contains the moved definition. Refresh the list after reordering. Retry using the same key and original path to recover the original result.

Errors

401 means the customer token is missing, invalid, expired, or revoked, or its creator is inactive. 403 means the required permission or administrator membership is missing. 404 means the definition is unavailable in the token’s organization. 422 means invalid or unsupported input. 429 means the rate limit was reached. Errors and limits. 409 means conflicting idempotency-key reuse or a protected deletion.