Skip to content
techvia.softwareStart free trial

Track stops

Outcome: your telematics, driver app or script reports arrivals and departures, the TMS timeline shows them, and detention is worked out from the two times by your workspace’s detention settings.

  1. Make a key with loads.read and loads.write. Store it as TMS_KEY.
  2. Read the load to get each stop’s id: GET /api/public/v1/loads/{id} returns stops[] with id, order, type, scheduledLocal, arrivedAt and departedAt.
  3. Record the arrival with PUT /api/public/v1/loads/{id}/stops/{stopId}/arrival. The body { "at": "2026-12-01T09:05:00" } is optional: left out, it means now. With an offset it is that instant; without one it is the local time at the stop’s facility. More than a day ahead is a 422.
  4. Record the departure the same way with .../departure. A departure before any arrival, or before the arrival, is a 422.
  5. Read the load again. arrivedAt and departedAt are filled (UTC), and any detention appears in autoCharges for a key with billing.read or loads.rates.
Terminal window
curl -X PUT "https://tms-api.techvia.software/api/public/v1/loads/$LOAD_ID/stops/$STOP_ID/arrival" \
-H "Authorization: Bearer $TMS_KEY" -H "Content-Type: application/json" \
-d '{"at":"2026-12-01T09:05:00"}'
curl -X PUT "https://tms-api.techvia.software/api/public/v1/loads/$LOAD_ID/stops/$STOP_ID/departure" \
-H "Authorization: Bearer $TMS_KEY" -H "Content-Type: application/json" \
-d '{"at":"2026-12-01T11:30:00"}'
  • The earliest arrival wins (a later one changes nothing) and a stop has one departure (a second changes nothing), so a repeated call is safe.
  • These calls take no rowVersion. A call that collides with another change of the same load at that moment is a 409 (“Retry the call”).
  • An unknown stop or load is 404. The timeline shows “Arrived @ facility (API key: your key name)”.
Was this page helpful?YesNo