/api/v1/person-events/{event}
Get a person event definition
Get a person event definition and its fields in the organization attached to your public API key.
Last updated
Request
GET /api/v1/person-events/{event}
Requires person-events:read 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
-
eventinteger 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 --request GET "https://my.assetcenter.app/api/v1/person-events/42" \
--header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
--header "Accept: application/json"
Response
200 OK. Illustrative values; IDs and positions will differ.
{
"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
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 location 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.