N-Ways
Developer docsVehicles and drivers

Vehicles, drivers and positions

Your fleet’s settings, drivers and vehicles, and the positions your rider apps send.

On this page
Note:

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
curl "https://nways.ng/maps/v1/fleet/settings" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
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()
Python
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

FieldTypeDescription
shareTrafficbooleanRequired. Let your vehicles' positions also feed N-Ways' public live traffic (anonymously). Off unless you turn it on. Default: false.
retentionDaysintegerRequired. How long trip history and ended tasks are kept. Default: 30. ≥ 1, ≤ 90.
brandNamestringRequired. The name tracking pages show ("Your delivery from …"). Up to 60 characters.
offlineAfterSintegerRequired. Silence after which a vehicle is offline (vehicle.offline). Default: 600. ≥ 60, ≤ 86400.
stopAlertSintegerRequired. A vehicle on a delivery stopped this long is a stopped alert. Default: 600. ≥ 60, ≤ 7200.
200 OK
{
  "shareTraffic": false,
  "retentionDays": 30,
  "brandName": "string",
  "offlineAfterS": 600,
  "stopAlertS": 600
}

Errors

  • default Error

Change fleet settings (fields left out keep their value)

PUT https://nways.ng/maps/v1/fleet/settings

Request body

FieldTypeDescription
shareTrafficboolean
retentionDaysinteger≥ 1, ≤ 90.
brandNamestringUp to 60 characters.
offlineAfterSinteger≥ 60, ≤ 86400.
stopAlertSinteger≥ 60, ≤ 7200.
cURL
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}'
JavaScript
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()
Python
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

FieldTypeDescription
shareTrafficbooleanRequired. Let your vehicles' positions also feed N-Ways' public live traffic (anonymously). Off unless you turn it on. Default: false.
retentionDaysintegerRequired. How long trip history and ended tasks are kept. Default: 30. ≥ 1, ≤ 90.
brandNamestringRequired. The name tracking pages show ("Your delivery from …"). Up to 60 characters.
offlineAfterSintegerRequired. Silence after which a vehicle is offline (vehicle.offline). Default: 600. ≥ 60, ≤ 86400.
stopAlertSintegerRequired. A vehicle on a delivery stopped this long is a stopped alert. Default: 600. ≥ 60, ≤ 7200.
200 OK
{
  "shareTraffic": false,
  "retentionDays": 30,
  "brandName": "string",
  "offlineAfterS": 600,
  "stopAlertS": 600
}

Errors

  • default Error

List drivers

GET https://nways.ng/maps/v1/fleet/drivers

cURL
curl "https://nways.ng/maps/v1/fleet/drivers" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
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()
Python
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

FieldTypeDescription
driversDriver[]Required.
drivers[].idstringRequired.
drivers[].namestringRequired. firstName and lastName together.
drivers[].firstNamestringRequired.
drivers[].lastNamestringRequired. Empty for a driver created with only a one-word name.
drivers[].phonestringRequired.
drivers[].createdAtstring (date-time)Required.
drivers[].updatedAtstring (date-time)Required.
drivers[].appobjectRequired. The rider in N-Ways Business.
drivers[].app.statusstringRequired. One of: none, invited, joined.
drivers[].app.joinedAtstring (date-time) | nullRequired.
drivers[].app.emailstringThe rider's N-Ways account (joined only).
drivers[].app.namestring
drivers[].app.onDutybooleanRequired. Sharing their position now.
drivers[].app.consentedAtstring (date-time) | nullRequired. When they agreed to share their position (null: not now).
drivers[].app.inviteExpiresAtstring (date-time)Invited: until when the code works.
200 OK
{
  "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

  • default Error

Add a driver

POST https://nways.ng/maps/v1/fleet/drivers

Request body

FieldTypeDescription
idstringRequired.
namestringThe older single name; ignored when firstName and lastName are sent. Up to 100 characters.
phonestringUp to 32 characters.
firstNamestringLetters (any script, with accents), spaces, hyphens and apostrophes. Send with lastName; name is then 'firstName lastName'. Up to 50 characters.
lastNamestringRequired with firstName; the same rules. Up to 50 characters.
cURL
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"}'
JavaScript
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()
Python
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

FieldTypeDescription
idstringRequired.
namestringRequired. firstName and lastName together.
firstNamestringRequired.
lastNamestringRequired. Empty for a driver created with only a one-word name.
phonestringRequired.
createdAtstring (date-time)Required.
updatedAtstring (date-time)Required.
appobjectRequired. The rider in N-Ways Business.
app.statusstringRequired. One of: none, invited, joined.
app.joinedAtstring (date-time) | nullRequired.
app.emailstringThe rider's N-Ways account (joined only).
app.namestring
app.onDutybooleanRequired. Sharing their position now.
app.consentedAtstring (date-time) | nullRequired. When they agreed to share their position (null: not now).
app.inviteExpiresAtstring (date-time)Invited: until when the code works.
201 OK
{
  "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

  • 409 Error
  • default Error

Get a driver

GET https://nways.ng/maps/v1/fleet/drivers/{id}

Parameters

NameInTypeDescription
idpathstringRequired.
cURL
curl "https://nways.ng/maps/v1/fleet/drivers/string" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
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()
Python
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

FieldTypeDescription
idstringRequired.
namestringRequired. firstName and lastName together.
firstNamestringRequired.
lastNamestringRequired. Empty for a driver created with only a one-word name.
phonestringRequired.
createdAtstring (date-time)Required.
updatedAtstring (date-time)Required.
appobjectRequired. The rider in N-Ways Business.
app.statusstringRequired. One of: none, invited, joined.
app.joinedAtstring (date-time) | nullRequired.
app.emailstringThe rider's N-Ways account (joined only).
app.namestring
app.onDutybooleanRequired. Sharing their position now.
app.consentedAtstring (date-time) | nullRequired. When they agreed to share their position (null: not now).
app.inviteExpiresAtstring (date-time)Invited: until when the code works.
200 OK
{
  "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

  • default Error

Change a driver

PATCH https://nways.ng/maps/v1/fleet/drivers/{id}

Parameters

NameInTypeDescription
idpathstringRequired.

Request body

FieldTypeDescription
namestringThe older single name; ignored when firstName and lastName are sent. Up to 100 characters.
phonestringUp to 32 characters.
firstNamestringLetters (any script, with accents), spaces, hyphens and apostrophes. Send with lastName; name is then 'firstName lastName'. Up to 50 characters.
lastNamestringRequired with firstName; the same rules. Up to 50 characters.
cURL
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"}'
JavaScript
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()
Python
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

FieldTypeDescription
idstringRequired.
namestringRequired. firstName and lastName together.
firstNamestringRequired.
lastNamestringRequired. Empty for a driver created with only a one-word name.
phonestringRequired.
createdAtstring (date-time)Required.
updatedAtstring (date-time)Required.
appobjectRequired. The rider in N-Ways Business.
app.statusstringRequired. One of: none, invited, joined.
app.joinedAtstring (date-time) | nullRequired.
app.emailstringThe rider's N-Ways account (joined only).
app.namestring
app.onDutybooleanRequired. Sharing their position now.
app.consentedAtstring (date-time) | nullRequired. When they agreed to share their position (null: not now).
app.inviteExpiresAtstring (date-time)Invited: until when the code works.
200 OK
{
  "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

  • default Error

Delete a driver (vehicles keep running without one)

DELETE https://nways.ng/maps/v1/fleet/drivers/{id}

Parameters

NameInTypeDescription
idpathstringRequired.
cURL
curl -X DELETE "https://nways.ng/maps/v1/fleet/drivers/string" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
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()
Python
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

  • default Error

List vehicles with their last known positions

GET https://nways.ng/maps/v1/fleet/vehicles

Parameters

NameInTypeDescription
statusquerystringOnly vehicles heard from within offlineAfterS (online) or not. One of: online, offline.
cURL
curl "https://nways.ng/maps/v1/fleet/vehicles" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
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()
Python
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

FieldTypeDescription
vehiclesVehicle[]Required.
vehicles[].idstringRequired.
vehicles[].namestringRequired.
vehicles[].modestringRequired. 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[].platestringRequired.
vehicles[].driverIdstring | nullRequired.
vehicles[].groupstring
vehicles[].batteryPctnumberThe tracker's or phone's battery at its last report, when it sends one.
vehicles[].colourstringThe 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[].lastLocationPosition | nullRequired.
vehicles[].onlinebooleanRequired. Heard from within offlineAfterS.
vehicles[].createdAtstring (date-time)Required.
vehicles[].updatedAtstring (date-time)Required.
200 OK
{
  "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

  • default Error

Add a vehicle

POST https://nways.ng/maps/v1/fleet/vehicles

Request body

FieldTypeDescription
idstringRequired.
namestringUp to 100 characters.
modestringHow 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.
platestringUp to 20 characters.
driverIdstringA driver's id, or empty for none.
groupstringYour own grouping ("Lekki bikes"), for alert rules. Up to 60 characters.
colourstringThe 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
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"}'
JavaScript
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()
Python
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

FieldTypeDescription
idstringRequired.
namestringRequired.
modestringRequired. 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.
platestringRequired.
driverIdstring | nullRequired.
groupstring
batteryPctnumberThe tracker's or phone's battery at its last report, when it sends one.
colourstringThe 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.
lastLocationPosition | nullRequired.
onlinebooleanRequired. Heard from within offlineAfterS.
createdAtstring (date-time)Required.
updatedAtstring (date-time)Required.
201 OK
{
  "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

  • default Error

Get a vehicle and its last known position

GET https://nways.ng/maps/v1/fleet/vehicles/{id}

Parameters

NameInTypeDescription
idpathstringRequired.
cURL
curl "https://nways.ng/maps/v1/fleet/vehicles/string" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
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()
Python
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

FieldTypeDescription
idstringRequired.
namestringRequired.
modestringRequired. 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.
platestringRequired.
driverIdstring | nullRequired.
groupstring
batteryPctnumberThe tracker's or phone's battery at its last report, when it sends one.
colourstringThe 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.
lastLocationPosition | nullRequired.
onlinebooleanRequired. Heard from within offlineAfterS.
createdAtstring (date-time)Required.
updatedAtstring (date-time)Required.
200 OK
{
  "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

  • default Error

Change a vehicle (driverId "" removes the driver)

PATCH https://nways.ng/maps/v1/fleet/vehicles/{id}

Parameters

NameInTypeDescription
idpathstringRequired.

Request body

FieldTypeDescription
namestringUp to 100 characters.
modestringHow 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.
platestringUp to 20 characters.
driverIdstring
groupstringUp to 60 characters.
colourstringThe 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
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"}'
JavaScript
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()
Python
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

FieldTypeDescription
idstringRequired.
namestringRequired.
modestringRequired. 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.
platestringRequired.
driverIdstring | nullRequired.
groupstring
batteryPctnumberThe tracker's or phone's battery at its last report, when it sends one.
colourstringThe 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.
lastLocationPosition | nullRequired.
onlinebooleanRequired. Heard from within offlineAfterS.
createdAtstring (date-time)Required.
updatedAtstring (date-time)Required.
200 OK
{
  "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

  • default Error

Delete a vehicle and its trip history

DELETE https://nways.ng/maps/v1/fleet/vehicles/{id}

Parameters

NameInTypeDescription
idpathstringRequired.
cURL
curl -X DELETE "https://nways.ng/maps/v1/fleet/vehicles/string" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
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()
Python
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

  • default Error

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

NameInTypeDescription
idpathstringRequired.
fromquerystring (date-time)
toquerystring (date-time)
taskIdquerystringOnly positions sent while this task was under way.
limitqueryinteger≥ 1, ≤ 10000.
cURL
curl "https://nways.ng/maps/v1/fleet/vehicles/string/history" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
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()
Python
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

FieldTypeDescription
vehicleIdstringRequired.
fromstring (date-time)Required.
tostring (date-time)Required.
positionsPosition[]Required.
positions[].latnumberRequired.
positions[].lngnumberRequired.
positions[].headingnumber≥ 0, ≤ 360.
positions[].speedMpsnumber
positions[].accuracyMnumber
positions[].atstring (date-time)Required.
200 OK
{
  "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

  • default Error

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

NameInTypeDescription
idpathstringRequired.
fromquerystring (date-time)Default: 24 hours ago.
toquerystring (date-time)At most 7 days after from.
limitqueryintegerDefault: 500. ≤ 500.
cURL
curl "https://nways.ng/maps/v1/fleet/vehicles/string/events" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
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()
Python
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

FieldTypeDescription
vehicleIdstring
eventsobject[]
events[].atstring (date-time)
events[].kindstringOne of: ignition_on, ignition_off, power_cut, power_back.
events[].latnumber
events[].lngnumber
200 OK
{
  "vehicleId": "string",
  "events": [
    {
      "at": "2026-10-15T09:00:00+01:00",
      "kind": "ignition_on",
      "lat": 0,
      "lng": 0
    }
  ]
}

Errors

  • default Error

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

FieldTypeDescription
updatesLocationUpdate[]Required. At least 1 items, at most 1000 items.
updates[].vehicleIdstringRequired.
updates[].latnumberRequired. ≥ -90, ≤ 90.
updates[].lngnumberRequired. ≥ -180, ≤ 180.
updates[].tstring (date-time)When the fix was taken (default now); up to 24 h old, 2 min ahead.
updates[].speedMpsnumber≥ 0, ≤ 100.
updates[].headingnumber≥ 0, ≤ 360.
updates[].accuracyMnumber≥ 0, ≤ 10000.
updates[].batteryPctnumberBattery level, shown in the console. ≥ 0, ≤ 100.
updates[].ignitionbooleanA tracker's ignition (ACC).
updates[].extVoltageVnumberA tracker's external power, volts (0: cut). ≥ 0, ≤ 100.
updates[].odometerMnumberA tracker's odometer, metres. ≥ 0.
updates[].satsintegerSatellites in view. ≥ 0, ≤ 99.
updates[].sourcestringWhere the fix comes from (default app). A tracker's positions never feed live traffic. One of: app, tracker.
cURL
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}]}'
JavaScript
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()
Python
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

FieldTypeDescription
acceptedintegerRequired.
rejectedobject[]Required.
rejected[].indexintegerRequired.
rejected[].reasonstringRequired. One of: VEHICLE_NOT_FOUND, INVALID_POSITION, INVALID_TIME, TIME_OUT_OF_RANGE, INVALID_VALUE.
tasksobject[]Required. The open tasks of the vehicles in the batch, re-timed.
tasks[].idstringRequired.
tasks[].statusstringRequired. One of: created, assigned, picked_up, arriving, completed, failed, cancelled.
tasks[].etaETA | nullRequired.
200 OK
{
  "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

  • default Error