Situation #
A vehicle disappears from the live view or its track has a hole: the phone had no signal, the battery ran out, or the driver closed the app. The Fleet screens arrive with the web console, so the checks use the API.
What keeps working #
- The shift or trip itself, and every record the driver enters.
- Positions the phone kept while offline. It uploads them later in batches.
- Repeated uploads. A batch sent twice stores each position once.
Steps in order #
- Ask the driver to open the app with signal. The phone sends what it holds with
POST /fleet/positions, up to 1,000 fixes per batch, each with adevice_idand aseqnumber. - Read the answer if you are testing:
accepted,duplicates,rejected(each with the reason) and thetrackingstate. A position with the samedevice_idandseqas one already stored counts underduplicatesand changes nothing. - Check that a shift or trip is open for the driver or the vehicle. Without one, positions come back in
rejectedwith "Tracking runs only during a shift or a trip." Start the trip withPOST /fleet/tripsor have the driver start the shift, then upload again. - Look at the track:
GET /fleet/assets/{id}/positions(addfromandtoto widen the default last 24 hours). The answer lists fixes in time order withgaps, the number of stretches longer than five minutes between consecutive fixes. - Accept the gap where it stays. Late positions fill it when the phone uploads. Positions that never reached the server cannot be recreated.
How to confirm it worked #
GET /fleet/assets/{id}/positionsshows fixes inside the stretch and a lowergapscount.GET /fleet/liveshows the vehicle's latest position andlast_ping_at. A late batch updates it only when it holds something newer than what is stored.
What to do afterwards #
- Treat
estimated_distance_m(andestimated_distance_display) as an estimate. It sums straight lines between good fixes, so a gap shortens it. - The odometer comes from a typed reading with
POST /fleet/assets/{id}/meters, and positions never write it. Ask the driver to enter the reading at the end of the shift. - Tell drivers to keep location permission on and the app open during a shift. See "Live map, consent and gaps".
Technical details
- Fixes with accuracy worse than 100 meters are left out of the distance estimate.
- A latitude outside -90 to 90 or a longitude outside -180 to 180 is rejected as outside the range of Earth coordinates.
- Send exactly one of
asset_idorperson_idper batch.sourceisphone,http_trackerorhardware. - Needs the
dispatch_fleetlicense flag for writes.