Skip to content

Fleet snapshot (v1) ​

GET /vehicles

The original v1 endpoint. It returns every active vehicle that has a GPS position, with its current location, in one response. It is kept unchanged for existing integrations.

For new integrations, /fleet/positions gives the same live data plus status, ignition, heading and vehicles without a fix, and /fleet/vehicles gives full vehicle details.

Query parameters ​

NameDescription
include=activityTodayAdds today's trips and distance per vehicle (see below).

Example ​

bash
curl "https://api.routetracks.com/api/v1/partner/v1/vehicles" \
  -H "Authorization: Bearer $TOKEN"
json
{
  "data": [
    {
      "id": "cm1veh0003",
      "licensePlate": "WP CAB-1234",
      "licensePlateNormalized": "WPCAB-1234",
      "latitude": 6.927079,
      "longitude": 79.861244,
      "speed": 48,
      "lastGps": "2026-10-23T11:59:52.000Z",
      "typeName": "Isuzu",
      "className": "NPR",
      "driverName": "Nimal Perera",
      "driverPhone": "+94771234567"
    }
  ],
  "meta": {
    "generatedAt": "2026-10-23T12:00:01.000Z",
    "count": 1,
    "staleAfterSeconds": 15
  }
}
  • Optional fields (speed, lastGps, typeName, className, driverName, driverPhone) are left out when empty, not sent as null.
  • licensePlateNormalized is the plate with spaces removed, in upper case, for matching.
  • Vehicles with no GPS fix are not listed.

With include=activityToday ​

json
{
  "data": [ … ],
  "meta": { … },
  "activityToday": {
    "date": "2026-10-23",
    "timezone": "Asia/Colombo",
    "from": "2026-10-22T18:30:00.000Z",
    "to": "2026-10-23T18:30:00.000Z",
    "truncated": false,
    "hasMore": false,
    "vehicles": [
      {
        "vehicleId": "cm1veh0003",
        "licensePlate": "WP CAB-1234",
        "tripCount": 3,
        "totalDistanceMeters": 61240,
        "firstTripStartTime": "2026-10-23T01:10:00.000Z",
        "departureArea": "Peliyagoda, Colombo",
        "lastTripEndTime": "2026-10-23T06:02:00.000Z",
        "endingArea": "Gampaha"
      }
    ]
  }
}

Limits and errors ​

  • 120 calls per minute per client, separate from the /fleet/* limit.
  • Requires the fleet.snapshot.read scope. fleet.data.read is not required.
  • The list is cached for about 12 seconds. A vehicle removed or moved to another organisation drops off within that cache plus a short ownership check, on the order of 24 seconds, not the next full device reload.
  • include=activityToday is cached for the same 12 seconds. activityToday.hasMore is true when the day was cut at the vehicle cap.
  • 503 PARTNER_SNAPSHOT_UNAVAILABLE (with Retry-After) if live data is briefly unavailable.

Partner API v1