Livraisons et liens de suivi
Les livraisons (tâches) de la création au dépôt, avec l’heure d’arrivée en direct, la modification, vos lieux de retrait et clients, et les liens de suivi envoyés aux clients.
Sur cette page
- La preuve de livraison de la tâche (photos, signatures) et la note du livreur
- L’image d’une preuve (JPEG, PNG ou WebP), gardée aussi longtemps que sa tâche
- Lister les tâches, les plus récentes d’abord
- Créer une livraison
- Obtenir une tâche avec son heure d’arrivée estimée en direct
- Modifier une livraison
- Assigner (ou réassigner) un véhicule — created|assigned → assigned ; événement task.assigned
- Marquer comme enlevé — assigned → picked_up
- Marquer comme livré — assigned|picked_up|arriving → completed ; événement task.completed
- Marquer comme échoué — tout statut ouvert → failed ; événement task.failed
- Annuler — tout statut ouvert → cancelled
- Envoyer le code PIN de livraison au client par e-mail
- Si un code PIN de livraison peut aller à un numéro sur WhatsApp
- Définir ou effacer la zone propre d’une livraison
- Lister vos lieux de retrait (celui par défaut d’abord)
- Ajouter un lieu de retrait (jusqu’à 200)
- Obtenir un lieu de retrait
- Modifier un lieu de retrait
- Supprimer un lieu de retrait
- Lister vos clients, dernière livraison d’abord
- Obtenir un client
- Oublier un client et ses adresses
- Lister les adresses d’un client, dernière utilisée d’abord
- Le lien de suivi du destinataire (un nouveau s’il a expiré ; aucun une fois la tâche terminée)
Envoyez votre clé avec key=VOTRE_CLE_API dans l’adresse, ou dans l’en-tête X-NWays-Api-Key. Clés d’API
Adresse de base : https://nways.ng/maps/v1/fleet
La preuve de livraison de la tâche (photos, signatures) et la note du livreur
GET https://nways.ng/maps/v1/fleet/tasks/{id}/proofs
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
id | chemin | string | Obligatoire. |
curl "https://nways.ng/maps/v1/fleet/tasks/string/proofs" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/tasks/string/proofs', {
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/tasks/string/proofs",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Preuves
| Champ | Type | Description |
|---|---|---|
taskId | string | Obligatoire. |
proofs | Proof[] | Obligatoire. |
proofs[].id | string | Obligatoire. |
proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
proofs[].bytes | integer | Obligatoire. |
proofs[].lat | number | null | Obligatoire. |
proofs[].lng | number | null | Obligatoire. |
proofs[].by | string | Obligatoire. Le nom du livreur. |
proofs[].createdAt | string (date-time) | Obligatoire. |
endNote | string | Obligatoire. Ce que le livreur a écrit en terminant. |
{
"taskId": "string",
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string"
}Erreurs
defaultErreur
L’image d’une preuve (JPEG, PNG ou WebP), gardée aussi longtemps que sa tâche
GET https://nways.ng/maps/v1/fleet/proofs/{proofId}
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
proofId | chemin | string | Obligatoire. |
curl "https://nways.ng/maps/v1/fleet/proofs/string" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/proofs/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/proofs/string",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
L’image
Erreurs
defaultErreur
Lister les tâches, les plus récentes d’abord
GET https://nways.ng/maps/v1/fleet/tasks
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
status | requête | string | active = assigned, picked_up ou arriving. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled, active. |
vehicleId | requête | string | |
limit | requête | integer | Par défaut: 100. ≥ 1, ≤ 500. |
pageToken | requête | string | nextPageToken de la page précédente. |
curl "https://nways.ng/maps/v1/fleet/tasks" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/tasks', {
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/tasks",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Tâches
| Champ | Type | Description |
|---|---|---|
tasks | Task[] | Obligatoire. |
tasks[].id | string | Obligatoire. |
tasks[].ref | string | Obligatoire. Le numéro court de la livraison dans le projet, donné par N-Ways (« 1042 », affiché #1042) : pour les personnes, dans les alertes et les listes. |
tasks[].status | string | Obligatoire. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled. |
tasks[].vehicleId | string | null | Obligatoire. |
tasks[].pickup | Stop | null | Obligatoire. |
tasks[].dropoff | Stop | Obligatoire. |
tasks[].dropoff.lat | number | Obligatoire. |
tasks[].dropoff.lng | number | Obligatoire. |
tasks[].dropoff.name | string | 120 caractères au plus. |
tasks[].dropoff.address | string | 300 caractères au plus. |
tasks[].recipientName | string | Obligatoire. |
tasks[].recipientPhone | string | |
tasks[].notes | string | Obligatoire. |
tasks[].lang | string | Obligatoire. Au choix: en, fr, pt. |
tasks[].arrivingS | integer | Obligatoire. |
tasks[].eta | ETA | null | Obligatoire. Null tant qu’aucune position fraîche n’est arrivée, et une fois la tâche terminée. |
tasks[].dueAt | string (date-time) | null | Obligatoire. |
tasks[].late | boolean | Obligatoire. Ouverte et après dueAt, ou attendue après. |
tasks[].trackingUrl | string (uri) | null | Obligatoire. Null une fois expiré. |
tasks[].trackingExpiresAt | string (date-time) | null | Obligatoire. |
tasks[].failureReason | string | |
tasks[].createdAt | string (date-time) | Obligatoire. |
tasks[].assignedAt | string (date-time) | null | Obligatoire. |
tasks[].pickedUpAt | string (date-time) | null | Obligatoire. |
tasks[].arrivingAt | string (date-time) | null | Obligatoire. |
tasks[].endedAt | string (date-time) | null | Obligatoire. |
tasks[].area | Area | null | La zone propre à la livraison : en sortir lève asset.geofence_exit. |
tasks[].proofs | Proof[] | Seulement dans GET /tasks/{id} : les photos et signatures du livreur (N-Ways Business). |
tasks[].proofs[].id | string | Obligatoire. |
tasks[].proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
tasks[].proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
tasks[].proofs[].bytes | integer | Obligatoire. |
tasks[].proofs[].lat | number | null | Obligatoire. |
tasks[].proofs[].lng | number | null | Obligatoire. |
tasks[].proofs[].by | string | Obligatoire. Le nom du livreur. |
tasks[].proofs[].createdAt | string (date-time) | Obligatoire. |
tasks[].endNote | string | Seulement dans GET /tasks/{id} : ce que le livreur a écrit en terminant. |
tasks[].recipientEmail | string | |
tasks[].proofRequired | string[] | Celles de la livraison, sinon celles de vos réglages. |
tasks[].proofRequiredOverride | string[] | null | |
tasks[].packageSize | string | null | Au choix: small, medium, large, null. |
tasks[].itemDescription | string | |
tasks[].reference | string | |
tasks[].scheduledAt | string (date-time) | null | |
tasks[].connectionId | string | null | La connexion du livreur N-Ways qui l’a acceptée. |
tasks[].acceptedAt | string (date-time) | null | |
tasks[].startedAt | string (date-time) | null | |
tasks[].editable | string | Ce que PATCH /tasks/{id} peut changer maintenant : tout, seulement notes et dueAt (retirée ou commencée), ou rien (terminée). Au choix: all, limited, none. |
tasks[].editedAt | string (date-time) | null | La dernière modification. |
tasks[].editedFields | string[] | Ce que la dernière modification a changé. |
tasks[].pinDelivery | PinDelivery | Comment le code PIN de livraison parvient au client, quand la livraison en demande un et que les codes partent sur WhatsApp. Jamais le code lui-même. |
tasks[].pinDelivery.channel | string | Obligatoire. Au choix: whatsapp, email, none. |
tasks[].pinDelivery.state | string | Obligatoire. Au choix: sending, sent, delivered, read, failed. |
tasks[].pinDelivery.whatsappErrorCode | integer | null | Obligatoire. L’échec de WhatsApp (131026 : pas sur WhatsApp), gardé après l’envoi du code par e-mail. |
tasks[].pinDelivery.needsEmail | boolean | Obligatoire. Le client n’a pas reçu le code : envoyez-le avec POST /tasks/{id}/pin-email. |
tasks[].pinDelivery.updatedAt | string (date-time) | Obligatoire. |
nextPageToken | string |
{
"tasks": [
{
"id": "string",
"ref": "string",
"status": "created",
"vehicleId": "string",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"recipientPhone": "string",
"notes": "string",
"lang": "en",
"arrivingS": 0,
"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",
"trackingExpiresAt": "2026-10-15T09:00:00+01:00",
"failureReason": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"assignedAt": "2026-10-15T09:00:00+01:00",
"pickedUpAt": "2026-10-15T09:00:00+01:00",
"arrivingAt": "2026-10-15T09:00:00+01:00",
"endedAt": "2026-10-15T09:00:00+01:00",
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
},
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string",
"recipientEmail": "string",
"proofRequired": [
"photo"
],
"proofRequiredOverride": [
"string"
],
"packageSize": "small",
"itemDescription": "string",
"reference": "string",
"scheduledAt": "2026-10-15T09:00:00+01:00",
"connectionId": "string",
"acceptedAt": "2026-10-15T09:00:00+01:00",
"startedAt": "2026-10-15T09:00:00+01:00",
"editable": "all",
"editedAt": "2026-10-15T09:00:00+01:00",
"editedFields": [
"string"
],
"pinDelivery": {
"channel": "whatsapp",
"state": "sending",
"whatsappErrorCode": 0,
"needsEmail": true,
"updatedAt": "2026-10-15T09:00:00+01:00"
}
}
],
"nextPageToken": "string"
}Erreurs
defaultErreur
Créer une livraison
POST https://nways.ng/maps/v1/fleet/tasks
Une tâche a un point d’enlèvement facultatif et un point de livraison. Donnez vehicleId pour l’assigner tout de suite. La réponse contient le trackingUrl du destinataire (valable 72 heures, ou jusqu’à une heure après la fin de la tâche). Événements : task.created (et task.assigned).
Corps de la requête
| Champ | Type | Description |
|---|---|---|
id | string | Votre identifiant ; N-Ways en crée un (job_…) si vous n’en donnez pas. |
pickup | Stop | |
pickup.lat | number | Obligatoire. |
pickup.lng | number | Obligatoire. |
pickup.name | string | 120 caractères au plus. |
pickup.address | string | 300 caractères au plus. |
pickupPlaceId | string | Un de vos lieux de retrait comme retrait (son nom, son adresse et sa position sont recopiés), au lieu de pickup. |
dropoff | Stop | Obligatoire. |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | Pour vos propres dossiers ; jamais affiché sur la page de suivi. 100 caractères au plus. |
recipientPhone | string | Pour que le livreur puisse appeler le client depuis N-Ways Business ; jamais montré sur la page de suivi. 32 caractères au plus. |
notes | string | 500 caractères au plus. |
lang | string | La langue de la page de suivi. Au choix: en, fr, pt. Par défaut: en. |
arrivingS | integer | Nombre de secondes avant l’arrivée à partir duquel la tâche passe à arriving. Par défaut: 180. ≥ 30, ≤ 1800. |
vehicleId | string | |
dueAt | string (date-time) | L’échéance : après (ou attendue après), la tâche est late. |
area | Area | Un cercle (lat, lng, radiusM 50–100000) ou un polygone (coordinates : 3 à 500 points [lng, lat]). |
area.type | string | Obligatoire. Au choix: circle, polygon. |
area.lat | number | |
area.lng | number | |
area.radiusM | number | ≥ 50, ≤ 100000. |
area.coordinates | number[][] | |
recipientEmail | string (email) | N-Ways envoie au client ses nouvelles par e-mail (en route, bientôt là, livrée) avec le lien de suivi. |
proofRequired | string[] | Ce que le livreur doit fournir pour livrer ; laissez vide pour le proofRequired de vos réglages. |
packageSize | string | Au choix: small, medium, large. |
itemDescription | string | 200 caractères au plus. |
reference | string | Votre propre référence (un numéro de facture ou de commande). 64 caractères au plus. |
scheduledAt | string (date-time) | Un retrait plus tard (jusqu’à 60 jours) : le livreur reçoit un rappel avant. |
curl -X POST "https://nways.ng/maps/v1/fleet/tasks" \
-H "X-NWays-Api-Key: VOTRE_CLE_API" \
-H "Content-Type: application/json" \
-d '{"id":"order-88412","pickup":{"lat":6.5095,"lng":3.3711,"name":"Mama Put","Yaba":null,"address":"12 Herbert Macaulay Way"},"dropoff":{"lat":6.4969,"lng":3.3539,"name":"Home","address":"4 Adeniran Ogunsanya St"},"lang":"en","vehicleId":"bike-17"}'const res = await fetch('https://nways.ng/maps/v1/fleet/tasks', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"id": "order-88412",
"pickup": {
"lat": 6.5095,
"lng": 3.3711,
"name": "Mama Put",
"Yaba": null,
"address": "12 Herbert Macaulay Way"
},
"dropoff": {
"lat": 6.4969,
"lng": 3.3539,
"name": "Home",
"address": "4 Adeniran Ogunsanya St"
},
"lang": "en",
"vehicleId": "bike-17"
}),
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/tasks",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"id": "order-88412", "pickup": {"lat": 6.5095, "lng": 3.3711, "name": "Mama Put", "Yaba": None, "address": "12 Herbert Macaulay Way"}, "dropoff": {"lat": 6.4969, "lng": 3.3539, "name": "Home", "address": "4 Adeniran Ogunsanya St"}, "lang": "en", "vehicleId": "bike-17"},
timeout=10,
)
data = res.json()Réponse
Créé
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
ref | string | Obligatoire. Le numéro court de la livraison dans le projet, donné par N-Ways (« 1042 », affiché #1042) : pour les personnes, dans les alertes et les listes. |
status | string | Obligatoire. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled. |
vehicleId | string | null | Obligatoire. |
pickup | Stop | null | Obligatoire. |
dropoff | Stop | Obligatoire. |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | Obligatoire. |
recipientPhone | string | |
notes | string | Obligatoire. |
lang | string | Obligatoire. Au choix: en, fr, pt. |
arrivingS | integer | Obligatoire. |
eta | ETA | null | Obligatoire. Null tant qu’aucune position fraîche n’est arrivée, et une fois la tâche terminée. |
dueAt | string (date-time) | null | Obligatoire. |
late | boolean | Obligatoire. Ouverte et après dueAt, ou attendue après. |
trackingUrl | string (uri) | null | Obligatoire. Null une fois expiré. |
trackingExpiresAt | string (date-time) | null | Obligatoire. |
failureReason | string | |
createdAt | string (date-time) | Obligatoire. |
assignedAt | string (date-time) | null | Obligatoire. |
pickedUpAt | string (date-time) | null | Obligatoire. |
arrivingAt | string (date-time) | null | Obligatoire. |
endedAt | string (date-time) | null | Obligatoire. |
area | Area | null | La zone propre à la livraison : en sortir lève asset.geofence_exit. |
proofs | Proof[] | Seulement dans GET /tasks/{id} : les photos et signatures du livreur (N-Ways Business). |
proofs[].id | string | Obligatoire. |
proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
proofs[].bytes | integer | Obligatoire. |
proofs[].lat | number | null | Obligatoire. |
proofs[].lng | number | null | Obligatoire. |
proofs[].by | string | Obligatoire. Le nom du livreur. |
proofs[].createdAt | string (date-time) | Obligatoire. |
endNote | string | Seulement dans GET /tasks/{id} : ce que le livreur a écrit en terminant. |
recipientEmail | string | |
proofRequired | string[] | Celles de la livraison, sinon celles de vos réglages. |
proofRequiredOverride | string[] | null | |
packageSize | string | null | Au choix: small, medium, large, null. |
itemDescription | string | |
reference | string | |
scheduledAt | string (date-time) | null | |
connectionId | string | null | La connexion du livreur N-Ways qui l’a acceptée. |
acceptedAt | string (date-time) | null | |
startedAt | string (date-time) | null | |
editable | string | Ce que PATCH /tasks/{id} peut changer maintenant : tout, seulement notes et dueAt (retirée ou commencée), ou rien (terminée). Au choix: all, limited, none. |
editedAt | string (date-time) | null | La dernière modification. |
editedFields | string[] | Ce que la dernière modification a changé. |
pinDelivery | PinDelivery | Comment le code PIN de livraison parvient au client, quand la livraison en demande un et que les codes partent sur WhatsApp. Jamais le code lui-même. |
pinDelivery.channel | string | Obligatoire. Au choix: whatsapp, email, none. |
pinDelivery.state | string | Obligatoire. Au choix: sending, sent, delivered, read, failed. |
pinDelivery.whatsappErrorCode | integer | null | Obligatoire. L’échec de WhatsApp (131026 : pas sur WhatsApp), gardé après l’envoi du code par e-mail. |
pinDelivery.needsEmail | boolean | Obligatoire. Le client n’a pas reçu le code : envoyez-le avec POST /tasks/{id}/pin-email. |
pinDelivery.updatedAt | string (date-time) | Obligatoire. |
{
"id": "string",
"ref": "string",
"status": "created",
"vehicleId": "string",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"recipientPhone": "string",
"notes": "string",
"lang": "en",
"arrivingS": 0,
"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",
"trackingExpiresAt": "2026-10-15T09:00:00+01:00",
"failureReason": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"assignedAt": "2026-10-15T09:00:00+01:00",
"pickedUpAt": "2026-10-15T09:00:00+01:00",
"arrivingAt": "2026-10-15T09:00:00+01:00",
"endedAt": "2026-10-15T09:00:00+01:00",
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
},
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string",
"recipientEmail": "string",
"proofRequired": [
"photo"
],
"proofRequiredOverride": [
"string"
],
"packageSize": "small",
"itemDescription": "string",
"reference": "string",
"scheduledAt": "2026-10-15T09:00:00+01:00",
"connectionId": "string",
"acceptedAt": "2026-10-15T09:00:00+01:00",
"startedAt": "2026-10-15T09:00:00+01:00",
"editable": "all",
"editedAt": "2026-10-15T09:00:00+01:00",
"editedFields": [
"string"
],
"pinDelivery": {
"channel": "whatsapp",
"state": "sending",
"whatsappErrorCode": 0,
"needsEmail": true,
"updatedAt": "2026-10-15T09:00:00+01:00"
}
}Erreurs
403DELIVERIES_OFF (N-Ways a coupé les nouvelles livraisons de votre organisation) ou ORGANISATION_SUSPENDED ; le message dit pourquoi.defaultErreur
Obtenir une tâche avec son heure d’arrivée estimée en direct
GET https://nways.ng/maps/v1/fleet/tasks/{id}
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
id | chemin | string | Obligatoire. |
curl "https://nways.ng/maps/v1/fleet/tasks/string" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/tasks/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/tasks/string",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Tâche
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
ref | string | Obligatoire. Le numéro court de la livraison dans le projet, donné par N-Ways (« 1042 », affiché #1042) : pour les personnes, dans les alertes et les listes. |
status | string | Obligatoire. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled. |
vehicleId | string | null | Obligatoire. |
pickup | Stop | null | Obligatoire. |
dropoff | Stop | Obligatoire. |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | Obligatoire. |
recipientPhone | string | |
notes | string | Obligatoire. |
lang | string | Obligatoire. Au choix: en, fr, pt. |
arrivingS | integer | Obligatoire. |
eta | ETA | null | Obligatoire. Null tant qu’aucune position fraîche n’est arrivée, et une fois la tâche terminée. |
dueAt | string (date-time) | null | Obligatoire. |
late | boolean | Obligatoire. Ouverte et après dueAt, ou attendue après. |
trackingUrl | string (uri) | null | Obligatoire. Null une fois expiré. |
trackingExpiresAt | string (date-time) | null | Obligatoire. |
failureReason | string | |
createdAt | string (date-time) | Obligatoire. |
assignedAt | string (date-time) | null | Obligatoire. |
pickedUpAt | string (date-time) | null | Obligatoire. |
arrivingAt | string (date-time) | null | Obligatoire. |
endedAt | string (date-time) | null | Obligatoire. |
area | Area | null | La zone propre à la livraison : en sortir lève asset.geofence_exit. |
proofs | Proof[] | Seulement dans GET /tasks/{id} : les photos et signatures du livreur (N-Ways Business). |
proofs[].id | string | Obligatoire. |
proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
proofs[].bytes | integer | Obligatoire. |
proofs[].lat | number | null | Obligatoire. |
proofs[].lng | number | null | Obligatoire. |
proofs[].by | string | Obligatoire. Le nom du livreur. |
proofs[].createdAt | string (date-time) | Obligatoire. |
endNote | string | Seulement dans GET /tasks/{id} : ce que le livreur a écrit en terminant. |
recipientEmail | string | |
proofRequired | string[] | Celles de la livraison, sinon celles de vos réglages. |
proofRequiredOverride | string[] | null | |
packageSize | string | null | Au choix: small, medium, large, null. |
itemDescription | string | |
reference | string | |
scheduledAt | string (date-time) | null | |
connectionId | string | null | La connexion du livreur N-Ways qui l’a acceptée. |
acceptedAt | string (date-time) | null | |
startedAt | string (date-time) | null | |
editable | string | Ce que PATCH /tasks/{id} peut changer maintenant : tout, seulement notes et dueAt (retirée ou commencée), ou rien (terminée). Au choix: all, limited, none. |
editedAt | string (date-time) | null | La dernière modification. |
editedFields | string[] | Ce que la dernière modification a changé. |
pinDelivery | PinDelivery | Comment le code PIN de livraison parvient au client, quand la livraison en demande un et que les codes partent sur WhatsApp. Jamais le code lui-même. |
pinDelivery.channel | string | Obligatoire. Au choix: whatsapp, email, none. |
pinDelivery.state | string | Obligatoire. Au choix: sending, sent, delivered, read, failed. |
pinDelivery.whatsappErrorCode | integer | null | Obligatoire. L’échec de WhatsApp (131026 : pas sur WhatsApp), gardé après l’envoi du code par e-mail. |
pinDelivery.needsEmail | boolean | Obligatoire. Le client n’a pas reçu le code : envoyez-le avec POST /tasks/{id}/pin-email. |
pinDelivery.updatedAt | string (date-time) | Obligatoire. |
{
"id": "string",
"ref": "string",
"status": "created",
"vehicleId": "string",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"recipientPhone": "string",
"notes": "string",
"lang": "en",
"arrivingS": 0,
"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",
"trackingExpiresAt": "2026-10-15T09:00:00+01:00",
"failureReason": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"assignedAt": "2026-10-15T09:00:00+01:00",
"pickedUpAt": "2026-10-15T09:00:00+01:00",
"arrivingAt": "2026-10-15T09:00:00+01:00",
"endedAt": "2026-10-15T09:00:00+01:00",
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
},
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string",
"recipientEmail": "string",
"proofRequired": [
"photo"
],
"proofRequiredOverride": [
"string"
],
"packageSize": "small",
"itemDescription": "string",
"reference": "string",
"scheduledAt": "2026-10-15T09:00:00+01:00",
"connectionId": "string",
"acceptedAt": "2026-10-15T09:00:00+01:00",
"startedAt": "2026-10-15T09:00:00+01:00",
"editable": "all",
"editedAt": "2026-10-15T09:00:00+01:00",
"editedFields": [
"string"
],
"pinDelivery": {
"channel": "whatsapp",
"state": "sending",
"whatsappErrorCode": 0,
"needsEmail": true,
"updatedAt": "2026-10-15T09:00:00+01:00"
}
}Erreurs
defaultErreur
Modifier une livraison
PATCH https://nways.ng/maps/v1/fleet/tasks/{id}
Change n’importe lequel des champs ci-dessous, vérifiés comme à la création d’une tâche ; omettez ce qui ne change pas, envoyez null pour vider un champ facultatif. Renvoie la tâche, avec les champs modifiés dans editedFields et l’en-tête X-NWays-Changed (rien de changé : aucun événement).
Quand. Tout peut changer jusqu’au retrait (editable: all) : la tâche est created, ou assigned sans pickedUpAt (et, pour un livreur N-Ways, avant qu’il la commence : sa demande peut être en attente ou acceptée). Ensuite, seulement notes et dueAt jusqu’à la fin (editable: limited) ; les autres champs répondent 409 TASK_UNDER_WAY, une tâche terminée 409 TASK_ENDED. Le véhicule change avec POST /tasks/{id}/assign ou /dispatch, jamais ici.
Ensuite. L’heure d’arrivée est recalculée et le lien de suivi reste le même. Événement task.updated (data.task, data.changed). Une demande encore en attente d’un livreur N-Ways reste la même demande avec les nouveaux détails (et au moins une minute pour répondre) ; le livreur est prévenu si le retrait, la livraison ou les heures ont changé. Un livreur qui l’a acceptée (N-Ways ou N-Ways Business) apprend ce qui a changé. Un client à qui N-Ways a déjà écrit reçoit un e-mail « modifiée » si le lieu de livraison ou une heure a changé, au plus un toutes les 10 minutes.
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
id | chemin | string | Obligatoire. |
Corps de la requête
| Champ | Type | Description |
|---|---|---|
pickup | Stop | null | null le retire (pas pour une livraison envoyée à un livreur N-Ways). |
pickupPlaceId | string | Un de vos lieux de retrait comme nouveau retrait, au lieu de pickup. |
dropoff | Stop | |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | 100 caractères au plus. |
recipientPhone | string | 32 caractères au plus. |
recipientEmail | string | Une adresse e-mail, ou "" pour aucune. |
notes | string | 500 caractères au plus. |
itemDescription | string | 200 caractères au plus. |
packageSize | string | null | Au choix: small, medium, large, null. |
reference | string | 64 caractères au plus. |
dueAt | string (date-time) | null | |
scheduledAt | string (date-time) | null | De maintenant à 60 jours. |
proofRequired | string[] | null | null : le proofRequired de vos réglages. |
area | Area | null | |
lang | string | Au choix: en, fr, pt. |
arrivingS | integer | ≥ 30, ≤ 1800. |
curl -X PATCH "https://nways.ng/maps/v1/fleet/tasks/string" \
-H "X-NWays-Api-Key: VOTRE_CLE_API" \
-H "Content-Type: application/json" \
-d '{"dropoff":{"lat":6.4549,"lng":3.4246,"name":"Office","address":"2 Kingsway Rd","Ikoyi":null},"dueAt":"2026-10-17T15:00:00Z","notes":"Call on arrival"}'const res = await fetch('https://nways.ng/maps/v1/fleet/tasks/string', {
method: 'PATCH',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"dropoff": {
"lat": 6.4549,
"lng": 3.4246,
"name": "Office",
"address": "2 Kingsway Rd",
"Ikoyi": null
},
"dueAt": "2026-10-17T15:00:00Z",
"notes": "Call on arrival"
}),
})
const data = await res.json()import os
import requests
res = requests.patch(
"https://nways.ng/maps/v1/fleet/tasks/string",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"dropoff": {"lat": 6.4549, "lng": 3.4246, "name": "Office", "address": "2 Kingsway Rd", "Ikoyi": None}, "dueAt": "2026-10-17T15:00:00Z", "notes": "Call on arrival"},
timeout=10,
)
data = res.json()Réponse
La tâche telle qu’elle est maintenant
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
ref | string | Obligatoire. Le numéro court de la livraison dans le projet, donné par N-Ways (« 1042 », affiché #1042) : pour les personnes, dans les alertes et les listes. |
status | string | Obligatoire. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled. |
vehicleId | string | null | Obligatoire. |
pickup | Stop | null | Obligatoire. |
dropoff | Stop | Obligatoire. |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | Obligatoire. |
recipientPhone | string | |
notes | string | Obligatoire. |
lang | string | Obligatoire. Au choix: en, fr, pt. |
arrivingS | integer | Obligatoire. |
eta | ETA | null | Obligatoire. Null tant qu’aucune position fraîche n’est arrivée, et une fois la tâche terminée. |
dueAt | string (date-time) | null | Obligatoire. |
late | boolean | Obligatoire. Ouverte et après dueAt, ou attendue après. |
trackingUrl | string (uri) | null | Obligatoire. Null une fois expiré. |
trackingExpiresAt | string (date-time) | null | Obligatoire. |
failureReason | string | |
createdAt | string (date-time) | Obligatoire. |
assignedAt | string (date-time) | null | Obligatoire. |
pickedUpAt | string (date-time) | null | Obligatoire. |
arrivingAt | string (date-time) | null | Obligatoire. |
endedAt | string (date-time) | null | Obligatoire. |
area | Area | null | La zone propre à la livraison : en sortir lève asset.geofence_exit. |
proofs | Proof[] | Seulement dans GET /tasks/{id} : les photos et signatures du livreur (N-Ways Business). |
proofs[].id | string | Obligatoire. |
proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
proofs[].bytes | integer | Obligatoire. |
proofs[].lat | number | null | Obligatoire. |
proofs[].lng | number | null | Obligatoire. |
proofs[].by | string | Obligatoire. Le nom du livreur. |
proofs[].createdAt | string (date-time) | Obligatoire. |
endNote | string | Seulement dans GET /tasks/{id} : ce que le livreur a écrit en terminant. |
recipientEmail | string | |
proofRequired | string[] | Celles de la livraison, sinon celles de vos réglages. |
proofRequiredOverride | string[] | null | |
packageSize | string | null | Au choix: small, medium, large, null. |
itemDescription | string | |
reference | string | |
scheduledAt | string (date-time) | null | |
connectionId | string | null | La connexion du livreur N-Ways qui l’a acceptée. |
acceptedAt | string (date-time) | null | |
startedAt | string (date-time) | null | |
editable | string | Ce que PATCH /tasks/{id} peut changer maintenant : tout, seulement notes et dueAt (retirée ou commencée), ou rien (terminée). Au choix: all, limited, none. |
editedAt | string (date-time) | null | La dernière modification. |
editedFields | string[] | Ce que la dernière modification a changé. |
pinDelivery | PinDelivery | Comment le code PIN de livraison parvient au client, quand la livraison en demande un et que les codes partent sur WhatsApp. Jamais le code lui-même. |
pinDelivery.channel | string | Obligatoire. Au choix: whatsapp, email, none. |
pinDelivery.state | string | Obligatoire. Au choix: sending, sent, delivered, read, failed. |
pinDelivery.whatsappErrorCode | integer | null | Obligatoire. L’échec de WhatsApp (131026 : pas sur WhatsApp), gardé après l’envoi du code par e-mail. |
pinDelivery.needsEmail | boolean | Obligatoire. Le client n’a pas reçu le code : envoyez-le avec POST /tasks/{id}/pin-email. |
pinDelivery.updatedAt | string (date-time) | Obligatoire. |
{
"id": "string",
"ref": "string",
"status": "created",
"vehicleId": "string",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"recipientPhone": "string",
"notes": "string",
"lang": "en",
"arrivingS": 0,
"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",
"trackingExpiresAt": "2026-10-15T09:00:00+01:00",
"failureReason": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"assignedAt": "2026-10-15T09:00:00+01:00",
"pickedUpAt": "2026-10-15T09:00:00+01:00",
"arrivingAt": "2026-10-15T09:00:00+01:00",
"endedAt": "2026-10-15T09:00:00+01:00",
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
},
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string",
"recipientEmail": "string",
"proofRequired": [
"photo"
],
"proofRequiredOverride": [
"string"
],
"packageSize": "small",
"itemDescription": "string",
"reference": "string",
"scheduledAt": "2026-10-15T09:00:00+01:00",
"connectionId": "string",
"acceptedAt": "2026-10-15T09:00:00+01:00",
"startedAt": "2026-10-15T09:00:00+01:00",
"editable": "all",
"editedAt": "2026-10-15T09:00:00+01:00",
"editedFields": [
"string"
],
"pinDelivery": {
"channel": "whatsapp",
"state": "sending",
"whatsappErrorCode": 0,
"needsEmail": true,
"updatedAt": "2026-10-15T09:00:00+01:00"
}
}Erreurs
409TASK_UNDER_WAY (seuls notes et dueAt peuvent encore changer) ou TASK_ENDED.defaultErreur
Assigner (ou réassigner) un véhicule — created|assigned → assigned ; événement task.assigned
POST https://nways.ng/maps/v1/fleet/tasks/{id}/assign
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
id | chemin | string | Obligatoire. |
Corps de la requête
| Champ | Type | Description |
|---|---|---|
vehicleId | string | Obligatoire. |
curl -X POST "https://nways.ng/maps/v1/fleet/tasks/string/assign" \
-H "X-NWays-Api-Key: VOTRE_CLE_API" \
-H "Content-Type: application/json" \
-d '{"vehicleId":"string"}'const res = await fetch('https://nways.ng/maps/v1/fleet/tasks/string/assign', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"vehicleId": "string"
}),
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/tasks/string/assign",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"vehicleId": "string"},
timeout=10,
)
data = res.json()Réponse
Tâche
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
ref | string | Obligatoire. Le numéro court de la livraison dans le projet, donné par N-Ways (« 1042 », affiché #1042) : pour les personnes, dans les alertes et les listes. |
status | string | Obligatoire. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled. |
vehicleId | string | null | Obligatoire. |
pickup | Stop | null | Obligatoire. |
dropoff | Stop | Obligatoire. |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | Obligatoire. |
recipientPhone | string | |
notes | string | Obligatoire. |
lang | string | Obligatoire. Au choix: en, fr, pt. |
arrivingS | integer | Obligatoire. |
eta | ETA | null | Obligatoire. Null tant qu’aucune position fraîche n’est arrivée, et une fois la tâche terminée. |
dueAt | string (date-time) | null | Obligatoire. |
late | boolean | Obligatoire. Ouverte et après dueAt, ou attendue après. |
trackingUrl | string (uri) | null | Obligatoire. Null une fois expiré. |
trackingExpiresAt | string (date-time) | null | Obligatoire. |
failureReason | string | |
createdAt | string (date-time) | Obligatoire. |
assignedAt | string (date-time) | null | Obligatoire. |
pickedUpAt | string (date-time) | null | Obligatoire. |
arrivingAt | string (date-time) | null | Obligatoire. |
endedAt | string (date-time) | null | Obligatoire. |
area | Area | null | La zone propre à la livraison : en sortir lève asset.geofence_exit. |
proofs | Proof[] | Seulement dans GET /tasks/{id} : les photos et signatures du livreur (N-Ways Business). |
proofs[].id | string | Obligatoire. |
proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
proofs[].bytes | integer | Obligatoire. |
proofs[].lat | number | null | Obligatoire. |
proofs[].lng | number | null | Obligatoire. |
proofs[].by | string | Obligatoire. Le nom du livreur. |
proofs[].createdAt | string (date-time) | Obligatoire. |
endNote | string | Seulement dans GET /tasks/{id} : ce que le livreur a écrit en terminant. |
recipientEmail | string | |
proofRequired | string[] | Celles de la livraison, sinon celles de vos réglages. |
proofRequiredOverride | string[] | null | |
packageSize | string | null | Au choix: small, medium, large, null. |
itemDescription | string | |
reference | string | |
scheduledAt | string (date-time) | null | |
connectionId | string | null | La connexion du livreur N-Ways qui l’a acceptée. |
acceptedAt | string (date-time) | null | |
startedAt | string (date-time) | null | |
editable | string | Ce que PATCH /tasks/{id} peut changer maintenant : tout, seulement notes et dueAt (retirée ou commencée), ou rien (terminée). Au choix: all, limited, none. |
editedAt | string (date-time) | null | La dernière modification. |
editedFields | string[] | Ce que la dernière modification a changé. |
pinDelivery | PinDelivery | Comment le code PIN de livraison parvient au client, quand la livraison en demande un et que les codes partent sur WhatsApp. Jamais le code lui-même. |
pinDelivery.channel | string | Obligatoire. Au choix: whatsapp, email, none. |
pinDelivery.state | string | Obligatoire. Au choix: sending, sent, delivered, read, failed. |
pinDelivery.whatsappErrorCode | integer | null | Obligatoire. L’échec de WhatsApp (131026 : pas sur WhatsApp), gardé après l’envoi du code par e-mail. |
pinDelivery.needsEmail | boolean | Obligatoire. Le client n’a pas reçu le code : envoyez-le avec POST /tasks/{id}/pin-email. |
pinDelivery.updatedAt | string (date-time) | Obligatoire. |
{
"id": "string",
"ref": "string",
"status": "created",
"vehicleId": "string",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"recipientPhone": "string",
"notes": "string",
"lang": "en",
"arrivingS": 0,
"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",
"trackingExpiresAt": "2026-10-15T09:00:00+01:00",
"failureReason": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"assignedAt": "2026-10-15T09:00:00+01:00",
"pickedUpAt": "2026-10-15T09:00:00+01:00",
"arrivingAt": "2026-10-15T09:00:00+01:00",
"endedAt": "2026-10-15T09:00:00+01:00",
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
},
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string",
"recipientEmail": "string",
"proofRequired": [
"photo"
],
"proofRequiredOverride": [
"string"
],
"packageSize": "small",
"itemDescription": "string",
"reference": "string",
"scheduledAt": "2026-10-15T09:00:00+01:00",
"connectionId": "string",
"acceptedAt": "2026-10-15T09:00:00+01:00",
"startedAt": "2026-10-15T09:00:00+01:00",
"editable": "all",
"editedAt": "2026-10-15T09:00:00+01:00",
"editedFields": [
"string"
],
"pinDelivery": {
"channel": "whatsapp",
"state": "sending",
"whatsappErrorCode": 0,
"needsEmail": true,
"updatedAt": "2026-10-15T09:00:00+01:00"
}
}Erreurs
defaultErreur
Marquer comme enlevé — assigned → picked_up
POST https://nways.ng/maps/v1/fleet/tasks/{id}/pickup
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
id | chemin | string | Obligatoire. |
curl -X POST "https://nways.ng/maps/v1/fleet/tasks/string/pickup" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/tasks/string/pickup', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/tasks/string/pickup",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Tâche
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
ref | string | Obligatoire. Le numéro court de la livraison dans le projet, donné par N-Ways (« 1042 », affiché #1042) : pour les personnes, dans les alertes et les listes. |
status | string | Obligatoire. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled. |
vehicleId | string | null | Obligatoire. |
pickup | Stop | null | Obligatoire. |
dropoff | Stop | Obligatoire. |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | Obligatoire. |
recipientPhone | string | |
notes | string | Obligatoire. |
lang | string | Obligatoire. Au choix: en, fr, pt. |
arrivingS | integer | Obligatoire. |
eta | ETA | null | Obligatoire. Null tant qu’aucune position fraîche n’est arrivée, et une fois la tâche terminée. |
dueAt | string (date-time) | null | Obligatoire. |
late | boolean | Obligatoire. Ouverte et après dueAt, ou attendue après. |
trackingUrl | string (uri) | null | Obligatoire. Null une fois expiré. |
trackingExpiresAt | string (date-time) | null | Obligatoire. |
failureReason | string | |
createdAt | string (date-time) | Obligatoire. |
assignedAt | string (date-time) | null | Obligatoire. |
pickedUpAt | string (date-time) | null | Obligatoire. |
arrivingAt | string (date-time) | null | Obligatoire. |
endedAt | string (date-time) | null | Obligatoire. |
area | Area | null | La zone propre à la livraison : en sortir lève asset.geofence_exit. |
proofs | Proof[] | Seulement dans GET /tasks/{id} : les photos et signatures du livreur (N-Ways Business). |
proofs[].id | string | Obligatoire. |
proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
proofs[].bytes | integer | Obligatoire. |
proofs[].lat | number | null | Obligatoire. |
proofs[].lng | number | null | Obligatoire. |
proofs[].by | string | Obligatoire. Le nom du livreur. |
proofs[].createdAt | string (date-time) | Obligatoire. |
endNote | string | Seulement dans GET /tasks/{id} : ce que le livreur a écrit en terminant. |
recipientEmail | string | |
proofRequired | string[] | Celles de la livraison, sinon celles de vos réglages. |
proofRequiredOverride | string[] | null | |
packageSize | string | null | Au choix: small, medium, large, null. |
itemDescription | string | |
reference | string | |
scheduledAt | string (date-time) | null | |
connectionId | string | null | La connexion du livreur N-Ways qui l’a acceptée. |
acceptedAt | string (date-time) | null | |
startedAt | string (date-time) | null | |
editable | string | Ce que PATCH /tasks/{id} peut changer maintenant : tout, seulement notes et dueAt (retirée ou commencée), ou rien (terminée). Au choix: all, limited, none. |
editedAt | string (date-time) | null | La dernière modification. |
editedFields | string[] | Ce que la dernière modification a changé. |
pinDelivery | PinDelivery | Comment le code PIN de livraison parvient au client, quand la livraison en demande un et que les codes partent sur WhatsApp. Jamais le code lui-même. |
pinDelivery.channel | string | Obligatoire. Au choix: whatsapp, email, none. |
pinDelivery.state | string | Obligatoire. Au choix: sending, sent, delivered, read, failed. |
pinDelivery.whatsappErrorCode | integer | null | Obligatoire. L’échec de WhatsApp (131026 : pas sur WhatsApp), gardé après l’envoi du code par e-mail. |
pinDelivery.needsEmail | boolean | Obligatoire. Le client n’a pas reçu le code : envoyez-le avec POST /tasks/{id}/pin-email. |
pinDelivery.updatedAt | string (date-time) | Obligatoire. |
{
"id": "string",
"ref": "string",
"status": "created",
"vehicleId": "string",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"recipientPhone": "string",
"notes": "string",
"lang": "en",
"arrivingS": 0,
"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",
"trackingExpiresAt": "2026-10-15T09:00:00+01:00",
"failureReason": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"assignedAt": "2026-10-15T09:00:00+01:00",
"pickedUpAt": "2026-10-15T09:00:00+01:00",
"arrivingAt": "2026-10-15T09:00:00+01:00",
"endedAt": "2026-10-15T09:00:00+01:00",
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
},
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string",
"recipientEmail": "string",
"proofRequired": [
"photo"
],
"proofRequiredOverride": [
"string"
],
"packageSize": "small",
"itemDescription": "string",
"reference": "string",
"scheduledAt": "2026-10-15T09:00:00+01:00",
"connectionId": "string",
"acceptedAt": "2026-10-15T09:00:00+01:00",
"startedAt": "2026-10-15T09:00:00+01:00",
"editable": "all",
"editedAt": "2026-10-15T09:00:00+01:00",
"editedFields": [
"string"
],
"pinDelivery": {
"channel": "whatsapp",
"state": "sending",
"whatsappErrorCode": 0,
"needsEmail": true,
"updatedAt": "2026-10-15T09:00:00+01:00"
}
}Erreurs
defaultErreur
Marquer comme livré — assigned|picked_up|arriving → completed ; événement task.completed
POST https://nways.ng/maps/v1/fleet/tasks/{id}/complete
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
id | chemin | string | Obligatoire. |
curl -X POST "https://nways.ng/maps/v1/fleet/tasks/string/complete" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/tasks/string/complete', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/tasks/string/complete",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Tâche
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
ref | string | Obligatoire. Le numéro court de la livraison dans le projet, donné par N-Ways (« 1042 », affiché #1042) : pour les personnes, dans les alertes et les listes. |
status | string | Obligatoire. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled. |
vehicleId | string | null | Obligatoire. |
pickup | Stop | null | Obligatoire. |
dropoff | Stop | Obligatoire. |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | Obligatoire. |
recipientPhone | string | |
notes | string | Obligatoire. |
lang | string | Obligatoire. Au choix: en, fr, pt. |
arrivingS | integer | Obligatoire. |
eta | ETA | null | Obligatoire. Null tant qu’aucune position fraîche n’est arrivée, et une fois la tâche terminée. |
dueAt | string (date-time) | null | Obligatoire. |
late | boolean | Obligatoire. Ouverte et après dueAt, ou attendue après. |
trackingUrl | string (uri) | null | Obligatoire. Null une fois expiré. |
trackingExpiresAt | string (date-time) | null | Obligatoire. |
failureReason | string | |
createdAt | string (date-time) | Obligatoire. |
assignedAt | string (date-time) | null | Obligatoire. |
pickedUpAt | string (date-time) | null | Obligatoire. |
arrivingAt | string (date-time) | null | Obligatoire. |
endedAt | string (date-time) | null | Obligatoire. |
area | Area | null | La zone propre à la livraison : en sortir lève asset.geofence_exit. |
proofs | Proof[] | Seulement dans GET /tasks/{id} : les photos et signatures du livreur (N-Ways Business). |
proofs[].id | string | Obligatoire. |
proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
proofs[].bytes | integer | Obligatoire. |
proofs[].lat | number | null | Obligatoire. |
proofs[].lng | number | null | Obligatoire. |
proofs[].by | string | Obligatoire. Le nom du livreur. |
proofs[].createdAt | string (date-time) | Obligatoire. |
endNote | string | Seulement dans GET /tasks/{id} : ce que le livreur a écrit en terminant. |
recipientEmail | string | |
proofRequired | string[] | Celles de la livraison, sinon celles de vos réglages. |
proofRequiredOverride | string[] | null | |
packageSize | string | null | Au choix: small, medium, large, null. |
itemDescription | string | |
reference | string | |
scheduledAt | string (date-time) | null | |
connectionId | string | null | La connexion du livreur N-Ways qui l’a acceptée. |
acceptedAt | string (date-time) | null | |
startedAt | string (date-time) | null | |
editable | string | Ce que PATCH /tasks/{id} peut changer maintenant : tout, seulement notes et dueAt (retirée ou commencée), ou rien (terminée). Au choix: all, limited, none. |
editedAt | string (date-time) | null | La dernière modification. |
editedFields | string[] | Ce que la dernière modification a changé. |
pinDelivery | PinDelivery | Comment le code PIN de livraison parvient au client, quand la livraison en demande un et que les codes partent sur WhatsApp. Jamais le code lui-même. |
pinDelivery.channel | string | Obligatoire. Au choix: whatsapp, email, none. |
pinDelivery.state | string | Obligatoire. Au choix: sending, sent, delivered, read, failed. |
pinDelivery.whatsappErrorCode | integer | null | Obligatoire. L’échec de WhatsApp (131026 : pas sur WhatsApp), gardé après l’envoi du code par e-mail. |
pinDelivery.needsEmail | boolean | Obligatoire. Le client n’a pas reçu le code : envoyez-le avec POST /tasks/{id}/pin-email. |
pinDelivery.updatedAt | string (date-time) | Obligatoire. |
{
"id": "string",
"ref": "string",
"status": "created",
"vehicleId": "string",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"recipientPhone": "string",
"notes": "string",
"lang": "en",
"arrivingS": 0,
"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",
"trackingExpiresAt": "2026-10-15T09:00:00+01:00",
"failureReason": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"assignedAt": "2026-10-15T09:00:00+01:00",
"pickedUpAt": "2026-10-15T09:00:00+01:00",
"arrivingAt": "2026-10-15T09:00:00+01:00",
"endedAt": "2026-10-15T09:00:00+01:00",
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
},
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string",
"recipientEmail": "string",
"proofRequired": [
"photo"
],
"proofRequiredOverride": [
"string"
],
"packageSize": "small",
"itemDescription": "string",
"reference": "string",
"scheduledAt": "2026-10-15T09:00:00+01:00",
"connectionId": "string",
"acceptedAt": "2026-10-15T09:00:00+01:00",
"startedAt": "2026-10-15T09:00:00+01:00",
"editable": "all",
"editedAt": "2026-10-15T09:00:00+01:00",
"editedFields": [
"string"
],
"pinDelivery": {
"channel": "whatsapp",
"state": "sending",
"whatsappErrorCode": 0,
"needsEmail": true,
"updatedAt": "2026-10-15T09:00:00+01:00"
}
}Erreurs
defaultErreur
Marquer comme échoué — tout statut ouvert → failed ; événement task.failed
POST https://nways.ng/maps/v1/fleet/tasks/{id}/fail
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
id | chemin | string | Obligatoire. |
Corps de la requête
| Champ | Type | Description |
|---|---|---|
reason | string | 200 caractères au plus. |
curl -X POST "https://nways.ng/maps/v1/fleet/tasks/string/fail" \
-H "X-NWays-Api-Key: VOTRE_CLE_API" \
-H "Content-Type: application/json" \
-d '{"reason":"string"}'const res = await fetch('https://nways.ng/maps/v1/fleet/tasks/string/fail', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"reason": "string"
}),
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/tasks/string/fail",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"reason": "string"},
timeout=10,
)
data = res.json()Réponse
Tâche
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
ref | string | Obligatoire. Le numéro court de la livraison dans le projet, donné par N-Ways (« 1042 », affiché #1042) : pour les personnes, dans les alertes et les listes. |
status | string | Obligatoire. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled. |
vehicleId | string | null | Obligatoire. |
pickup | Stop | null | Obligatoire. |
dropoff | Stop | Obligatoire. |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | Obligatoire. |
recipientPhone | string | |
notes | string | Obligatoire. |
lang | string | Obligatoire. Au choix: en, fr, pt. |
arrivingS | integer | Obligatoire. |
eta | ETA | null | Obligatoire. Null tant qu’aucune position fraîche n’est arrivée, et une fois la tâche terminée. |
dueAt | string (date-time) | null | Obligatoire. |
late | boolean | Obligatoire. Ouverte et après dueAt, ou attendue après. |
trackingUrl | string (uri) | null | Obligatoire. Null une fois expiré. |
trackingExpiresAt | string (date-time) | null | Obligatoire. |
failureReason | string | |
createdAt | string (date-time) | Obligatoire. |
assignedAt | string (date-time) | null | Obligatoire. |
pickedUpAt | string (date-time) | null | Obligatoire. |
arrivingAt | string (date-time) | null | Obligatoire. |
endedAt | string (date-time) | null | Obligatoire. |
area | Area | null | La zone propre à la livraison : en sortir lève asset.geofence_exit. |
proofs | Proof[] | Seulement dans GET /tasks/{id} : les photos et signatures du livreur (N-Ways Business). |
proofs[].id | string | Obligatoire. |
proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
proofs[].bytes | integer | Obligatoire. |
proofs[].lat | number | null | Obligatoire. |
proofs[].lng | number | null | Obligatoire. |
proofs[].by | string | Obligatoire. Le nom du livreur. |
proofs[].createdAt | string (date-time) | Obligatoire. |
endNote | string | Seulement dans GET /tasks/{id} : ce que le livreur a écrit en terminant. |
recipientEmail | string | |
proofRequired | string[] | Celles de la livraison, sinon celles de vos réglages. |
proofRequiredOverride | string[] | null | |
packageSize | string | null | Au choix: small, medium, large, null. |
itemDescription | string | |
reference | string | |
scheduledAt | string (date-time) | null | |
connectionId | string | null | La connexion du livreur N-Ways qui l’a acceptée. |
acceptedAt | string (date-time) | null | |
startedAt | string (date-time) | null | |
editable | string | Ce que PATCH /tasks/{id} peut changer maintenant : tout, seulement notes et dueAt (retirée ou commencée), ou rien (terminée). Au choix: all, limited, none. |
editedAt | string (date-time) | null | La dernière modification. |
editedFields | string[] | Ce que la dernière modification a changé. |
pinDelivery | PinDelivery | Comment le code PIN de livraison parvient au client, quand la livraison en demande un et que les codes partent sur WhatsApp. Jamais le code lui-même. |
pinDelivery.channel | string | Obligatoire. Au choix: whatsapp, email, none. |
pinDelivery.state | string | Obligatoire. Au choix: sending, sent, delivered, read, failed. |
pinDelivery.whatsappErrorCode | integer | null | Obligatoire. L’échec de WhatsApp (131026 : pas sur WhatsApp), gardé après l’envoi du code par e-mail. |
pinDelivery.needsEmail | boolean | Obligatoire. Le client n’a pas reçu le code : envoyez-le avec POST /tasks/{id}/pin-email. |
pinDelivery.updatedAt | string (date-time) | Obligatoire. |
{
"id": "string",
"ref": "string",
"status": "created",
"vehicleId": "string",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"recipientPhone": "string",
"notes": "string",
"lang": "en",
"arrivingS": 0,
"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",
"trackingExpiresAt": "2026-10-15T09:00:00+01:00",
"failureReason": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"assignedAt": "2026-10-15T09:00:00+01:00",
"pickedUpAt": "2026-10-15T09:00:00+01:00",
"arrivingAt": "2026-10-15T09:00:00+01:00",
"endedAt": "2026-10-15T09:00:00+01:00",
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
},
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string",
"recipientEmail": "string",
"proofRequired": [
"photo"
],
"proofRequiredOverride": [
"string"
],
"packageSize": "small",
"itemDescription": "string",
"reference": "string",
"scheduledAt": "2026-10-15T09:00:00+01:00",
"connectionId": "string",
"acceptedAt": "2026-10-15T09:00:00+01:00",
"startedAt": "2026-10-15T09:00:00+01:00",
"editable": "all",
"editedAt": "2026-10-15T09:00:00+01:00",
"editedFields": [
"string"
],
"pinDelivery": {
"channel": "whatsapp",
"state": "sending",
"whatsappErrorCode": 0,
"needsEmail": true,
"updatedAt": "2026-10-15T09:00:00+01:00"
}
}Erreurs
defaultErreur
Annuler — tout statut ouvert → cancelled
POST https://nways.ng/maps/v1/fleet/tasks/{id}/cancel
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
id | chemin | string | Obligatoire. |
curl -X POST "https://nways.ng/maps/v1/fleet/tasks/string/cancel" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/tasks/string/cancel', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/tasks/string/cancel",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Tâche
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
ref | string | Obligatoire. Le numéro court de la livraison dans le projet, donné par N-Ways (« 1042 », affiché #1042) : pour les personnes, dans les alertes et les listes. |
status | string | Obligatoire. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled. |
vehicleId | string | null | Obligatoire. |
pickup | Stop | null | Obligatoire. |
dropoff | Stop | Obligatoire. |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | Obligatoire. |
recipientPhone | string | |
notes | string | Obligatoire. |
lang | string | Obligatoire. Au choix: en, fr, pt. |
arrivingS | integer | Obligatoire. |
eta | ETA | null | Obligatoire. Null tant qu’aucune position fraîche n’est arrivée, et une fois la tâche terminée. |
dueAt | string (date-time) | null | Obligatoire. |
late | boolean | Obligatoire. Ouverte et après dueAt, ou attendue après. |
trackingUrl | string (uri) | null | Obligatoire. Null une fois expiré. |
trackingExpiresAt | string (date-time) | null | Obligatoire. |
failureReason | string | |
createdAt | string (date-time) | Obligatoire. |
assignedAt | string (date-time) | null | Obligatoire. |
pickedUpAt | string (date-time) | null | Obligatoire. |
arrivingAt | string (date-time) | null | Obligatoire. |
endedAt | string (date-time) | null | Obligatoire. |
area | Area | null | La zone propre à la livraison : en sortir lève asset.geofence_exit. |
proofs | Proof[] | Seulement dans GET /tasks/{id} : les photos et signatures du livreur (N-Ways Business). |
proofs[].id | string | Obligatoire. |
proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
proofs[].bytes | integer | Obligatoire. |
proofs[].lat | number | null | Obligatoire. |
proofs[].lng | number | null | Obligatoire. |
proofs[].by | string | Obligatoire. Le nom du livreur. |
proofs[].createdAt | string (date-time) | Obligatoire. |
endNote | string | Seulement dans GET /tasks/{id} : ce que le livreur a écrit en terminant. |
recipientEmail | string | |
proofRequired | string[] | Celles de la livraison, sinon celles de vos réglages. |
proofRequiredOverride | string[] | null | |
packageSize | string | null | Au choix: small, medium, large, null. |
itemDescription | string | |
reference | string | |
scheduledAt | string (date-time) | null | |
connectionId | string | null | La connexion du livreur N-Ways qui l’a acceptée. |
acceptedAt | string (date-time) | null | |
startedAt | string (date-time) | null | |
editable | string | Ce que PATCH /tasks/{id} peut changer maintenant : tout, seulement notes et dueAt (retirée ou commencée), ou rien (terminée). Au choix: all, limited, none. |
editedAt | string (date-time) | null | La dernière modification. |
editedFields | string[] | Ce que la dernière modification a changé. |
pinDelivery | PinDelivery | Comment le code PIN de livraison parvient au client, quand la livraison en demande un et que les codes partent sur WhatsApp. Jamais le code lui-même. |
pinDelivery.channel | string | Obligatoire. Au choix: whatsapp, email, none. |
pinDelivery.state | string | Obligatoire. Au choix: sending, sent, delivered, read, failed. |
pinDelivery.whatsappErrorCode | integer | null | Obligatoire. L’échec de WhatsApp (131026 : pas sur WhatsApp), gardé après l’envoi du code par e-mail. |
pinDelivery.needsEmail | boolean | Obligatoire. Le client n’a pas reçu le code : envoyez-le avec POST /tasks/{id}/pin-email. |
pinDelivery.updatedAt | string (date-time) | Obligatoire. |
{
"id": "string",
"ref": "string",
"status": "created",
"vehicleId": "string",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"recipientPhone": "string",
"notes": "string",
"lang": "en",
"arrivingS": 0,
"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",
"trackingExpiresAt": "2026-10-15T09:00:00+01:00",
"failureReason": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"assignedAt": "2026-10-15T09:00:00+01:00",
"pickedUpAt": "2026-10-15T09:00:00+01:00",
"arrivingAt": "2026-10-15T09:00:00+01:00",
"endedAt": "2026-10-15T09:00:00+01:00",
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
},
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string",
"recipientEmail": "string",
"proofRequired": [
"photo"
],
"proofRequiredOverride": [
"string"
],
"packageSize": "small",
"itemDescription": "string",
"reference": "string",
"scheduledAt": "2026-10-15T09:00:00+01:00",
"connectionId": "string",
"acceptedAt": "2026-10-15T09:00:00+01:00",
"startedAt": "2026-10-15T09:00:00+01:00",
"editable": "all",
"editedAt": "2026-10-15T09:00:00+01:00",
"editedFields": [
"string"
],
"pinDelivery": {
"channel": "whatsapp",
"state": "sending",
"whatsappErrorCode": 0,
"needsEmail": true,
"updatedAt": "2026-10-15T09:00:00+01:00"
}
}Erreurs
defaultErreur
Envoyer le code PIN de livraison au client par e-mail
POST https://nways.ng/maps/v1/fleet/tasks/{id}/pin-email
Pour une livraison qui demande un code PIN, jusqu’à sa fin : garde l’e-mail sur la livraison et y envoie le code (la solution quand pinDelivery.needsEmail vaut true). Vous ne voyez jamais le code.
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
id | chemin | string | Obligatoire. |
Corps de la requête
| Champ | Type | Description |
|---|---|---|
email | string (email) | Obligatoire. |
curl -X POST "https://nways.ng/maps/v1/fleet/tasks/string/pin-email" \
-H "X-NWays-Api-Key: VOTRE_CLE_API" \
-H "Content-Type: application/json" \
-d '{"email":"ngozi@example.com"}'const res = await fetch('https://nways.ng/maps/v1/fleet/tasks/string/pin-email', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"email": "ngozi@example.com"
}),
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/tasks/string/pin-email",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"email": "ngozi@example.com"},
timeout=10,
)
data = res.json()Réponse
La livraison
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
ref | string | Obligatoire. Le numéro court de la livraison dans le projet, donné par N-Ways (« 1042 », affiché #1042) : pour les personnes, dans les alertes et les listes. |
status | string | Obligatoire. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled. |
vehicleId | string | null | Obligatoire. |
pickup | Stop | null | Obligatoire. |
dropoff | Stop | Obligatoire. |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | Obligatoire. |
recipientPhone | string | |
notes | string | Obligatoire. |
lang | string | Obligatoire. Au choix: en, fr, pt. |
arrivingS | integer | Obligatoire. |
eta | ETA | null | Obligatoire. Null tant qu’aucune position fraîche n’est arrivée, et une fois la tâche terminée. |
dueAt | string (date-time) | null | Obligatoire. |
late | boolean | Obligatoire. Ouverte et après dueAt, ou attendue après. |
trackingUrl | string (uri) | null | Obligatoire. Null une fois expiré. |
trackingExpiresAt | string (date-time) | null | Obligatoire. |
failureReason | string | |
createdAt | string (date-time) | Obligatoire. |
assignedAt | string (date-time) | null | Obligatoire. |
pickedUpAt | string (date-time) | null | Obligatoire. |
arrivingAt | string (date-time) | null | Obligatoire. |
endedAt | string (date-time) | null | Obligatoire. |
area | Area | null | La zone propre à la livraison : en sortir lève asset.geofence_exit. |
proofs | Proof[] | Seulement dans GET /tasks/{id} : les photos et signatures du livreur (N-Ways Business). |
proofs[].id | string | Obligatoire. |
proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
proofs[].bytes | integer | Obligatoire. |
proofs[].lat | number | null | Obligatoire. |
proofs[].lng | number | null | Obligatoire. |
proofs[].by | string | Obligatoire. Le nom du livreur. |
proofs[].createdAt | string (date-time) | Obligatoire. |
endNote | string | Seulement dans GET /tasks/{id} : ce que le livreur a écrit en terminant. |
recipientEmail | string | |
proofRequired | string[] | Celles de la livraison, sinon celles de vos réglages. |
proofRequiredOverride | string[] | null | |
packageSize | string | null | Au choix: small, medium, large, null. |
itemDescription | string | |
reference | string | |
scheduledAt | string (date-time) | null | |
connectionId | string | null | La connexion du livreur N-Ways qui l’a acceptée. |
acceptedAt | string (date-time) | null | |
startedAt | string (date-time) | null | |
editable | string | Ce que PATCH /tasks/{id} peut changer maintenant : tout, seulement notes et dueAt (retirée ou commencée), ou rien (terminée). Au choix: all, limited, none. |
editedAt | string (date-time) | null | La dernière modification. |
editedFields | string[] | Ce que la dernière modification a changé. |
pinDelivery | PinDelivery | Comment le code PIN de livraison parvient au client, quand la livraison en demande un et que les codes partent sur WhatsApp. Jamais le code lui-même. |
pinDelivery.channel | string | Obligatoire. Au choix: whatsapp, email, none. |
pinDelivery.state | string | Obligatoire. Au choix: sending, sent, delivered, read, failed. |
pinDelivery.whatsappErrorCode | integer | null | Obligatoire. L’échec de WhatsApp (131026 : pas sur WhatsApp), gardé après l’envoi du code par e-mail. |
pinDelivery.needsEmail | boolean | Obligatoire. Le client n’a pas reçu le code : envoyez-le avec POST /tasks/{id}/pin-email. |
pinDelivery.updatedAt | string (date-time) | Obligatoire. |
{
"id": "string",
"ref": "string",
"status": "created",
"vehicleId": "string",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"recipientPhone": "string",
"notes": "string",
"lang": "en",
"arrivingS": 0,
"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",
"trackingExpiresAt": "2026-10-15T09:00:00+01:00",
"failureReason": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"assignedAt": "2026-10-15T09:00:00+01:00",
"pickedUpAt": "2026-10-15T09:00:00+01:00",
"arrivingAt": "2026-10-15T09:00:00+01:00",
"endedAt": "2026-10-15T09:00:00+01:00",
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
},
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string",
"recipientEmail": "string",
"proofRequired": [
"photo"
],
"proofRequiredOverride": [
"string"
],
"packageSize": "small",
"itemDescription": "string",
"reference": "string",
"scheduledAt": "2026-10-15T09:00:00+01:00",
"connectionId": "string",
"acceptedAt": "2026-10-15T09:00:00+01:00",
"startedAt": "2026-10-15T09:00:00+01:00",
"editable": "all",
"editedAt": "2026-10-15T09:00:00+01:00",
"editedFields": [
"string"
],
"pinDelivery": {
"channel": "whatsapp",
"state": "sending",
"whatsappErrorCode": 0,
"needsEmail": true,
"updatedAt": "2026-10-15T09:00:00+01:00"
}
}Erreurs
defaultErreur
Si un code PIN de livraison peut aller à un numéro sur WhatsApp
GET https://nways.ng/maps/v1/fleet/whatsapp/number
WhatsApp ne peut pas dire à l’avance si un numéro est sur WhatsApp : known est un numéro sur lequel votre client a déjà reçu un code, unreachable un numéro que WhatsApp n’a pas pu joindre récemment (une livraison qui demande un code a alors besoin de recipientEmail).
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
phone | requête | string | Tel que saisi : +234…, ou à la manière locale de votre pays. 32 caractères au plus. |
curl "https://nways.ng/maps/v1/fleet/whatsapp/number" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/whatsapp/number', {
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/whatsapp/number",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
La joignabilité du numéro
| Champ | Type | Description |
|---|---|---|
enabled | boolean | Obligatoire. Les codes partent sur WhatsApp. Si false, ils partent par e-mail et notification. |
phone | string | Obligatoire. Le numéro au format E.164 ("" s’il n’en est pas un). |
valid | boolean | Obligatoire. |
known | boolean | Obligatoire. |
unreachable | boolean | Obligatoire. |
{
"enabled": true,
"phone": "+2348031234567",
"valid": true,
"known": true,
"unreachable": true
}Erreurs
defaultErreur
Définir ou effacer la zone propre d’une livraison
POST https://nways.ng/maps/v1/fleet/tasks/{id}/area
En sortir lève asset.geofence_exit (par vos règles geofence_exit de zone dispatch, ou une règle par défaut).
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
id | chemin | string | Obligatoire. |
Corps de la requête
| Champ | Type | Description |
|---|---|---|
area | Area | null | Obligatoire. |
curl -X POST "https://nways.ng/maps/v1/fleet/tasks/string/area" \
-H "X-NWays-Api-Key: VOTRE_CLE_API" \
-H "Content-Type: application/json" \
-d '{"area":{"type":"circle","lat":6.48,"lng":3.43,"radiusM":2500}}'const res = await fetch('https://nways.ng/maps/v1/fleet/tasks/string/area', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
}
}),
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/tasks/string/area",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"area": {"type": "circle", "lat": 6.48, "lng": 3.43, "radiusM": 2500}},
timeout=10,
)
data = res.json()Réponse
La tâche
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
ref | string | Obligatoire. Le numéro court de la livraison dans le projet, donné par N-Ways (« 1042 », affiché #1042) : pour les personnes, dans les alertes et les listes. |
status | string | Obligatoire. Au choix: created, assigned, picked_up, arriving, completed, failed, cancelled. |
vehicleId | string | null | Obligatoire. |
pickup | Stop | null | Obligatoire. |
dropoff | Stop | Obligatoire. |
dropoff.lat | number | Obligatoire. |
dropoff.lng | number | Obligatoire. |
dropoff.name | string | 120 caractères au plus. |
dropoff.address | string | 300 caractères au plus. |
recipientName | string | Obligatoire. |
recipientPhone | string | |
notes | string | Obligatoire. |
lang | string | Obligatoire. Au choix: en, fr, pt. |
arrivingS | integer | Obligatoire. |
eta | ETA | null | Obligatoire. Null tant qu’aucune position fraîche n’est arrivée, et une fois la tâche terminée. |
dueAt | string (date-time) | null | Obligatoire. |
late | boolean | Obligatoire. Ouverte et après dueAt, ou attendue après. |
trackingUrl | string (uri) | null | Obligatoire. Null une fois expiré. |
trackingExpiresAt | string (date-time) | null | Obligatoire. |
failureReason | string | |
createdAt | string (date-time) | Obligatoire. |
assignedAt | string (date-time) | null | Obligatoire. |
pickedUpAt | string (date-time) | null | Obligatoire. |
arrivingAt | string (date-time) | null | Obligatoire. |
endedAt | string (date-time) | null | Obligatoire. |
area | Area | null | La zone propre à la livraison : en sortir lève asset.geofence_exit. |
proofs | Proof[] | Seulement dans GET /tasks/{id} : les photos et signatures du livreur (N-Ways Business). |
proofs[].id | string | Obligatoire. |
proofs[].kind | string | Obligatoire. Au choix: photo, signature. |
proofs[].contentType | string | Obligatoire. Au choix: image/jpeg, image/png, image/webp. |
proofs[].bytes | integer | Obligatoire. |
proofs[].lat | number | null | Obligatoire. |
proofs[].lng | number | null | Obligatoire. |
proofs[].by | string | Obligatoire. Le nom du livreur. |
proofs[].createdAt | string (date-time) | Obligatoire. |
endNote | string | Seulement dans GET /tasks/{id} : ce que le livreur a écrit en terminant. |
recipientEmail | string | |
proofRequired | string[] | Celles de la livraison, sinon celles de vos réglages. |
proofRequiredOverride | string[] | null | |
packageSize | string | null | Au choix: small, medium, large, null. |
itemDescription | string | |
reference | string | |
scheduledAt | string (date-time) | null | |
connectionId | string | null | La connexion du livreur N-Ways qui l’a acceptée. |
acceptedAt | string (date-time) | null | |
startedAt | string (date-time) | null | |
editable | string | Ce que PATCH /tasks/{id} peut changer maintenant : tout, seulement notes et dueAt (retirée ou commencée), ou rien (terminée). Au choix: all, limited, none. |
editedAt | string (date-time) | null | La dernière modification. |
editedFields | string[] | Ce que la dernière modification a changé. |
pinDelivery | PinDelivery | Comment le code PIN de livraison parvient au client, quand la livraison en demande un et que les codes partent sur WhatsApp. Jamais le code lui-même. |
pinDelivery.channel | string | Obligatoire. Au choix: whatsapp, email, none. |
pinDelivery.state | string | Obligatoire. Au choix: sending, sent, delivered, read, failed. |
pinDelivery.whatsappErrorCode | integer | null | Obligatoire. L’échec de WhatsApp (131026 : pas sur WhatsApp), gardé après l’envoi du code par e-mail. |
pinDelivery.needsEmail | boolean | Obligatoire. Le client n’a pas reçu le code : envoyez-le avec POST /tasks/{id}/pin-email. |
pinDelivery.updatedAt | string (date-time) | Obligatoire. |
{
"id": "string",
"ref": "string",
"status": "created",
"vehicleId": "string",
"pickup": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"dropoff": {
"lat": 0,
"lng": 0,
"name": "string",
"address": "string"
},
"recipientName": "string",
"recipientPhone": "string",
"notes": "string",
"lang": "en",
"arrivingS": 0,
"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",
"trackingExpiresAt": "2026-10-15T09:00:00+01:00",
"failureReason": "string",
"createdAt": "2026-10-15T09:00:00+01:00",
"assignedAt": "2026-10-15T09:00:00+01:00",
"pickedUpAt": "2026-10-15T09:00:00+01:00",
"arrivingAt": "2026-10-15T09:00:00+01:00",
"endedAt": "2026-10-15T09:00:00+01:00",
"area": {
"type": "circle",
"lat": 6.48,
"lng": 3.43,
"radiusM": 2500
},
"proofs": [
{
"id": "string",
"kind": "photo",
"contentType": "image/jpeg",
"bytes": 0,
"lat": 0,
"lng": 0,
"by": "string",
"createdAt": "2026-10-15T09:00:00+01:00"
}
],
"endNote": "string",
"recipientEmail": "string",
"proofRequired": [
"photo"
],
"proofRequiredOverride": [
"string"
],
"packageSize": "small",
"itemDescription": "string",
"reference": "string",
"scheduledAt": "2026-10-15T09:00:00+01:00",
"connectionId": "string",
"acceptedAt": "2026-10-15T09:00:00+01:00",
"startedAt": "2026-10-15T09:00:00+01:00",
"editable": "all",
"editedAt": "2026-10-15T09:00:00+01:00",
"editedFields": [
"string"
],
"pinDelivery": {
"channel": "whatsapp",
"state": "sending",
"whatsappErrorCode": 0,
"needsEmail": true,
"updatedAt": "2026-10-15T09:00:00+01:00"
}
}Erreurs
defaultErreur
Lister vos lieux de retrait (celui par défaut d’abord)
GET https://nways.ng/maps/v1/fleet/places
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
q | requête | string | Cherche un nom, une adresse ou un code de porte. |
curl "https://nways.ng/maps/v1/fleet/places" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/places', {
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/places",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Lieux
| Champ | Type | Description |
|---|---|---|
places | Place[] | Obligatoire. |
places[].id | string | Obligatoire. |
places[].name | string | Obligatoire. |
places[].doorCode | string | Obligatoire. Le code de porte NIPOST ou GhanaPost par lequel il a été trouvé ("" pour aucun). |
places[].address | string | Obligatoire. |
places[].lat | number | Obligatoire. |
places[].lng | number | Obligatoire. |
places[].phone | string | Obligatoire. |
places[].hours | string | Obligatoire. |
places[].default | boolean | Obligatoire. Les nouvelles livraisons de la console partent de lui. |
places[].createdAt | string (date-time) | Obligatoire. |
places[].updatedAt | string (date-time) | Obligatoire. |
{
"places": [
{
"id": "plc_4fQ9xLm2Za",
"name": "Yaba warehouse",
"doorCode": "string",
"address": "string",
"lat": 0,
"lng": 0,
"phone": "string",
"hours": "Mon–Sat 8:00–18:00",
"default": true,
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00"
}
]
}Erreurs
defaultErreur
Ajouter un lieu de retrait (jusqu’à 200)
POST https://nways.ng/maps/v1/fleet/places
Votre premier lieu est celui par défaut sauf avis contraire ; en mettre un par défaut retire les autres.
Corps de la requête
name, lat et lng sont obligatoires pour en ajouter un.
| Champ | Type | Description |
|---|---|---|
name | string | 100 caractères au plus. |
doorCode | string | 32 caractères au plus. |
address | string | 300 caractères au plus. |
lat | number | |
lng | number | |
phone | string | 32 caractères au plus. |
hours | string | 200 caractères au plus. |
default | boolean |
curl -X POST "https://nways.ng/maps/v1/fleet/places" \
-H "X-NWays-Api-Key: VOTRE_CLE_API" \
-H "Content-Type: application/json" \
-d '{"name":"Yaba warehouse","doorCode":"LA14A18BE13","address":"12 Herbert Macaulay Way","lat":6.5095,"lng":3.3711,"phone":"+234 803 000 0000","hours":"Mon–Sat 8:00–18:00"}'const res = await fetch('https://nways.ng/maps/v1/fleet/places', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"name": "Yaba warehouse",
"doorCode": "LA14A18BE13",
"address": "12 Herbert Macaulay Way",
"lat": 6.5095,
"lng": 3.3711,
"phone": "+234 803 000 0000",
"hours": "Mon–Sat 8:00–18:00"
}),
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/places",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"name": "Yaba warehouse", "doorCode": "LA14A18BE13", "address": "12 Herbert Macaulay Way", "lat": 6.5095, "lng": 3.3711, "phone": "+234 803 000 0000", "hours": "Mon–Sat 8:00–18:00"},
timeout=10,
)
data = res.json()Réponse
Créé
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
name | string | Obligatoire. |
doorCode | string | Obligatoire. Le code de porte NIPOST ou GhanaPost par lequel il a été trouvé ("" pour aucun). |
address | string | Obligatoire. |
lat | number | Obligatoire. |
lng | number | Obligatoire. |
phone | string | Obligatoire. |
hours | string | Obligatoire. |
default | boolean | Obligatoire. Les nouvelles livraisons de la console partent de lui. |
createdAt | string (date-time) | Obligatoire. |
updatedAt | string (date-time) | Obligatoire. |
{
"id": "plc_4fQ9xLm2Za",
"name": "Yaba warehouse",
"doorCode": "string",
"address": "string",
"lat": 0,
"lng": 0,
"phone": "string",
"hours": "Mon–Sat 8:00–18:00",
"default": true,
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00"
}Erreurs
defaultErreur
Obtenir un lieu de retrait
GET https://nways.ng/maps/v1/fleet/places/{placeId}
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
placeId | chemin | string | Obligatoire. |
curl "https://nways.ng/maps/v1/fleet/places/plc_4fQ9xLm2Za" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/places/plc_4fQ9xLm2Za', {
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/places/plc_4fQ9xLm2Za",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Lieu
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
name | string | Obligatoire. |
doorCode | string | Obligatoire. Le code de porte NIPOST ou GhanaPost par lequel il a été trouvé ("" pour aucun). |
address | string | Obligatoire. |
lat | number | Obligatoire. |
lng | number | Obligatoire. |
phone | string | Obligatoire. |
hours | string | Obligatoire. |
default | boolean | Obligatoire. Les nouvelles livraisons de la console partent de lui. |
createdAt | string (date-time) | Obligatoire. |
updatedAt | string (date-time) | Obligatoire. |
{
"id": "plc_4fQ9xLm2Za",
"name": "Yaba warehouse",
"doorCode": "string",
"address": "string",
"lat": 0,
"lng": 0,
"phone": "string",
"hours": "Mon–Sat 8:00–18:00",
"default": true,
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00"
}Erreurs
defaultErreur
Modifier un lieu de retrait
PATCH https://nways.ng/maps/v1/fleet/places/{placeId}
Les livraisons déjà créées depuis ce lieu gardent leur retrait.
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
placeId | chemin | string | Obligatoire. |
Corps de la requête
name, lat et lng sont obligatoires pour en ajouter un.
| Champ | Type | Description |
|---|---|---|
name | string | 100 caractères au plus. |
doorCode | string | 32 caractères au plus. |
address | string | 300 caractères au plus. |
lat | number | |
lng | number | |
phone | string | 32 caractères au plus. |
hours | string | 200 caractères au plus. |
default | boolean |
curl -X PATCH "https://nways.ng/maps/v1/fleet/places/plc_4fQ9xLm2Za" \
-H "X-NWays-Api-Key: VOTRE_CLE_API" \
-H "Content-Type: application/json" \
-d '{"name":"string","doorCode":"string","address":"string","lat":0,"lng":0,"phone":"string","hours":"string","default":true}'const res = await fetch('https://nways.ng/maps/v1/fleet/places/plc_4fQ9xLm2Za', {
method: 'PATCH',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"name": "string",
"doorCode": "string",
"address": "string",
"lat": 0,
"lng": 0,
"phone": "string",
"hours": "string",
"default": true
}),
})
const data = await res.json()import os
import requests
res = requests.patch(
"https://nways.ng/maps/v1/fleet/places/plc_4fQ9xLm2Za",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
json={"name": "string", "doorCode": "string", "address": "string", "lat": 0, "lng": 0, "phone": "string", "hours": "string", "default": True},
timeout=10,
)
data = res.json()Réponse
Lieu
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
name | string | Obligatoire. |
doorCode | string | Obligatoire. Le code de porte NIPOST ou GhanaPost par lequel il a été trouvé ("" pour aucun). |
address | string | Obligatoire. |
lat | number | Obligatoire. |
lng | number | Obligatoire. |
phone | string | Obligatoire. |
hours | string | Obligatoire. |
default | boolean | Obligatoire. Les nouvelles livraisons de la console partent de lui. |
createdAt | string (date-time) | Obligatoire. |
updatedAt | string (date-time) | Obligatoire. |
{
"id": "plc_4fQ9xLm2Za",
"name": "Yaba warehouse",
"doorCode": "string",
"address": "string",
"lat": 0,
"lng": 0,
"phone": "string",
"hours": "Mon–Sat 8:00–18:00",
"default": true,
"createdAt": "2026-10-15T09:00:00+01:00",
"updatedAt": "2026-10-15T09:00:00+01:00"
}Erreurs
defaultErreur
Supprimer un lieu de retrait
DELETE https://nways.ng/maps/v1/fleet/places/{placeId}
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
placeId | chemin | string | Obligatoire. |
curl -X DELETE "https://nways.ng/maps/v1/fleet/places/plc_4fQ9xLm2Za" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/places/plc_4fQ9xLm2Za', {
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/places/plc_4fQ9xLm2Za",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Supprimé
Pas de contenu.
Erreurs
defaultErreur
Lister vos clients, dernière livraison d’abord
GET https://nways.ng/maps/v1/fleet/customers
Un client regroupe toutes vos livraisons au même téléphone (quelle que soit son écriture), sinon au même e-mail, sinon au même nom. Gardés à partir de vos livraisons, à leur création et modification, un an après leur dernière livraison.
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
q | requête | string | Cherche un nom, un e-mail ou une partie d’un numéro de téléphone. |
limit | requête | integer | Par défaut: 25. ≥ 1, ≤ 100. |
pageToken | requête | string | nextPageToken (ou prevPageToken) d’une autre page. |
curl "https://nways.ng/maps/v1/fleet/customers" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/customers', {
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/customers",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Clients
| Champ | Type | Description |
|---|---|---|
customers | Customer[] | Obligatoire. |
customers[].id | string | Obligatoire. |
customers[].name | string | Obligatoire. Comme la dernière livraison l’a nommé. |
customers[].phone | string | Obligatoire. |
customers[].email | string | Obligatoire. |
customers[].deliveries | integer | Obligatoire. |
customers[].addresses | integer | Obligatoire. |
customers[].lastDeliveryAt | string (date-time) | Obligatoire. |
customers[].lastAddress | Address | null | Obligatoire. Où est allée la dernière livraison. |
nextPageToken | string | |
prevPageToken | string | |
offset | integer | Obligatoire. |
{
"customers": [
{
"id": "cus_4fQ9xLm2Za",
"name": "string",
"phone": "string",
"email": "string",
"deliveries": 0,
"addresses": 0,
"lastDeliveryAt": "2026-10-15T09:00:00+01:00",
"lastAddress": {
"id": "adr_8KwP2nVd5T",
"name": "string",
"address": "string",
"doorCode": "string",
"lat": 0,
"lng": 0,
"uses": 0,
"lastUsedAt": "2026-10-15T09:00:00+01:00"
}
}
],
"nextPageToken": "string",
"prevPageToken": "string",
"offset": 0
}Erreurs
defaultErreur
Obtenir un client
GET https://nways.ng/maps/v1/fleet/customers/{customerId}
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
customerId | chemin | string | Obligatoire. |
curl "https://nways.ng/maps/v1/fleet/customers/cus_4fQ9xLm2Za" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/customers/cus_4fQ9xLm2Za', {
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/customers/cus_4fQ9xLm2Za",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Client
| Champ | Type | Description |
|---|---|---|
id | string | Obligatoire. |
name | string | Obligatoire. Comme la dernière livraison l’a nommé. |
phone | string | Obligatoire. |
email | string | Obligatoire. |
deliveries | integer | Obligatoire. |
addresses | integer | Obligatoire. |
lastDeliveryAt | string (date-time) | Obligatoire. |
lastAddress | Address | null | Obligatoire. Où est allée la dernière livraison. |
{
"id": "cus_4fQ9xLm2Za",
"name": "string",
"phone": "string",
"email": "string",
"deliveries": 0,
"addresses": 0,
"lastDeliveryAt": "2026-10-15T09:00:00+01:00",
"lastAddress": {
"id": "adr_8KwP2nVd5T",
"name": "string",
"address": "string",
"doorCode": "string",
"lat": 0,
"lng": 0,
"uses": 0,
"lastUsedAt": "2026-10-15T09:00:00+01:00"
}
}Erreurs
defaultErreur
Oublier un client et ses adresses
DELETE https://nways.ng/maps/v1/fleet/customers/{customerId}
Pour un client qui demande à être oublié. Ses livraisons restent, avec la durée de conservation de votre flotte ; une nouvelle livraison pour lui crée un nouveau client.
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
customerId | chemin | string | Obligatoire. |
curl -X DELETE "https://nways.ng/maps/v1/fleet/customers/cus_4fQ9xLm2Za" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/customers/cus_4fQ9xLm2Za', {
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/customers/cus_4fQ9xLm2Za",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Oublié
Pas de contenu.
Erreurs
defaultErreur
Lister les adresses d’un client, dernière utilisée d’abord
GET https://nways.ng/maps/v1/fleet/customers/{customerId}/addresses
Chaque lieu de livraison distinct (à environ 11 m près) avec son dernier nom, son adresse et son code de porte, combien de fois il a servi et quand pour la dernière fois.
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
customerId | chemin | string | Obligatoire. |
q | requête | string | Cherche un nom, une adresse ou un code de porte. |
limit | requête | integer | Par défaut: 25. ≥ 1, ≤ 100. |
pageToken | requête | string |
curl "https://nways.ng/maps/v1/fleet/customers/string/addresses" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/customers/string/addresses', {
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/customers/string/addresses",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Adresses
| Champ | Type | Description |
|---|---|---|
addresses | Address[] | Obligatoire. |
addresses[].id | string | Obligatoire. |
addresses[].name | string | Obligatoire. |
addresses[].address | string | Obligatoire. |
addresses[].doorCode | string | Obligatoire. Le code NIPOST ou GhanaPost par lequel l’adresse commence ("" pour aucun). |
addresses[].lat | number | Obligatoire. |
addresses[].lng | number | Obligatoire. |
addresses[].uses | integer | Obligatoire. Livraisons qui y sont allées. |
addresses[].lastUsedAt | string (date-time) | Obligatoire. |
total | integer | Obligatoire. Toutes les adresses du client (pas seulement celles trouvées). |
nextPageToken | string | |
prevPageToken | string | |
offset | integer | Obligatoire. |
{
"addresses": [
{
"id": "adr_8KwP2nVd5T",
"name": "string",
"address": "string",
"doorCode": "string",
"lat": 0,
"lng": 0,
"uses": 0,
"lastUsedAt": "2026-10-15T09:00:00+01:00"
}
],
"total": 0,
"nextPageToken": "string",
"prevPageToken": "string",
"offset": 0
}Erreurs
defaultErreur
Le lien de suivi du destinataire (un nouveau s’il a expiré ; aucun une fois la tâche terminée)
POST https://nways.ng/maps/v1/fleet/tasks/{id}/share
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
id | chemin | string | Obligatoire. |
curl -X POST "https://nways.ng/maps/v1/fleet/tasks/string/share" \
-H "X-NWays-Api-Key: VOTRE_CLE_API"const res = await fetch('https://nways.ng/maps/v1/fleet/tasks/string/share', {
method: 'POST',
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.post(
"https://nways.ng/maps/v1/fleet/tasks/string/share",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Réponse
Lien
| Champ | Type | Description |
|---|---|---|
url | string (uri) | Obligatoire. |
expiresAt | string (date-time) | Obligatoire. |
{
"url": "https://nways.ng/t/3fT9kQ2xVbN7LmP0aZc4RwYe",
"expiresAt": "2026-10-15T09:00:00+01:00"
}Erreurs
defaultErreur