Vehicles, drivers and positions
Your fleet’s settings, drivers and vehicles, and the positions your rider apps send.
On this page
- Get the project's fleet settings
- Change fleet settings (fields left out keep their value)
- List drivers
- Add a driver
- Get a driver
- Change a driver
- Delete a driver (vehicles keep running without one)
- List vehicles with their last known positions
- Add a vehicle
- Get a vehicle and its last known position
- Change a vehicle (driverId "" removes the driver)
- Delete a vehicle and its trip history
- A vehicle's trip history (oldest first)
- A vehicle's timeline from its tracker (ignition on and off, power cut and back), newest first
- Send positions (batched)
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
Get the project's fleet settings
GET https://nways.ng/maps/v1/fleet/settings
curl "https://nways.ng/maps/v1/fleet/settings" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/settings', {
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/settings",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Settings
| Field | Type | Description |
|---|---|---|
shareTraffic | boolean | Required. Let your vehicles' positions also feed N-Ways' public live traffic (anonymously). Off unless you turn it on. Default: false. |
retentionDays | integer | Required. How long trip history and ended tasks are kept. Default: 30. ≥ 1, ≤ 90. |
brandName | string | Required. The name tracking pages show ("Your delivery from …"). Up to 60 characters. |
offlineAfterS | integer | Required. Silence after which a vehicle is offline (vehicle.offline). Default: 600. ≥ 60, ≤ 86400. |
stopAlertS | integer | Required. A vehicle on a delivery stopped this long is a stopped alert. Default: 600. ≥ 60, ≤ 7200. |
{
"shareTraffic": false,
"retentionDays": 30,
"brandName": "string",
"offlineAfterS": 600,
"stopAlertS": 600
}Errors
defaultError
Change fleet settings (fields left out keep their value)
PUT https://nways.ng/maps/v1/fleet/settings
Request body
| Field | Type | Description |
|---|---|---|
shareTraffic | boolean | |
retentionDays | integer | ≥ 1, ≤ 90. |
brandName | string | Up to 60 characters. |
offlineAfterS | integer | ≥ 60, ≤ 86400. |
stopAlertS | integer | ≥ 60, ≤ 7200. |
curl -X PUT "https://nways.ng/maps/v1/fleet/settings" \
-H "X-NWays-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"brandName":"Chowtime","offlineAfterS":300}'const res = await fetch('https://nways.ng/maps/v1/fleet/settings', {
method: 'PUT',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"brandName": "Chowtime",
"offlineAfterS": 300
}),
})
const data = await res.json()import os
import requests
res = requests.put(
"https://nways.ng/maps/v1/fleet/settings",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"brandName": "Chowtime", "offlineAfterS": 300},
timeout=10,
)
data = res.json()Response
Settings
| Field | Type | Description |
|---|---|---|
shareTraffic | boolean | Required. Let your vehicles' positions also feed N-Ways' public live traffic (anonymously). Off unless you turn it on. Default: false. |
retentionDays | integer | Required. How long trip history and ended tasks are kept. Default: 30. ≥ 1, ≤ 90. |
brandName | string | Required. The name tracking pages show ("Your delivery from …"). Up to 60 characters. |
offlineAfterS | integer | Required. Silence after which a vehicle is offline (vehicle.offline). Default: 600. ≥ 60, ≤ 86400. |
stopAlertS | integer | Required. A vehicle on a delivery stopped this long is a stopped alert. Default: 600. ≥ 60, ≤ 7200. |
{
"shareTraffic": false,
"retentionDays": 30,
"brandName": "string",
"offlineAfterS": 600,
"stopAlertS": 600
}Errors
defaultError
List drivers
GET https://nways.ng/maps/v1/fleet/drivers
curl "https://nways.ng/maps/v1/fleet/drivers" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/drivers', {
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/drivers",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Drivers, by id
| Field | Type | Description |
|---|---|---|
drivers | Driver[] | Required. |
drivers[].id | string | Required. |
drivers[].name | string | Required. firstName and lastName together. |
drivers[].firstName | string | Required. |
drivers[].lastName | string | Required. Empty for a driver created with only a one-word name. |
drivers[].phone | string | Required. |
drivers[].createdAt | string (date-time) | Required. |
drivers[].updatedAt | string (date-time) | Required. |
drivers[].app | object | Required. The rider in N-Ways Business. |
drivers[].app.status | string | Required. One of: none, invited, joined. |
drivers[].app.joinedAt | string (date-time) | null | Required. |
drivers[].app.email | string | The rider's N-Ways account (joined only). |
drivers[].app.name | string | |
drivers[].app.onDuty | boolean | Required. Sharing their position now. |
drivers[].app.consentedAt | string (date-time) | null | Required. When they agreed to share their position (null: not now). |
drivers[].app.inviteExpiresAt | string (date-time) | Invited: until when the code works. |
{
"drivers": [
{
"id": "string",
"name": "string",
"firstName": "string",
"lastName": "string",
"phone": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00",
"app": {
"status": "none",
"joinedAt": "2026-10-15T09:00:00+01:00",
"email": "string",
"name": "string",
"onDuty": true,
"consentedAt": "2026-10-15T09:00:00+01:00",
"inviteExpiresAt": "2026-10-15T09:00:00+01:00"
}
}
]
}Errors
defaultError
Add a driver
POST https://nways.ng/maps/v1/fleet/drivers
Request body
| Field | Type | Description |
|---|---|---|
id | string | Required. |
name | string | The older single name; ignored when firstName and lastName are sent. Up to 100 characters. |
phone | string | Up to 32 characters. |
firstName | string | Letters (any script, with accents), spaces, hyphens and apostrophes. Send with lastName; name is then 'firstName lastName'. Up to 50 characters. |
lastName | string | Required with firstName; the same rules. Up to 50 characters. |
curl -X POST "https://nways.ng/maps/v1/fleet/drivers" \
-H "X-NWays-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":"string","name":"string","phone":"string","firstName":"string","lastName":"string"}'const res = await fetch('https://nways.ng/maps/v1/fleet/drivers', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"id": "string",
"name": "string",
"phone": "string",
"firstName": "string",
"lastName": "string"
}),
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/drivers",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"id": "string", "name": "string", "phone": "string", "firstName": "string", "lastName": "string"},
timeout=10,
)
data = res.json()Response
Created
| Field | Type | Description |
|---|---|---|
id | string | Required. |
name | string | Required. firstName and lastName together. |
firstName | string | Required. |
lastName | string | Required. Empty for a driver created with only a one-word name. |
phone | string | Required. |
createdAt | string (date-time) | Required. |
updatedAt | string (date-time) | Required. |
app | object | Required. The rider in N-Ways Business. |
app.status | string | Required. One of: none, invited, joined. |
app.joinedAt | string (date-time) | null | Required. |
app.email | string | The rider's N-Ways account (joined only). |
app.name | string | |
app.onDuty | boolean | Required. Sharing their position now. |
app.consentedAt | string (date-time) | null | Required. When they agreed to share their position (null: not now). |
app.inviteExpiresAt | string (date-time) | Invited: until when the code works. |
{
"id": "string",
"name": "string",
"firstName": "string",
"lastName": "string",
"phone": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00",
"app": {
"status": "none",
"joinedAt": "2026-10-15T09:00:00+01:00",
"email": "string",
"name": "string",
"onDuty": true,
"consentedAt": "2026-10-15T09:00:00+01:00",
"inviteExpiresAt": "2026-10-15T09:00:00+01:00"
}
}Errors
409ErrordefaultError
Get a driver
GET https://nways.ng/maps/v1/fleet/drivers/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | Required. |
curl "https://nways.ng/maps/v1/fleet/drivers/string" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/drivers/string', {
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/drivers/string",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Driver
| Field | Type | Description |
|---|---|---|
id | string | Required. |
name | string | Required. firstName and lastName together. |
firstName | string | Required. |
lastName | string | Required. Empty for a driver created with only a one-word name. |
phone | string | Required. |
createdAt | string (date-time) | Required. |
updatedAt | string (date-time) | Required. |
app | object | Required. The rider in N-Ways Business. |
app.status | string | Required. One of: none, invited, joined. |
app.joinedAt | string (date-time) | null | Required. |
app.email | string | The rider's N-Ways account (joined only). |
app.name | string | |
app.onDuty | boolean | Required. Sharing their position now. |
app.consentedAt | string (date-time) | null | Required. When they agreed to share their position (null: not now). |
app.inviteExpiresAt | string (date-time) | Invited: until when the code works. |
{
"id": "string",
"name": "string",
"firstName": "string",
"lastName": "string",
"phone": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00",
"app": {
"status": "none",
"joinedAt": "2026-10-15T09:00:00+01:00",
"email": "string",
"name": "string",
"onDuty": true,
"consentedAt": "2026-10-15T09:00:00+01:00",
"inviteExpiresAt": "2026-10-15T09:00:00+01:00"
}
}Errors
defaultError
Change a driver
PATCH https://nways.ng/maps/v1/fleet/drivers/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | Required. |
Request body
| Field | Type | Description |
|---|---|---|
name | string | The older single name; ignored when firstName and lastName are sent. Up to 100 characters. |
phone | string | Up to 32 characters. |
firstName | string | Letters (any script, with accents), spaces, hyphens and apostrophes. Send with lastName; name is then 'firstName lastName'. Up to 50 characters. |
lastName | string | Required with firstName; the same rules. Up to 50 characters. |
curl -X PATCH "https://nways.ng/maps/v1/fleet/drivers/string" \
-H "X-NWays-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","phone":"string","firstName":"string","lastName":"string"}'const res = await fetch('https://nways.ng/maps/v1/fleet/drivers/string', {
method: 'PATCH',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"name": "string",
"phone": "string",
"firstName": "string",
"lastName": "string"
}),
})
const data = await res.json()import os
import requests
res = requests.patch(
"https://nways.ng/maps/v1/fleet/drivers/string",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"name": "string", "phone": "string", "firstName": "string", "lastName": "string"},
timeout=10,
)
data = res.json()Response
Driver
| Field | Type | Description |
|---|---|---|
id | string | Required. |
name | string | Required. firstName and lastName together. |
firstName | string | Required. |
lastName | string | Required. Empty for a driver created with only a one-word name. |
phone | string | Required. |
createdAt | string (date-time) | Required. |
updatedAt | string (date-time) | Required. |
app | object | Required. The rider in N-Ways Business. |
app.status | string | Required. One of: none, invited, joined. |
app.joinedAt | string (date-time) | null | Required. |
app.email | string | The rider's N-Ways account (joined only). |
app.name | string | |
app.onDuty | boolean | Required. Sharing their position now. |
app.consentedAt | string (date-time) | null | Required. When they agreed to share their position (null: not now). |
app.inviteExpiresAt | string (date-time) | Invited: until when the code works. |
{
"id": "string",
"name": "string",
"firstName": "string",
"lastName": "string",
"phone": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00",
"app": {
"status": "none",
"joinedAt": "2026-10-15T09:00:00+01:00",
"email": "string",
"name": "string",
"onDuty": true,
"consentedAt": "2026-10-15T09:00:00+01:00",
"inviteExpiresAt": "2026-10-15T09:00:00+01:00"
}
}Errors
defaultError
Delete a driver (vehicles keep running without one)
DELETE https://nways.ng/maps/v1/fleet/drivers/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | Required. |
curl -X DELETE "https://nways.ng/maps/v1/fleet/drivers/string" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/drivers/string', {
method: 'DELETE',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.delete(
"https://nways.ng/maps/v1/fleet/drivers/string",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Deleted
No content.
Errors
defaultError
List vehicles with their last known positions
GET https://nways.ng/maps/v1/fleet/vehicles
Parameters
| Name | In | Type | Description |
|---|---|---|---|
status | query | string | Only vehicles heard from within offlineAfterS (online) or not. One of: online, offline. |
curl "https://nways.ng/maps/v1/fleet/vehicles" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/vehicles', {
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/vehicles",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Vehicles, by id
| Field | Type | Description |
|---|---|---|
vehicles | Vehicle[] | 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[].driverId | string | null | Required. |
vehicles[].group | string | |
vehicles[].batteryPct | number | The tracker's or phone's battery at its last report, when it sends one. |
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[].lastLocation | Position | null | Required. |
vehicles[].online | boolean | Required. Heard from within offlineAfterS. |
vehicles[].createdAt | string (date-time) | Required. |
vehicles[].updatedAt | string (date-time) | Required. |
{
"vehicles": [
{
"id": "string",
"name": "string",
"mode": "motorcycle",
"plate": "string",
"driverId": "string",
"group": "string",
"batteryPct": 0,
"colour": "blue",
"lastLocation": {
"lat": 0,
"lng": 0,
"heading": 0,
"speedMps": 0,
"accuracyM": 0,
"at": "2026-10-15T09:00:00+01:00"
},
"online": true,
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00"
}
]
}Errors
defaultError
Add a vehicle
POST https://nways.ng/maps/v1/fleet/vehicles
Request body
| Field | Type | Description |
|---|---|---|
id | string | Required. |
name | string | Up to 100 characters. |
mode | string | 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. |
plate | string | Up to 20 characters. |
driverId | string | A driver's id, or empty for none. |
group | string | Your own grouping ("Lekki bikes"), for alert rules. Up to 60 characters. |
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. |
curl -X POST "https://nways.ng/maps/v1/fleet/vehicles" \
-H "X-NWays-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":"bike-17","name":"Bike 17","mode":"motorcycle","plate":"LAG 123 XY","driverId":"d-4","group":"Yaba"}'const res = await fetch('https://nways.ng/maps/v1/fleet/vehicles', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"id": "bike-17",
"name": "Bike 17",
"mode": "motorcycle",
"plate": "LAG 123 XY",
"driverId": "d-4",
"group": "Yaba"
}),
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/vehicles",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"id": "bike-17", "name": "Bike 17", "mode": "motorcycle", "plate": "LAG 123 XY", "driverId": "d-4", "group": "Yaba"},
timeout=10,
)
data = res.json()Response
Created
| Field | Type | Description |
|---|---|---|
id | string | Required. |
name | string | Required. |
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. |
plate | string | Required. |
driverId | string | null | Required. |
group | string | |
batteryPct | number | The tracker's or phone's battery at its last report, when it sends one. |
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. |
lastLocation | Position | null | Required. |
online | boolean | Required. Heard from within offlineAfterS. |
createdAt | string (date-time) | Required. |
updatedAt | string (date-time) | Required. |
{
"id": "string",
"name": "string",
"mode": "motorcycle",
"plate": "string",
"driverId": "string",
"group": "string",
"batteryPct": 0,
"colour": "blue",
"lastLocation": {
"lat": 0,
"lng": 0,
"heading": 0,
"speedMps": 0,
"accuracyM": 0,
"at": "2026-10-15T09:00:00+01:00"
},
"online": true,
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00"
}Errors
defaultError
Get a vehicle and its last known position
GET https://nways.ng/maps/v1/fleet/vehicles/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | Required. |
curl "https://nways.ng/maps/v1/fleet/vehicles/string" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/vehicles/string', {
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/vehicles/string",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Vehicle
| Field | Type | Description |
|---|---|---|
id | string | Required. |
name | string | Required. |
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. |
plate | string | Required. |
driverId | string | null | Required. |
group | string | |
batteryPct | number | The tracker's or phone's battery at its last report, when it sends one. |
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. |
lastLocation | Position | null | Required. |
online | boolean | Required. Heard from within offlineAfterS. |
createdAt | string (date-time) | Required. |
updatedAt | string (date-time) | Required. |
{
"id": "string",
"name": "string",
"mode": "motorcycle",
"plate": "string",
"driverId": "string",
"group": "string",
"batteryPct": 0,
"colour": "blue",
"lastLocation": {
"lat": 0,
"lng": 0,
"heading": 0,
"speedMps": 0,
"accuracyM": 0,
"at": "2026-10-15T09:00:00+01:00"
},
"online": true,
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00"
}Errors
defaultError
Change a vehicle (driverId "" removes the driver)
PATCH https://nways.ng/maps/v1/fleet/vehicles/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | Required. |
Request body
| Field | Type | Description |
|---|---|---|
name | string | Up to 100 characters. |
mode | string | 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. |
plate | string | Up to 20 characters. |
driverId | string | |
group | string | Up to 60 characters. |
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. |
curl -X PATCH "https://nways.ng/maps/v1/fleet/vehicles/string" \
-H "X-NWays-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","mode":"motorcycle","plate":"string","driverId":"string","group":"string","colour":"blue"}'const res = await fetch('https://nways.ng/maps/v1/fleet/vehicles/string', {
method: 'PATCH',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"name": "string",
"mode": "motorcycle",
"plate": "string",
"driverId": "string",
"group": "string",
"colour": "blue"
}),
})
const data = await res.json()import os
import requests
res = requests.patch(
"https://nways.ng/maps/v1/fleet/vehicles/string",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"name": "string", "mode": "motorcycle", "plate": "string", "driverId": "string", "group": "string", "colour": "blue"},
timeout=10,
)
data = res.json()Response
Vehicle
| Field | Type | Description |
|---|---|---|
id | string | Required. |
name | string | Required. |
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. |
plate | string | Required. |
driverId | string | null | Required. |
group | string | |
batteryPct | number | The tracker's or phone's battery at its last report, when it sends one. |
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. |
lastLocation | Position | null | Required. |
online | boolean | Required. Heard from within offlineAfterS. |
createdAt | string (date-time) | Required. |
updatedAt | string (date-time) | Required. |
{
"id": "string",
"name": "string",
"mode": "motorcycle",
"plate": "string",
"driverId": "string",
"group": "string",
"batteryPct": 0,
"colour": "blue",
"lastLocation": {
"lat": 0,
"lng": 0,
"heading": 0,
"speedMps": 0,
"accuracyM": 0,
"at": "2026-10-15T09:00:00+01:00"
},
"online": true,
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00"
}Errors
defaultError
Delete a vehicle and its trip history
DELETE https://nways.ng/maps/v1/fleet/vehicles/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | Required. |
curl -X DELETE "https://nways.ng/maps/v1/fleet/vehicles/string" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/vehicles/string', {
method: 'DELETE',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.delete(
"https://nways.ng/maps/v1/fleet/vehicles/string",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Deleted
No content.
Errors
defaultError
A vehicle's trip history (oldest first)
GET https://nways.ng/maps/v1/fleet/vehicles/{id}/history
Default the last 24 hours; at most 7 days per call and 10,000 positions. History older than retentionDays is deleted.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | Required. |
from | query | string (date-time) | |
to | query | string (date-time) | |
taskId | query | string | Only positions sent while this task was under way. |
limit | query | integer | ≥ 1, ≤ 10000. |
curl "https://nways.ng/maps/v1/fleet/vehicles/string/history" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/vehicles/string/history', {
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/vehicles/string/history",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Positions
| Field | Type | Description |
|---|---|---|
vehicleId | string | Required. |
from | string (date-time) | Required. |
to | string (date-time) | Required. |
positions | Position[] | Required. |
positions[].lat | number | Required. |
positions[].lng | number | Required. |
positions[].heading | number | ≥ 0, ≤ 360. |
positions[].speedMps | number | |
positions[].accuracyM | number | |
positions[].at | string (date-time) | Required. |
{
"vehicleId": "string",
"from": "2026-10-15T09:00:00+01:00",
"to": "2026-10-15T09:00:00+01:00",
"positions": [
{
"lat": 0,
"lng": 0,
"heading": 0,
"speedMps": 0,
"accuracyM": 0,
"at": "2026-10-15T09:00:00+01:00"
}
]
}Errors
defaultError
A vehicle's timeline from its tracker (ignition on and off, power cut and back), newest first
GET https://nways.ng/maps/v1/fleet/vehicles/{id}/events
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | Required. |
from | query | string (date-time) | Default: 24 hours ago. |
to | query | string (date-time) | At most 7 days after from. |
limit | query | integer | Default: 500. ≤ 500. |
curl "https://nways.ng/maps/v1/fleet/vehicles/string/events" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/fleet/vehicles/string/events', {
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/vehicles/string/events",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Entries
| Field | Type | Description |
|---|---|---|
vehicleId | string | |
events | object[] | |
events[].at | string (date-time) | |
events[].kind | string | One of: ignition_on, ignition_off, power_cut, power_back. |
events[].lat | number | |
events[].lng | number |
{
"vehicleId": "string",
"events": [
{
"at": "2026-10-15T09:00:00+01:00",
"kind": "ignition_on",
"lat": 0,
"lng": 0
}
]
}Errors
defaultError
Send positions (batched)
POST https://nways.ng/maps/v1/fleet/locations
Rider apps send their fixes in batches, for one vehicle or many (1–1,000 per call). Fixes up to 24 hours old are kept as history (an app back online sends what it buffered); the newest moves the vehicle's last known position. A fresh fix (10 minutes or newer) re-times the vehicle's open task with our router and live traffic (at most every 10 s per task), and marks it arriving when the drop-off is within its arrivingS or 250 m. Fixes that can't be used are listed in rejected by index; the rest are accepted. Send every 5–15 s while on a task.
Request body
| Field | Type | Description |
|---|---|---|
updates | LocationUpdate[] | Required. At least 1 items, at most 1000 items. |
updates[].vehicleId | string | Required. |
updates[].lat | number | Required. ≥ -90, ≤ 90. |
updates[].lng | number | Required. ≥ -180, ≤ 180. |
updates[].t | string (date-time) | When the fix was taken (default now); up to 24 h old, 2 min ahead. |
updates[].speedMps | number | ≥ 0, ≤ 100. |
updates[].heading | number | ≥ 0, ≤ 360. |
updates[].accuracyM | number | ≥ 0, ≤ 10000. |
updates[].batteryPct | number | Battery level, shown in the console. ≥ 0, ≤ 100. |
updates[].ignition | boolean | A tracker's ignition (ACC). |
updates[].extVoltageV | number | A tracker's external power, volts (0: cut). ≥ 0, ≤ 100. |
updates[].odometerM | number | A tracker's odometer, metres. ≥ 0. |
updates[].sats | integer | Satellites in view. ≥ 0, ≤ 99. |
updates[].source | string | Where the fix comes from (default app). A tracker's positions never feed live traffic. One of: app, tracker. |
curl -X POST "https://nways.ng/maps/v1/fleet/locations" \
-H "X-NWays-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"updates":[{"vehicleId":"bike-17","lat":6.512,"lng":3.375,"t":"2026-10-15T09:12:03Z","speedMps":6.2,"heading":210,"accuracyM":8}]}'const res = await fetch('https://nways.ng/maps/v1/fleet/locations', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"updates": [
{
"vehicleId": "bike-17",
"lat": 6.512,
"lng": 3.375,
"t": "2026-10-15T09:12:03Z",
"speedMps": 6.2,
"heading": 210,
"accuracyM": 8
}
]
}),
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/locations",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"updates": [{"vehicleId": "bike-17", "lat": 6.512, "lng": 3.375, "t": "2026-10-15T09:12:03Z", "speedMps": 6.2, "heading": 210, "accuracyM": 8}]},
timeout=10,
)
data = res.json()Response
Accepted
| Field | Type | Description |
|---|---|---|
accepted | integer | Required. |
rejected | object[] | Required. |
rejected[].index | integer | Required. |
rejected[].reason | string | Required. One of: VEHICLE_NOT_FOUND, INVALID_POSITION, INVALID_TIME, TIME_OUT_OF_RANGE, INVALID_VALUE. |
tasks | object[] | Required. The open tasks of the vehicles in the batch, re-timed. |
tasks[].id | string | Required. |
tasks[].status | string | Required. One of: created, assigned, picked_up, arriving, completed, failed, cancelled. |
tasks[].eta | ETA | null | Required. |
{
"accepted": 0,
"rejected": [
{
"index": 0,
"reason": "VEHICLE_NOT_FOUND"
}
],
"tasks": [
{
"id": "string",
"status": "created",
"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"
}
}
]
}Errors
defaultError