Live
Live
On this page
Send your key as key=YOUR_API_KEY on the address, or in the X-NWays-Api-Key header. API keys
Base address: https://nways.ng/maps/v1/fleet
Every vehicle now, with its rider, state, current delivery and zones
GET https://nways.ng/maps/v1/fleet/live
state: moving, stopped (stayed within 50 m for 2 minutes or more; stoppedSince says since when), offline (silent longer than offlineAfterS) or never (no position yet). task is the open delivery assigned last; openTasks counts them all. counts sums the fleet and its open deliveries (unassigned = created, no vehicle; late = open and past dueAt, or expected after it).
curl "https://nways.ng/maps/v1/fleet/live" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/live', {
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.get(
"https://nways.ng/maps/v1/fleet/live",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
The fleet now
| Field | Type | Description |
|---|---|---|
vehicles | LiveVehicle[] | Required. |
vehicles[].id | string | Required. |
vehicles[].name | string | Required. |
vehicles[].mode | string | Required. How ETAs are routed. motorcycle = a dispatch bike (motorcycle roads and timing; the commercial okada bans,
which are for passenger okadas, don't apply); okada = a passenger okada fleet (kept out of okada ban areas);
motorbike = a private motorbike; keke = a tricycle (two-wheeler roads, no okada bans); car, van, truck = car routing;
bicycle; walk = a courier on foot; boat = on the water (ETA in a straight line at its speed); asset = anything
else you track (a trailer, a generator): never routed. One of: motorcycle, okada, motorbike, keke, car, van, truck, bicycle, walk, boat, asset. Default: motorcycle. |
vehicles[].plate | string | Required. |
vehicles[].group | string | |
vehicles[].colour | string | The vehicle's colour on the console's and N-Ways Business's maps. A new vehicle takes the one its project uses least. One of: blue, orange, teal, purple, pink, green, brown, navy, magenta, olive, cyan, maroon, sky, lime, plum, sand. |
vehicles[].batteryPct | number | The battery at its last report, when it sends one. |
vehicles[].driver | object | null | Required. |
vehicles[].state | string | Required. One of: moving, stopped, offline, never. |
vehicles[].lastLocation | Position | null | Required. |
vehicles[].stoppedSince | string (date-time) | null | Required. |
vehicles[].task | object | null | Required. |
vehicles[].openTasks | integer | Required. |
vehicles[].zones | object[] | Required. |
vehicles[].zones[].id | string | |
vehicles[].zones[].name | string | |
counts | object | Required. |
counts.total | integer | Required. |
counts.moving | integer | Required. |
counts.stopped | integer | Required. |
counts.offline | integer | Required. |
counts.never | integer | Required. |
counts.activeTasks | integer | Required. |
counts.unassigned | integer | Required. |
counts.late | integer | Required. |
settings | Settings | Required. |
settings.shareTraffic | boolean | Required. Let your vehicles' positions also feed N-Ways' public live traffic (anonymously). Off unless you turn it on. Default: false. |
settings.retentionDays | integer | Required. How long trip history and ended tasks are kept. Default: 30. ≥ 1, ≤ 90. |
settings.brandName | string | Required. The name tracking pages show ("Your delivery from …"). Up to 60 characters. |
settings.offlineAfterS | integer | Required. Silence after which a vehicle is offline (vehicle.offline). Default: 600. ≥ 60, ≤ 86400. |
settings.stopAlertS | integer | Required. A vehicle on a delivery stopped this long is a stopped alert. Default: 600. ≥ 60, ≤ 7200. |
at | string (date-time) | Required. |
{
"vehicles": [
{
"id": "string",
"name": "string",
"mode": "motorcycle",
"plate": "string",
"group": "string",
"colour": "blue",
"batteryPct": 0,
"driver": {
"id": "string",
"name": "string",
"phone": "string"
},
"state": "moving",
"lastLocation": {
"lat": 0,
"lng": 0,
"heading": 0,
"speedMps": 0,
"accuracyM": 0,
"at": "2026-10-15T09:00:00+01:00"
},
"stoppedSince": "2026-10-15T09:00:00+01:00",
"task": {
"id": "string",
"ref": "string",
"status": "created",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"eta": {
"at": "2026-10-15T09:00:00+01:00",
"durationS": 0,
"distanceM": 0,
"trafficDelayS": 0,
"pickupAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00"
},
"dueAt": "2026-10-15T09:00:00+01:00",
"late": true,
"trackingUrl": "string"
},
"openTasks": 0,
"zones": [
{
"id": "string",
"name": "string"
}
]
}
],
"counts": {
"total": 0,
"moving": 0,
"stopped": 0,
"offline": 0,
"never": 0,
"activeTasks": 0,
"unassigned": 0,
"late": 0
},
"settings": {
"shareTraffic": false,
"retentionDays": 30,
"brandName": "string",
"offlineAfterS": 600,
"stopAlertS": 600
},
"at": "2026-10-15T09:00:00+01:00"
}Errors
defaultError
What needs a look now, most urgent first
GET https://nways.ng/maps/v1/fleet/alerts
offline: a vehicle with an open delivery silent longer than offlineAfterS; late: an open delivery past dueAt or expected after it; stopped: a vehicle with an open delivery stopped longer than stopAlertS.
curl "https://nways.ng/maps/v1/fleet/alerts" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/alerts', {
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.get(
"https://nways.ng/maps/v1/fleet/alerts",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Alerts
| Field | Type | Description |
|---|---|---|
alerts | Alert[] | Required. |
alerts[].kind | string | Required. crash first (open until resolved; detail as the crash alert's, with alertId). One of: crash, offline, late, stopped. |
alerts[].vehicleId | string | null | Required. |
alerts[].vehicleName | string | Required. |
alerts[].taskId | string | null | Required. |
alerts[].taskRef | string | The delivery's number (#1042), for the alert's words. |
alerts[].taskLabel | string | Who or where the delivery is for. |
alerts[].vehicleColour | string | The vehicle's colour on the console's and N-Ways Business's maps. A new vehicle takes the one its project uses least. One of: blue, orange, teal, purple, pink, green, brown, navy, magenta, olive, cyan, maroon, sky, lime, plum, sand. |
alerts[].since | string (date-time) | Required. |
alerts[].detail | object | Required. offline {lastSeenAt, offlineAfterS}; late {dueAt, status, etaAt?}; stopped {stoppedS, stopAlertS, position}. |
at | string (date-time) | Required. |
{
"alerts": [
{
"kind": "crash",
"vehicleId": "string",
"vehicleName": "string",
"taskId": "string",
"taskRef": "string",
"taskLabel": "string",
"vehicleColour": "blue",
"since": "2026-10-15T09:00:00+01:00",
"detail": {}
}
],
"at": "2026-10-15T09:00:00+01:00"
}Errors
defaultError
Where each vehicle on a delivery is going
GET https://nways.ng/maps/v1/fleet/routes
For every vehicle with an open delivery: the road it has travelled since its first open (or today's finished) delivery began (done, at most 6 hours, a point every 15 s at most), the road ahead from its last position through every stop it hasn't reached (ahead, from the routing engine; straight lines while routed is false), and its stops in order: today's finished ones first, then each open delivery's pickup and drop-off. Lines are [lng, lat] (GeoJSON order) and simplified. The road ahead is worked out again when the stops change and every few minutes, not on every position: trim it to the vehicle's live position on your map.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
vehicleId | query | string | One vehicle only. |
curl "https://nways.ng/maps/v1/fleet/routes" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/routes', {
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.get(
"https://nways.ng/maps/v1/fleet/routes",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Routes
| Field | Type | Description |
|---|---|---|
routes | VehicleRoute[] | Required. |
routes[].vehicleId | string | Required. |
routes[].colour | string | Required. The vehicle's colour on the console's and N-Ways Business's maps. A new vehicle takes the one its project uses least. One of: blue, orange, teal, purple, pink, green, brown, navy, magenta, olive, cyan, maroon, sky, lime, plum, sand. |
routes[].done | number[][] | Required. |
routes[].ahead | number[][] | Required. |
routes[].routed | boolean | Required. ahead follows the roads (false: straight lines between the stops for now). |
routes[].stops | object[] | Required. |
routes[].stops[].n | integer | Required. The stop's number, from 1. |
routes[].stops[].kind | string | Required. One of: pickup, dropoff. |
routes[].stops[].taskId | string | Required. |
routes[].stops[].taskRef | string | Required. The delivery's number (#1042). |
routes[].stops[].label | string | Required. Who or where it is for: the recipient, else the drop-off's name. |
routes[].stops[].name | string | The stop's name or address. |
routes[].stops[].lat | number | Required. |
routes[].stops[].lng | number | Required. |
routes[].stops[].status | string | Required. One of: created, assigned, picked_up, arriving, completed, failed, cancelled. |
routes[].stops[].etaAt | string (date-time) | null | Required. |
routes[].stops[].dueAt | string (date-time) | null | Required. |
routes[].stops[].done | boolean | Required. Reached (picked up, or delivered). |
routes[].stops[].final | boolean | Required. The last stop not yet reached. |
routes[].updatedAt | string (date-time) | Required. |
at | string (date-time) | Required. |
{
"routes": [
{
"vehicleId": "string",
"colour": "blue",
"done": [
[
0
]
],
"ahead": [
[
0
]
],
"routed": true,
"stops": [
{
"n": 0,
"kind": "pickup",
"taskId": "string",
"taskRef": "string",
"label": "string",
"name": "string",
"lat": 0,
"lng": 0,
"status": "created",
"etaAt": "2026-10-15T09:00:00+01:00",
"dueAt": "2026-10-15T09:00:00+01:00",
"done": true,
"final": true
}
],
"updatedAt": "2026-10-15T09:00:00+01:00"
}
],
"at": "2026-10-15T09:00:00+01:00"
}Errors
defaultError