↑ ↓ to navigate · ↵ to open See all results
POST /api/v1/locations/{record}/events

Log a location event

Record one of your organization’s custom location events, with its field values, files, and comments.

Last updated

Request

POST /api/v1/locations/{record}/events

Requires locations:events. Event types that change status (sets_status is not null) also require locations:lifecycle. See token permissions.

Send Authorization: Bearer YOUR_API_TOKEN and Accept: application/json. Send request bodies as JSON with Content-Type: application/json, or as multipart/form-data when uploading attachments. This workflow write requires Idempotency-Key. Reuse the same key only when retrying the same action.

record is the numeric location ID in your token’s organization.

Query parameters

This endpoint does not use query parameters.

Request body

Field Type Usage
event_type_id integer Required. A visible event type from the event options.
event_date string Optional unless the type’s date or time field is required. ISO 8601 timestamp with seconds and an explicit offset, such as 2026-09-01T10:30:00-07:00. Defaults to now.
description string or null Optional unless the type’s notes field is required. Plain text, up to 10,000 characters.
field_values object Optional unless the type has required custom fields. Keys are field IDs from the options; values follow each field’s datatype: number up to ±999,999,999.99, date as YYYY-MM-DD, boolean as true or false, yesno as Yes, No, or N/A, and text types as strings up to 10,000 characters.
attachments[] file array Optional. Up to 10 files, each up to 10 MB: PNG, JPG, PDF, Word (.doc, .docx) or Excel (.xls, .xlsx). Requires a multipart/form-data body.
comments[] string array Optional. Up to 20 comments, each plain text up to 10,000 characters. Works in JSON or multipart bodies.

Fetch available values before choosing IDs. IDs and required fields vary by organization.

Example

Set ASSETCENTER_API_TOKEN as described in the quick start. Replace example record and option IDs with values from your organization. Set IDEMPOTENCY_KEY to a new UUID for this action; keep it for retries.

cURL / Bash
curl --request POST "https://my.assetcenter.app/api/v1/locations/123/events" \
  --header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
  --header "Accept: application/json" \
  --header "Idempotency-Key: $IDEMPOTENCY_KEY" \
  --header "Content-Type: application/json" \
  --data '{"event_type_id":42,"event_date":"2026-10-01T09:30:00-07:00","description":"Logged by our integration.","field_values":{"104":"City fire marshal"},"comments":["Photo on file."]}'

To upload files, send multipart/form-data instead of JSON. Let curl set the Content-Type header, send booleans as 1 or 0, and send field values with bracketed keys.

cURL / Bash
curl --globoff --request POST "https://my.assetcenter.app/api/v1/locations/123/events" \
  --header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
  --header "Accept: application/json" \
  --header "Idempotency-Key: $IDEMPOTENCY_KEY" \
  --form "event_type_id=42" \
  --form "field_values[104]=City fire marshal" \
  --form "attachments[]=@report.pdf"

Response

201 Created. Illustrative response structure. When the event type changes status, person_location_event_ids also contains the status event and state.status shows the new status.

JSON
{
  "data": {
    "resource": "locations",
    "record_id": 123,
    "person_location_event_ids": [
      901
    ],
    "asset_event_ids": [],
    "subscription_event_ids": [],
    "todo": null,
    "space": null,
    "state": {
      "status": "active"
    },
    "attachments_count": 0,
    "comments_count": 1
  }
}

Behavior and constraints

The event is recorded on the location’s timeline with its field values; read them back from the timeline with include[]=fields. Text input is stored as plain text and escaped for display. Field IDs that are hidden, belong to another type, or are unknown return 422, as does a hidden or foreign event_type_id.

When the type’s sets_status is active or inactive, the location’s status changes too and a status event is recorded after the custom event. This follows the same rules as a status change: future timestamps return 422, and a date earlier than a newer status change returns 409. If the location already has that status, only the custom event is recorded.

Attachments and comments are saved on the custom event, and attachments_count and comments_count confirm how many were added. Files are stored privately and count toward your plan’s storage; a request that would exceed it returns 422 with a plan error and changes nothing. If any file fails to save, the whole action is rolled back, including any status change. An Idempotency-Key retry must resend the same files; a different file is a different request and returns 409.

Errors

401 means the token is missing, expired, revoked, or not a customer API token. 403 means a required permission or administrator access is missing. 404 means the record or child record is unavailable in this organization. 422 identifies invalid or unsupported input; inspect the errors object when present. 409 indicates a conflicting state or concurrent change; inspect the message and refresh the record before deciding how to proceed. Reusing an idempotency key with a different method, path, or body also returns 409. 429 means a rate limit was reached. See error handling and rate limits.