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
The vehicle's rider links (never their addresses), newest first
GET https://nways.ng/maps/v1/fleet/vehicles/{id}/links
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | Required. |
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()Response
Links
| Field | Type | Description |
|---|---|---|
links | RiderLink[] | Required. |
links[].id | string | Required. |
links[].vehicleId | string | Required. |
links[].url | string (uri) | Only when made: https://nways.ng/d/<token>. |
links[].createdBy | string | Required. |
links[].createdAt | string (date-time) | Required. |
links[].expiresAt | string (date-time) | Required. |
links[].revokedAt | string (date-time) | null | Required. |
links[].consentedAt | string (date-time) | null | Required. When the rider agreed to share. |
links[].lastUsedAt | string (date-time) | null | Required. |
links[].active | boolean | Required. |
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
}
]
}Errors
defaultError
A link a rider opens on their phone to share its position for this vehicle (no app needed)
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.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | Required. |
Request body
| Field | Type | Description |
|---|---|---|
days | integer | How 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()Response
The link with its url
| Field | Type | Description |
|---|---|---|
id | string | Required. |
vehicleId | string | Required. |
url | string (uri) | Only when made: https://nways.ng/d/<token>. |
createdBy | string | Required. |
createdAt | string (date-time) | Required. |
expiresAt | string (date-time) | Required. |
revokedAt | string (date-time) | null | Required. |
consentedAt | string (date-time) | null | Required. When the rider agreed to share. |
lastUsedAt | string (date-time) | null | Required. |
active | boolean | Required. |
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
}Errors
defaultError
Stop a rider link at once (its page then says it has ended)
DELETE https://nways.ng/maps/v1/fleet/links/{linkId}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
linkId | path | string | Required. |
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()Response
Revoked
No content.
Errors
defaultError