Guides
Live location via webhooks
This guide builds a webhook receiver that keeps the live position of every load in your database without polling. The example uses Node.js and Express. The same steps apply in any language (see the verification samples in Webhooks).
Design
- Verify the signature on the raw body. Reject anything that fails with
401. - Acknowledge with
204immediately - the endpoint must answer within 7 seconds. - Deduplicate on
webhook-id- retries reuse it. - Apply each item in the array to its tracking, ignoring positions older than what you have.
Receiver
Code
Applying an update
Code
What to expect
- One POST per minute at most, containing every tracking of yours that changed in that minute. A quiet minute sends nothing - "no webhook" means "no change", not "tracking lost".
- Each item carries the latest position at the time of the tick, not every 20-second fix. For the
location history of a load, use
GET /get-reports. - Positions only while live:
driverCoordsisnullbefore the driver accepts, after a rejection and after the tracking finished (see Tracking lifecycle). An ELD tracking has positions from the carrier's approval on, read from the truck's ELD about once a minute. - Statuses can change without a position change (for example
notMovingwhen the truck has not been moving for a while,waitingwhen no new position has arrived for a while, orsettingswhen a phone setting may stop tracking). Show them - they tell your dispatcher to call the driver. driverFilesis included only in updates caused by a new upload.eventssay what happened since the last update (a stop reached, the driver declined or paused, a document uploaded, ...). Deduplicate them byid- see Webhooks.- Final update: after
doneorcancel(doneEldorcancelEldfor ELD and Hybrid) the tracking sends nothing more.
Monitoring
- Alert when your endpoint answers non-2xx or slower than a few seconds - a failed delivery's snapshot is
not redelivered later (its
eventsare, for up to an hour). - If you suspect a gap, read the current state with
GET /get-tracking- it is always authoritative. - During development, drive a test tracking with
POST /test/simulateand watch thewebhook.statusyour endpoint returned. See Test mode.
Last modified on

