/api/v1/location-events/options
Get location event setup options
Get the colors, icons, field types, built-in fields, and statuses available for location event definitions.
Last updated
Request
GET /api/v1/location-events/options
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.
Query parameters
This endpoint does not use query parameters.
Example
Set ASSETCENTER_API_TOKEN as described in the quick start.
curl --request GET "https://my.assetcenter.app/api/v1/location-events/options" \
--header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
--header "Accept: application/json"
Response
200 OK. Choice arrays and built-in/default field lists are abbreviated with "…" below; the actual response returns the complete choices.
{
"data": {
"groups": [
{
"value": "location",
"label": "Location Events",
"builtin_fields": [
{
"id": null,
"slug": "date",
"name": "Date",
"datatype": "date",
"size": "half",
"is_system": true,
"is_required": false,
"visible": true,
"has_values": false
},
"…"
],
"default_fields": [
{
"id": null,
"slug": "date",
"name": "Date",
"datatype": "date",
"size": "half",
"is_system": true,
"is_required": false,
"visible": true,
"has_values": false
},
"…"
]
}
],
"colors": [
"slate",
"gray",
"red",
"green",
"blue",
"…"
],
"icons": [
"box",
"calendar",
"user",
"map-pin",
"…"
],
"field_types": [
{
"value": "text",
"label": "Text"
},
{
"value": "number",
"label": "Number"
},
"…"
],
"categories": [],
"cost_categories": [],
"defaults": {
"icon": "map-pin",
"color": "gray",
"visible": true,
"limit_to_categories": [],
"cost_category_id": null,
"sets_status": null
},
"statuses": [
"active",
"inactive"
]
}
}
Behavior and constraints
Options contain one group, location, with its builtin_fields and default_fields (date, time, and notes); supported color names, recommended icon names, and field type values and labels; creation defaults; and the statuses accepted by sets_status. categories and cost_categories are always empty because those restrictions apply only to asset events. Fields in built-in and default lists include read-only is_system and has_values; remove those when constructing write payloads. 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.