TMS integration
This guide shows how a TMS (or any load management system) keeps one Load Market tracking per load.
Map the load lifecycle
| In your TMS | Call |
|---|---|
| Load dispatched, driver phone known | POST /create-tracking |
| Stops or reference changed | PATCH /edit-tracking |
| Show position, ETA, POD | Webhooks, or GET /get-tracking |
| Load delivered | PATCH /stop-tracking |
| Load canceled before pickup | DELETE /delete-tracking |
| End-of-day reconciliation | GET /get-all-tracking-items |
1. Create the tracking on dispatch
Store the returned trackingId on the load. Use your load id as customId - it is echoed back on every
read and in webhooks, so you can match updates without a lookup table.
Code
Tips:
Idempotency-Key: one key per create attempt you mean (your load id plus a dispatch counter works). Retry a request that timed out with the SAME key - a create that went through answers its first response again, so nothing is created or billed twice. See Errors.- Expiration: set
expDateto the planned delivery plus a buffer (at most 10 days ahead). More than 5 days counts as 2 tracking requests. createdByTmsshows your dispatcher to the driver in the app, so the driver knows who is asking. Add"hideChat": trueif you do not want in-app chat.customStopIdon each stop lets you match arrival confirmations to your stop records.- Multi-tenant TMS: every customer organization has its own client key. Store it per customer (encrypted) and send it with that customer's requests.
- Driver without the app: the response says
Pending tracking createdanddriverHasApp: false. The driver gets an SMS. Show "waiting for driver" in your UI. WhendriverInvite.smsStatusturnsundeliverableoroptedOut(also the webhook eventsdriver.sms_undeliverable/driver.sms_opted_out), the text cannot reach the driver: senddriverInvite.appLinkanother way, or call the driver. - Truck with an ELD: when the organization has ELD tracking enabled, send
trackingSourceeldorhybridwith the carrier's DOT number and the truck number. The status isrequestElduntil the carrier approves by email - show "waiting for carrier". See ELD and Hybrid tracking.
2. Keep it in sync
When stops change, send the full new stop list - stopLocations replaces the old one:
Code
A stop that is still the same stop keeps its arrival/departure status and its Smart Arrival status: the same
customStopId within 100 m of where it was. Without ids only the same position and place count, and not when
stops were removed or inserted and another stop is at the same place (a round trip's return is never taken for
its pickup). Send customStopId on every stop, then you can insert, remove or reorder stops without losing the
confirmed ones. A stop that moved to another address starts over.
expDate, schedule, loadInstructions and emailUpdates cannot be edited. Delete and recreate the
tracking if they must change (the new tracking is billed again).
3. Receive updates
Subscribe to webhooks and update the load from each item:
events- what happened since the last delivery:stop.arrived/stop.departed(with yourcustomStopId),stop.alert_status_changed(a stop turnedlate),driver.rejected,driver.paused,carrier.rejected,document.uploadedand the rest of the event types. Post them to your load's timeline and deduplicate them byid.data.status.value- show the driver's state (see Tracking lifecycle).data.driverCoords- last position andlastUpdate.data.stopLocations[i].locationStatus- arrived / completed per stop.data.stopLocations[i].stopAlertStatusInfo.stopAlertStatus-onTime,tightorlate(PRO),nullwhen it cannot be estimated (for example the driver deleted the app account). A stop withoutexpectedArrivalhasstopAlertStatusInfo: null.data.fraudAlerts.alerts- Potential Fraud Alerts about the driver's phone (PRO). Show them to a person who reviews the load, never act on them automatically.data.driverFiles- BOL / POD uploads.
See Live location via webhooks for a receiver.
4. Finish or cancel
Code
When the tracking time (expDate) runs out, the server finishes the tracking item automatically
(status done, or doneEld for ELD and Hybrid). A pending installation tracking item the driver never accepts is removed by the
server after its tracking time runs out and never appears in history.
5. Reconcile
Once a day compare your open loads with GET /get-all-tracking-items?type=active, and pull finished
tracking items with the daily history sync.
Handle failures
- A create that times out may still have succeeded - retry it with the same
Idempotency-Keyand you get its response instead of a second tracking. Without the header, check the active list for yourcustomIdbefore retrying (creates are billed). - Log
requestIdfrom every error. - Branch on
code, not onmessage- see Errors.

