Skip to content

Trips ​

GET /fleet/trips

The trips of one vehicle that overlap a time range. A trip is a continuous journey detected from the vehicle's GPS data, from setting off to stopping.

Query parameters ​

NameTypeRequiredDescription
vehicleIdstringyesVehicle ID.
fromISO-8601 timeyesRange start.
toISO-8601 timeyesRange end. At most 7 days after from.

Not paginated. A response holds up to 1,000 trips. If there were more, meta.truncated is true: split the range and ask again.

Example ​

bash
curl "https://api.routetracks.com/api/v1/partner/v1/fleet/trips?vehicleId=cm1veh0003&from=2026-10-22T00:00:00Z&to=2026-10-23T00:00:00Z" \
  -H "Authorization: Bearer $TOKEN"
json
{
  "data": [
    {
      "id": "8f4b1c2e-71aa-4f1e-9f3e-2a51c0b4d901",
      "vehicleId": "cm1veh0003",
      "startTime": "2026-10-22T01:12:44.000Z",
      "endTime": "2026-10-22T02:31:09.000Z",
      "durationSeconds": 4705,
      "distanceKm": 41.87,
      "start": { "latitude": 6.96701, "longitude": 79.88412, "place": "Peliyagoda, Colombo" },
      "end": { "latitude": 7.08714, "longitude": 80.01405, "place": "Gampaha" },
      "driver": { "id": "cm1drv0007", "name": "Nimal Perera" }
    }
  ],
  "meta": {
    "vehicleId": "cm1veh0003",
    "from": "2026-10-22T00:00:00.000Z",
    "to": "2026-10-23T00:00:00.000Z",
    "count": 1,
    "truncated": false
  }
}

driver is the driver assigned to the vehicle when the trip started, or null.

Errors ​

StatusWhen
400Missing parameter, from after to, or a range over 7 days.
404Unknown vehicle, or the vehicle has no tracker.

Partner API v1