Workflow Recipes
This page provides common integration workflows and recipes to help you build your application using the Eixam REST API.
SOS Lifecycle Workflow
The SOS lifecycle typically follows these steps:
- Trigger: The device or SDK sends a
POST /sosrequest. - Update: As new telemetry comes in, the incident is updated via
POST /sos. - Notification: When emergency contacts are enabled, the backend notifies them in priority order — an SMS with a tracking link first, escalating to a voice call only if the contact does not acknowledge in time. A short cancel grace window after the incident opens lets an accidental trigger be cancelled before any notification is sent.
- Resolution: Once the incident is handled, use
POST /sos/resolveto close it.
Device Pairing Workflow
To pair a device with a user:
- BLE Scan: The mobile app scans for devices and retrieves the pairing code.
- Registry Check: Check if the device is already registered using
GET /devices. - Pairing: Call
POST /deviceswith the pairing code and hardware ID. - Validation: The backend validates the code and associates the device with the user's session.