↑ ↓ to navigate · ↵ to open See all results
GET /api/v1/location-events/{event}

Get a location event definition

Get a location event definition and its fields in the organization attached to your public API key.

Last updated

Request

GET /api/v1/location-events/{event}

Requires location-events:read and an active token creator who remains an administrator of the token’s organization. Location 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.

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 GET "https://my.assetcenter.app/api/v1/location-events/42" \
  --header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
  --header "Accept: application/json"

Response

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

JSON
{
  "data": {
    "id": 42,
    "group": "location",
    "name": "Fire inspection",
    "icon": "map-pin",
    "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": "Inspector",
        "datatype": "text",
        "size": "full",
        "position": 3,
        "is_system": false,
        "is_required": true,
        "visible": true,
        "has_values": false
      }
    ]
  }
}

Behavior and constraints

fields contains the ordered definitions, with id, nullable slug, name, datatype, size, integer position, boolean is_system, is_required, visible, and has_values. has_values is true once a logged event has stored a value for the field. sets_status is active, inactive, or null. can_delete reflects logged history and saved values. An asset or person event ID returns 404. GET bodies are rejected.

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.