N-Ways
Developer docsRider links

Rider links

Rider links

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 https://nways.ng/maps/v1/fleet/vehicles/{id}/links

NameInTypeDescription
idpathstringRequired.
cURL
curl "https://nways.ng/maps/v1/fleet/vehicles/string/links" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/vehicles/string/links', {
  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/links",
    headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
    timeout=10,
)
data = res.json()

Links

FieldTypeDescription
linksRiderLink[]Required.
links[].idstringRequired.
links[].vehicleIdstringRequired.
links[].urlstring (uri)Only when made: https://nways.ng/d/<token>.
links[].createdBystringRequired.
links[].createdAtstring (date-time)Required.
links[].expiresAtstring (date-time)Required.
links[].revokedAtstring (date-time) | nullRequired.
links[].consentedAtstring (date-time) | nullRequired. When the rider agreed to share.
links[].lastUsedAtstring (date-time) | nullRequired.
links[].activebooleanRequired.
200 OK
{
  "links": [
    {
      "id": "lnk_c8RdT5wQ1e",
      "vehicleId": "string",
      "url": "string",
      "createdBy": "string",
      "createdAt": "2026-10-15T09:00:00+01:00",
      "expiresAt": "2026-10-15T09:00:00+01:00",
      "revokedAt": "2026-10-15T09:00:00+01:00",
      "consentedAt": "2026-10-15T09:00:00+01:00",
      "lastUsedAt": "2026-10-15T09:00:00+01:00",
      "active": true
    }
  ]
}
  • default Error

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

The answer's url (https://nways.ng/d/…) is shown once: send it to the rider. The page asks the rider to agree, then shares the phone's position while it's open and sharing is on, shows their open deliveries and lets them mark one picked up or delivered. Positions count like POST /locations for this vehicle.

NameInTypeDescription
idpathstringRequired.
FieldTypeDescription
daysintegerHow long the link works. Default: 30. ≥ 1, ≤ 90.
cURL
curl -X POST "https://nways.ng/maps/v1/fleet/vehicles/string/links" \
  -H "X-NWays-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"days":30}'
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/vehicles/string/links', {
  method: 'POST',
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "days": 30
  }),
})
const data = await res.json()
Python
import os
import requests

res = requests.post(
    "https://nways.ng/maps/v1/fleet/vehicles/string/links",
    headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
    json={"days": 30},
    timeout=10,
)
data = res.json()

The link with its url

FieldTypeDescription
idstringRequired.
vehicleIdstringRequired.
urlstring (uri)Only when made: https://nways.ng/d/<token>.
createdBystringRequired.
createdAtstring (date-time)Required.
expiresAtstring (date-time)Required.
revokedAtstring (date-time) | nullRequired.
consentedAtstring (date-time) | nullRequired. When the rider agreed to share.
lastUsedAtstring (date-time) | nullRequired.
activebooleanRequired.
201 OK
{
  "id": "lnk_c8RdT5wQ1e",
  "vehicleId": "string",
  "url": "string",
  "createdBy": "string",
  "createdAt": "2026-10-15T09:00:00+01:00",
  "expiresAt": "2026-10-15T09:00:00+01:00",
  "revokedAt": "2026-10-15T09:00:00+01:00",
  "consentedAt": "2026-10-15T09:00:00+01:00",
  "lastUsedAt": "2026-10-15T09:00:00+01:00",
  "active": true
}
  • default Error

DELETE https://nways.ng/maps/v1/fleet/links/{linkId}

NameInTypeDescription
linkIdpathstringRequired.
cURL
curl -X DELETE "https://nways.ng/maps/v1/fleet/links/string" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/links/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/links/string",
    headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
    timeout=10,
)
data = res.json()

Revoked

No content.

  • default Error