Skip to main content

Endpoint

POST /api/openapi/v1/data/events

Overview

The data ingestion API uses a schema-free approach. Classify data by event_type and send any JSON structure in the payload field.

Request

Headers

HeaderRequiredDescription
AuthorizationYesBearer {API_KEY}
Content-TypeYesapplication/json

Body

{
  "events": [
    {
      "event_type": "uwb_location",
      "event_id": "loc_20260412_001",
      "source": "virtual_store_server",
      "payload": {
        "customer_id": "cust_123",
        "position": {"x": 12.5, "y": 8.3, "z": 1.2},
        "zone": "produce_section",
        "timestamp": "2026-04-12T10:30:00Z"
      }
    }
  ]
}
FieldTypeRequiredDescription
eventsarrayYesEvent array (max 1,000 per request)
events[].event_typestringYesEvent type (e.g., uwb_location, pos_transaction)
events[].event_idstringNoIdempotency key
events[].sourcestringNoData source identifier
events[].payloadobjectYesActual data (free-form JSON)

Response

{
  "success": true,
  "data": {
    "received": 2,
    "event_ids": ["uuid-1", "uuid-2"]
  }
}

Event Type Examples

UWB Location Tracking

{"event_type": "uwb_location", "payload": {"customer_id": "cust_123", "position": {"x": 12.5, "y": 8.3}, "zone": "electronics", "timestamp": "2026-04-12T10:30:00Z"}}

POS Transaction

{"event_type": "pos_transaction", "payload": {"transaction_id": "TXN001", "items": [{"sku": "A001", "qty": 1, "price": 298}], "total": 298, "timestamp": "2026-04-12T10:35:00Z"}}

Zone Trigger

{"event_type": "zone_trigger", "payload": {"customer_id": "cust_123", "zone": "deli_section", "trigger_type": "enter", "timestamp": "2026-04-12T10:32:00Z"}}

Idempotency

Include event_id to prevent duplicate events. Re-sending with the same event_id is a no-op.

Query Events

GET /api/openapi/v1/data/events?event_type=pos_transaction&from=2026-04-01&to=2026-04-12&limit=100
Specific event type schemas are defined per project in consultation with the OneSight team. The examples above are based on the smart retail scenario.