N-Ways
Documentation développeursLiens de réception

Liens de réception

A link a shop posts its orders to (WooCommerce's webhooks, Zapier, Make, Wix Automations, a Google Sheet's script): each order becomes a delivery under your automation rules. Post to the link's url (/v1/in/<token>), no key: the token and the signature are the key. Format generic: the body below, signed X-NWays-Signature: sha256=<hex HMAC-SHA256 of the body with the secret> (or Authorization: Bearer <secret> where the sender can't sign). Format woocommerce: WooCommerce's order webhook as it comes (X-WC-Webhook-Signature). The delivery's id is <idPrefix or format>-<order id>; a repeat does nothing new. At most 120 calls a minute per link, 256 KB each. Every call is in the link's log for 30 days.

Sur cette page
Remarque :

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

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

cURL
curl "https://nways.ng/maps/v1/fleet/inbound" \
  -H "X-NWays-Api-Key: VOTRE_CLE_API"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/inbound', {
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()
Python
import os
import requests

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

Liens

ChampTypeDescription
linksInboundLink[]
links[].idstring
links[].namestring
links[].formatstringAu choix: generic, woocommerce.
links[].urlstring
links[].secretstringSeulement à la création ou au renouvellement.
links[].pickupPlaceIdstring | null
links[].dispatchstring | object | null
links[].idPrefixstring
links[].readyStatusstring
links[].testboolean
links[].activeboolean
links[].createdAtstring (date-time)
links[].updatedAtstring (date-time)
links[].lastAtstring (date-time) | null
links[].countsobjectAppels journalisés (30 jours) par état.
links[].madeintegerLes livraisons créées par ses appels (30 jours), y compris celles en attente de leur adresse.
links[].openintegerCe qui vous attend encore : les livraisons toujours en attente de leur adresse, et les appels en échec sans rien reçu pour cette commande depuis.
formatsobject[]
formats[].idstring
formats[].namestring
formats[].signaturestring
formats[].platformsstring[]
200 OK
{
  "links": [
    {
      "id": "inl_4fQ9xLm2Za",
      "name": "string",
      "format": "generic",
      "url": "https://map.nways.ng/v1/in/in_…",
      "secret": "string",
      "pickupPlaceId": "string",
      "dispatch": "auto",
      "idPrefix": "string",
      "readyStatus": "string",
      "test": true,
      "active": true,
      "createdAt": "2026-10-15T09:00:00+01:00",
      "updatedAt": "2026-10-15T09:00:00+01:00",
      "lastAt": "2026-10-15T09:00:00+01:00",
      "counts": {},
      "made": 0,
      "open": 0
    }
  ],
  "formats": [
    {
      "id": "string",
      "name": "string",
      "signature": "string",
      "platforms": [
        "string"
      ]
    }
  ]
}
  • default Erreur

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

ChampTypeDescription
namestringObligatoire à la création. 80 caractères au plus.
formatstringAu choix: generic, woocommerce. Par défaut: generic.
pickupPlaceIdstringUn de vos lieux d’enlèvement : l’enlèvement des commandes.
dispatchstring | objectL’envoi propre à une commande : auto, hold ou manual, ou un objet ; ce qu’il omet vient de vos règles d’automatisation.
idPrefixstringLes id de livraison sont <idPrefix>-<id de commande> (par défaut : le format).
readyStatusstringWooCommerce : le statut de commande qui veut dire prête à être récupérée (par ex. ready-for-pickup).
testbooleanSes commandes sont des livraisons d’essai, jamais confiées à un livreur ou un chauffeur.
activebooleanPar défaut: true.
cURL
curl -X POST "https://nways.ng/maps/v1/fleet/inbound" \
  -H "X-NWays-Api-Key: VOTRE_CLE_API" \
  -H "Content-Type: application/json" \
  -d '{"name":"My shop","format":"woocommerce","pickupPlaceId":"plc_4fQ9xLm2Za","readyStatus":"ready-for-pickup"}'
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/inbound', {
  method: 'POST',
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "name": "My shop",
    "format": "woocommerce",
    "pickupPlaceId": "plc_4fQ9xLm2Za",
    "readyStatus": "ready-for-pickup"
  }),
})
const data = await res.json()
Python
import os
import requests

res = requests.post(
    "https://nways.ng/maps/v1/fleet/inbound",
    headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
    json={"name": "My shop", "format": "woocommerce", "pickupPlaceId": "plc_4fQ9xLm2Za", "readyStatus": "ready-for-pickup"},
    timeout=10,
)
data = res.json()

Lien avec secret

ChampTypeDescription
idstring
namestring
formatstringAu choix: generic, woocommerce.
urlstring
secretstringSeulement à la création ou au renouvellement.
pickupPlaceIdstring | null
dispatchstring | object | null
idPrefixstring
readyStatusstring
testboolean
activeboolean
createdAtstring (date-time)
updatedAtstring (date-time)
lastAtstring (date-time) | null
countsobjectAppels journalisés (30 jours) par état.
madeintegerLes livraisons créées par ses appels (30 jours), y compris celles en attente de leur adresse.
openintegerCe qui vous attend encore : les livraisons toujours en attente de leur adresse, et les appels en échec sans rien reçu pour cette commande depuis.
201 OK
{
  "id": "inl_4fQ9xLm2Za",
  "name": "string",
  "format": "generic",
  "url": "https://map.nways.ng/v1/in/in_…",
  "secret": "string",
  "pickupPlaceId": "string",
  "dispatch": "auto",
  "idPrefix": "string",
  "readyStatus": "string",
  "test": true,
  "active": true,
  "createdAt": "2026-10-15T09:00:00+01:00",
  "updatedAt": "2026-10-15T09:00:00+01:00",
  "lastAt": "2026-10-15T09:00:00+01:00",
  "counts": {},
  "made": 0,
  "open": 0
}
  • default Erreur

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

NomOùTypeDescription
idcheminstringObligatoire.
cURL
curl "https://nways.ng/maps/v1/fleet/inbound/string" \
  -H "X-NWays-Api-Key: VOTRE_CLE_API"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/inbound/string', {
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()
Python
import os
import requests

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

Lien

ChampTypeDescription
idstring
namestring
formatstringAu choix: generic, woocommerce.
urlstring
secretstringSeulement à la création ou au renouvellement.
pickupPlaceIdstring | null
dispatchstring | object | null
idPrefixstring
readyStatusstring
testboolean
activeboolean
createdAtstring (date-time)
updatedAtstring (date-time)
lastAtstring (date-time) | null
countsobjectAppels journalisés (30 jours) par état.
madeintegerLes livraisons créées par ses appels (30 jours), y compris celles en attente de leur adresse.
openintegerCe qui vous attend encore : les livraisons toujours en attente de leur adresse, et les appels en échec sans rien reçu pour cette commande depuis.
200 OK
{
  "id": "inl_4fQ9xLm2Za",
  "name": "string",
  "format": "generic",
  "url": "https://map.nways.ng/v1/in/in_…",
  "secret": "string",
  "pickupPlaceId": "string",
  "dispatch": "auto",
  "idPrefix": "string",
  "readyStatus": "string",
  "test": true,
  "active": true,
  "createdAt": "2026-10-15T09:00:00+01:00",
  "updatedAt": "2026-10-15T09:00:00+01:00",
  "lastAt": "2026-10-15T09:00:00+01:00",
  "counts": {},
  "made": 0,
  "open": 0
}
  • default Erreur

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

NomOùTypeDescription
idcheminstringObligatoire.
ChampTypeDescription
namestringObligatoire à la création. 80 caractères au plus.
formatstringAu choix: generic, woocommerce. Par défaut: generic.
pickupPlaceIdstringUn de vos lieux d’enlèvement : l’enlèvement des commandes.
dispatchstring | objectL’envoi propre à une commande : auto, hold ou manual, ou un objet ; ce qu’il omet vient de vos règles d’automatisation.
idPrefixstringLes id de livraison sont <idPrefix>-<id de commande> (par défaut : le format).
readyStatusstringWooCommerce : le statut de commande qui veut dire prête à être récupérée (par ex. ready-for-pickup).
testbooleanSes commandes sont des livraisons d’essai, jamais confiées à un livreur ou un chauffeur.
activebooleanPar défaut: true.
cURL
curl -X PATCH "https://nways.ng/maps/v1/fleet/inbound/string" \
  -H "X-NWays-Api-Key: VOTRE_CLE_API" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","format":"generic","pickupPlaceId":"string","dispatch":"auto","idPrefix":"string","readyStatus":"string","test":true,"active":true}'
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/inbound/string', {
  method: 'PATCH',
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "name": "string",
    "format": "generic",
    "pickupPlaceId": "string",
    "dispatch": "auto",
    "idPrefix": "string",
    "readyStatus": "string",
    "test": true,
    "active": true
  }),
})
const data = await res.json()
Python
import os
import requests

res = requests.patch(
    "https://nways.ng/maps/v1/fleet/inbound/string",
    headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
    json={"name": "string", "format": "generic", "pickupPlaceId": "string", "dispatch": "auto", "idPrefix": "string", "readyStatus": "string", "test": True, "active": True},
    timeout=10,
)
data = res.json()

Lien

ChampTypeDescription
idstring
namestring
formatstringAu choix: generic, woocommerce.
urlstring
secretstringSeulement à la création ou au renouvellement.
pickupPlaceIdstring | null
dispatchstring | object | null
idPrefixstring
readyStatusstring
testboolean
activeboolean
createdAtstring (date-time)
updatedAtstring (date-time)
lastAtstring (date-time) | null
countsobjectAppels journalisés (30 jours) par état.
madeintegerLes livraisons créées par ses appels (30 jours), y compris celles en attente de leur adresse.
openintegerCe qui vous attend encore : les livraisons toujours en attente de leur adresse, et les appels en échec sans rien reçu pour cette commande depuis.
200 OK
{
  "id": "inl_4fQ9xLm2Za",
  "name": "string",
  "format": "generic",
  "url": "https://map.nways.ng/v1/in/in_…",
  "secret": "string",
  "pickupPlaceId": "string",
  "dispatch": "auto",
  "idPrefix": "string",
  "readyStatus": "string",
  "test": true,
  "active": true,
  "createdAt": "2026-10-15T09:00:00+01:00",
  "updatedAt": "2026-10-15T09:00:00+01:00",
  "lastAt": "2026-10-15T09:00:00+01:00",
  "counts": {},
  "made": 0,
  "open": 0
}
  • default Erreur

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

NomOùTypeDescription
idcheminstringObligatoire.
cURL
curl -X DELETE "https://nways.ng/maps/v1/fleet/inbound/string" \
  -H "X-NWays-Api-Key: VOTRE_CLE_API"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/inbound/string', {
  method: 'DELETE',
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()
Python
import os
import requests

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

Supprimé

Pas de contenu.

  • default Erreur

POST https://nways.ng/maps/v1/fleet/inbound/{id}/rotate

NomOùTypeDescription
idcheminstringObligatoire.
cURL
curl -X POST "https://nways.ng/maps/v1/fleet/inbound/string/rotate" \
  -H "X-NWays-Api-Key: VOTRE_CLE_API"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/inbound/string/rotate', {
  method: 'POST',
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()
Python
import os
import requests

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

Lien avec secret

ChampTypeDescription
idstring
namestring
formatstringAu choix: generic, woocommerce.
urlstring
secretstringSeulement à la création ou au renouvellement.
pickupPlaceIdstring | null
dispatchstring | object | null
idPrefixstring
readyStatusstring
testboolean
activeboolean
createdAtstring (date-time)
updatedAtstring (date-time)
lastAtstring (date-time) | null
countsobjectAppels journalisés (30 jours) par état.
madeintegerLes livraisons créées par ses appels (30 jours), y compris celles en attente de leur adresse.
openintegerCe qui vous attend encore : les livraisons toujours en attente de leur adresse, et les appels en échec sans rien reçu pour cette commande depuis.
200 OK
{
  "id": "inl_4fQ9xLm2Za",
  "name": "string",
  "format": "generic",
  "url": "https://map.nways.ng/v1/in/in_…",
  "secret": "string",
  "pickupPlaceId": "string",
  "dispatch": "auto",
  "idPrefix": "string",
  "readyStatus": "string",
  "test": true,
  "active": true,
  "createdAt": "2026-10-15T09:00:00+01:00",
  "updatedAt": "2026-10-15T09:00:00+01:00",
  "lastAt": "2026-10-15T09:00:00+01:00",
  "counts": {},
  "made": 0,
  "open": 0
}
  • default Erreur

Le journal du lien, du plus récent au plus ancien (30 jours)

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

Paramètres

NomOùTypeDescription
idcheminstringObligatoire.
staterequêtestringAu choix: created, updated, duplicate, ignored, needs_address, failed.
limitrequêteintegerPar défaut: 50. ≥ 1, ≤ 200.
pageTokenrequêtestring
cURL
curl "https://nways.ng/maps/v1/fleet/inbound/string/events" \
  -H "X-NWays-Api-Key: VOTRE_CLE_API"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/inbound/string/events', {
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()
Python
import os
import requests

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

Réponse

Journal

ChampTypeDescription
eventsInboundEvent[]
events[].idstring
events[].eventstring
events[].orderIdstring
events[].taskIdstringLa livraison créée ou modifiée ("" si aucune).
events[].statestringAu choix: created, updated, duplicate, ignored, needs_address, failed.
events[].reasonstring
events[].attemptsinteger
events[].retryableboolean
events[].payloadanyL’appel tel qu’il est arrivé (null s’il n’a pas été gardé).
events[].createdAtstring (date-time)
events[].updatedAtstring (date-time)
totalinteger
countsobject
nextPageTokenstring | null
200 OK
{
  "events": [
    {
      "id": "ine_Qa71ZcR0mX",
      "event": "order.created",
      "orderId": "string",
      "taskId": "string",
      "state": "created",
      "reason": "Delivery #1042 made.",
      "attempts": 0,
      "retryable": true,
      "payload": "string",
      "createdAt": "2026-10-15T09:00:00+01:00",
      "updatedAt": "2026-10-15T09:00:00+01:00"
    }
  ],
  "total": 0,
  "counts": {},
  "nextPageToken": "string"
}

Erreurs

  • default Erreur

Relancer un appel journalisé tel qu’il est arrivé (409 NOT_RETRYABLE s’il n’a pas été gardé)

POST https://nways.ng/maps/v1/fleet/inbound/{id}/events/{eid}/retry

Paramètres

NomOùTypeDescription
idcheminstringObligatoire.
eidcheminstringObligatoire.
cURL
curl -X POST "https://nways.ng/maps/v1/fleet/inbound/string/events/string/retry" \
  -H "X-NWays-Api-Key: VOTRE_CLE_API"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/inbound/string/events/string/retry', {
  method: 'POST',
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()
Python
import os
import requests

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

Réponse

L’entrée avec son nouveau résultat

ChampTypeDescription
idstring
eventstring
orderIdstring
taskIdstringLa livraison créée ou modifiée ("" si aucune).
statestringAu choix: created, updated, duplicate, ignored, needs_address, failed.
reasonstring
attemptsinteger
retryableboolean
payloadanyL’appel tel qu’il est arrivé (null s’il n’a pas été gardé).
createdAtstring (date-time)
updatedAtstring (date-time)
200 OK
{
  "id": "ine_Qa71ZcR0mX",
  "event": "order.created",
  "orderId": "string",
  "taskId": "string",
  "state": "created",
  "reason": "Delivery #1042 made.",
  "attempts": 0,
  "retryable": true,
  "payload": "string",
  "createdAt": "2026-10-15T09:00:00+01:00",
  "updatedAt": "2026-10-15T09:00:00+01:00"
}

Erreurs

  • default Erreur