Overview
V2 consolidates trip replay into a single paginated endpoint. EachTripDto covers one continuous movement segment:
| Field | Description |
|---|---|
distance | Trip distance in km |
duration | Trip duration as "hh:mm:ss" (e.g. "00:28:14") |
startAddress / endAddress | Reverse-geocoded start and end addresses |
startTimeUser / endTimeUser | Trip start/end formatted in the user’s configured timezone |
encoded | Google Polyline Algorithm–encoded path string |
url | Ready-to-use Google Static Maps URL for a thumbnail |
points | Array of waypoints with speed, direction, ignition, fuel, and odometer |
V2 uses a single
GET /api/v2/replay/{id} endpoint for all replay requests. The V1 distinction between GetReplayUserTime and GetReplay (UTC vs. user time) no longer applies — V2 always returns both timeUtc and timeUser on each point.Step 1 — Request a date range
Fetch trips for vehicle1000 over one week. Pass from and to as ISO 8601 UTC strings:
Step 2 — Inspect the response
The response is a paginated envelope. Each element initems is a TripDto:
| Field | Type | Description |
|---|---|---|
lat / lng | number | GPS coordinates |
timeUtc | string | Waypoint timestamp (UTC, no Z suffix) |
timeUser | string | Waypoint timestamp in user’s timezone |
speed | number | Speed at this point (km/h) |
direction | number | Heading in degrees (0–359) |
ignition | boolean | Ignition state at this point |
odo | number | Odometer reading (km) |
fuelLevel | integer | Fuel level (%) |
fuelVolume | number | null | Fuel volume (litres) |
Step 3 — Decode the encoded polyline
The encoded field uses the Google Polyline Algorithm format, supported by all major mapping SDKs.
Step 4 — Render on a map
Fetching all pages
For long date ranges, iterate through all pages:Python
Google Static Maps thumbnail
Theurl field is a pre-built Google Static Maps URL. Use it server-side to generate a trip thumbnail without decoding the polyline:
Python
Gotchas
- Distance unit:
distanceis in kilometres in V2 (V1 used metres). - Duration format:
durationis"hh:mm:ss"in V2, not ISO 8601PT...format. - Single endpoint: V2 has one replay endpoint. Both UTC and user-time fields are always returned on each point — no need to choose between
GetReplayandGetReplayUserTime. encodedformat: Google Polyline Algorithm. If your decoder produces invalid coordinates, confirm the encoding with your Telemax contact.