API surface. Devices send events through REST (POST /v1/device_events). Registering, attaching and credentialing devices is GraphQL Interface.
Most tracking events start on a device: a handheld scanner at a depot, a sorter tunnel, a smart locker, a vehicle’s telematics unit, a BLE tag in a parcel, or a temperature logger in a ULD. This module gives devices a first-class interface, so their readings arrive as canonical events without a bespoke integration per device vendor.
It is optional in every mode that moves goods: Carrier, Network, 3PL and Fleet.
1. Device
Endpoints:
2. Ingestion
- It accepts up to 1000 events per call.
idis the device’s own event ID, and(device, id)deduplicates, so devices can retry blindly. - The response is
{ accepted, rejected, errors: [{ index, code, message }] }. Events are processed asynchronously, inatorder per device. - Devices that buffer offline send late events with their true
at. Tracking merges them byoccurred_at(chapter 07 §7). - MQTT binding (optional, capability
iot.mqtt). Topicdevices/{device_id}/events, with the same JSON payload, over TLS with mTLS device certificates. It suits constrained devices that cannot do HTTPS batching.
Event types and how they map
Barcodes are matched against
handling_units[].tracking_number, SSCCs, injection.upstream_tracking_number, and AWB or ULD identifiers. An unmatched scan is kept as an unmatched_scan record (GET /v1/device_events?status=unmatched) and retried when a matching shipment appears, which covers data that arrives after the goods.
Every tracking event created from a device has source: "device", and its carrier_metadata holds { device, device_event_id }.
3. Condition monitoring
Handling units can declare limits:- Sensor readings for a unit, from a device attached to it, or to its vehicle or ULD while it is loaded, are checked against its
conditions. - An excursion appends a
tracking_eventwithstatus: "exception"andstatus_detail: "temperature_excursion","shock_detected"or"tilt_detected", and fireshandling_unit.condition_breached. GET /v1/shipments/{id}/conditions?handling_unit=hu_…returns the reading series and excursions, for cold-chain compliance (GDP, for example) and claims.
4. Events
device.created, device.updated, device.deactivated, device.offline (no events for longer than the device type’s heartbeat), device_event.unmatched, handling_unit.condition_breached.