Events

Send one or more device events. The same eventId can be retried safely.

POST /v1/device/events

Body.events is a non-empty array of at most 100 objects. The server attaches patientId from the active assignment.

Required headers

X-Device-Id: <device-id>
Authorization: Bearer <device-secret>

Request

POST https://api-dev.zorgassistent.eu/v1/device/events

{
  "events": [
    {
      "eventId": "evt-device-20260913-0900-presented",
      "eventType": "MEDICATION_PRESENTED",
      "occurredAt": "2026-09-13T09:00:12.000Z",
      "scheduleItemId": "71000000-0000-4000-8000-000000000001"
    }
  ]
}

Response

{
  "accepted": ["evt-device-20260913-0900-presented"],
  "duplicates": [],
  "rejected": []
}

Allowed eventType values: DEVICE_READY, DEVICE_ERROR, DEVICE_RECOVERED, MEDICATION_PROCESS_STARTED, MEDICATION_PRESENTED, MEDICATION_REMOVED, MEDICATION_NOT_REMOVED. eventId must be at least 8 characters. A duplicate eventId with the same device, patient and type is returned in duplicates.