Skip to content

Live positions ​

List positions ​

GET /fleet/positions

The latest GPS fix and status of every vehicle that has a GPS tracker. One response holds the whole fleet (not paginated). Data is refreshed about every 12 seconds.

Query parameters ​

NameTypeDescription
vehicleIdsstringComma-separated vehicle IDs (max 500).
groupIdstringOnly vehicles in this group.
statusstringComma-separated statuses, for example moving,idle.

Status ​

StatusMeaning
movingSpeed is 5 km/h or more, or the device reports movement.
idleEngine on, but speed under 5 km/h.
stoppedEngine off, or speed under 5 km/h when the device doesn't report the engine state.
offlineNo fix for more than 2 hours (meta.offlineAfterSeconds). The last known position is still returned.
no_dataThe tracker has never reported a position. Position fields are null.

The rules are applied in order, top to bottom: offline and no_data take priority over the rest.

Example ​

bash
curl "https://api.routetracks.com/api/v1/partner/v1/fleet/positions?status=moving,idle" \
  -H "Authorization: Bearer $TOKEN"
json
{
  "data": [
    {
      "vehicleId": "cm1veh0003",
      "licensePlate": "WP CAB-1234",
      "status": "moving",
      "latitude": 6.927079,
      "longitude": 79.861244,
      "speedKmh": 48,
      "headingDeg": 312,
      "ignition": true,
      "lastFix": "2026-10-23T11:59:52.000Z",
      "ageSeconds": 9,
      "driverName": "Nimal Perera"
    },
    {
      "vehicleId": "cm1veh0009",
      "licensePlate": "WP LM-9081",
      "status": "idle",
      "latitude": 7.290572,
      "longitude": 80.633728,
      "speedKmh": 0,
      "headingDeg": null,
      "ignition": true,
      "lastFix": "2026-10-23T11:58:40.000Z",
      "ageSeconds": 81,
      "driverName": null
    }
  ],
  "meta": {
    "generatedAt": "2026-10-23T12:00:01.000Z",
    "count": 2,
    "offlineAfterSeconds": 7200
  }
}

Fields ​

FieldTypeDescription
vehicleIdstringVehicle ID.
licensePlatestringPlate.
statusstringSee the status table above.
latitude, longitudenumber | nullLast fix position.
speedKmhnumber | nullSpeed at the last fix.
headingDegnumber | nullDirection of travel, 0–359.
ignitionboolean | nullEngine on. null if the device doesn't report it.
lastFixstring | nullTime of the last fix (UTC).
ageSecondsnumber | nullSeconds between lastFix and meta.generatedAt.
driverNamestring | nullDriver currently assigned.

Get one vehicle's position ​

GET /fleet/positions/{vehicleId}

json
{
  "data": {
    "vehicleId": "cm1veh0003",
    "licensePlate": "WP CAB-1234",
    "status": "stopped",
    "latitude": 6.927079,
    "longitude": 79.861244,
    "speedKmh": 0,
    "headingDeg": null,
    "ignition": false,
    "lastFix": "2026-10-23T11:42:10.000Z",
    "ageSeconds": 1071,
    "driverName": "Nimal Perera"
  },
  "meta": { "generatedAt": "2026-10-23T12:00:01.000Z", "count": 1, "offlineAfterSeconds": 7200 }
}

A vehicle without a tracker comes back with status no_data. An unknown ID returns 404.

Partner API v1