N-Ways
Developer docsErrors

Errors

What each error means and what to do about it. Every error comes with an HTTP status, a stable code your code can act on and a message for people.

On this page

How errors look

Errors answer with an HTTP status and one JSON envelope, for key, quota and product errors alike. reason is stable: your program can act on it. message is for people: it says exactly what happened and how to fix it, and may be reworded. details holds Google’s ErrorInfo (the reason, and in metadata the facts behind it and the docs link) and a Help link to the reason’s entry on this page.

400 Bad Request
{
  "error": {
    "code": 400,
    "status": "INVALID_ARGUMENT",
    "reason": "TOO_MANY_INTERMEDIATES",
    "message": "A route has up to 25 intermediates.",
    "details": [
      { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "TOO_MANY_INTERMEDIATES", "domain": "nways.ng",
        "metadata": { "docs": "https://nways.ng/developers/errors#api-reasons" } },
      { "@type": "type.googleapis.com/google.rpc.Help",
        "links": [{ "description": "TOO_MANY_INTERMEDIATES: what it means and how to fix it", "url": "https://nways.ng/developers/errors#api-reasons" }] }
    ]
  }
}

Every answer also has an X-Request-Id header: send it with any question to support. Act on the status and the reason, never on the message’s words.

Note:

The earlier addresses (/v1/…) answer product errors in an older shape, { "error": "message", "code": "no_route" }, and key and platform errors in the envelope above. The SDKs and client libraries read both.

HTTP statuses

StatusMeaningWhat to do
200Done.
202Being prepared: an offline pack being built.Ask again after Retry-After seconds.
400A parameter or field is missing or wrong.Fix the request. Don’t retry it unchanged.
401No key, a key N-Ways never issued, or a key that was deleted or regenerated.The reason and message say which. Send the key shown in the console.
402The free monthly calls are used up and there’s no credit left (BILLING_DISABLED).Add credit in the console, then retry.
403The key isn’t allowed to do this: its organisation, project or the key itself is switched off, or the call is outside its restrictions.See the reason, below.
404Not found: an unknown postcode, place or address.Not worth retrying.
422Understood, but impossible: no route between the points.Change the request, or tell the person.
429Too many requests, or a quota is used up.Wait as long as Retry-After says, then retry.
503The platform is switched off for now (PLATFORM_DISABLED: your key is fine), or a problem on our side.Wait as long as Retry-After says, or retry with backoff.
500, 502A problem on our side.Retry with backoff: after 1, 2, 4, 8 seconds, then give up.

Key, platform, quota and billing errors

When a call is refused, the answer says exactly why and how to fix it. N-Ways checks, in this order: the platform (switched on), the key (given, issued and not revoked), its organisation and project (not closed or suspended), the key’s own state (not paused), its restrictions (the API, then the website, app or IP address), its limits and quotas, then credit. The first that fails is the answer.

403 Forbidden
{
  "error": {
    "code": 403,
    "status": "PERMISSION_DENIED",
    "reason": "API_KEY_PAUSED",
    "message": "The API key nw_8fK2q… (“Checkout”) is paused, so its calls are refused. Resume it in the console (https://map.nways.ng/console, Keys → the key → Resume); it works again within 30 seconds.",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "API_KEY_PAUSED",
        "domain": "nways.ng",
        "metadata": { "docs": "https://nways.ng/developers/errors#api-key-paused", "keyPrefix": "nw_8fK2q" }
      },
      {
        "@type": "type.googleapis.com/google.rpc.Help",
        "links": [{ "description": "API_KEY_PAUSED: what it means and how to fix it", "url": "https://nways.ng/developers/errors#api-key-paused" }]
      }
    ]
  }
}

metadata always has docs, and the facts your code may need: what was seen and what is allowed (restrictions and APIs), which cap was hit with its limit and resetsAt (429s), until and suspendReason (suspensions), why and revokedAt (revoked keys), keyValid (the platform switched off). Every refusal also carries X-Request-Id.

StatusReasonMeaning and fix
503PLATFORM_DISABLEDThe N-Ways Maps Platform is switched off for now, for everyone. Your key is fine (keyValid says whether N-Ways knows it): calls work again when the platform is back. Wait Retry-After seconds and retry; see the status page.
401API_KEY_MISSINGThe request has no key. Add key= or the X-NWays-Api-Key header.
401API_KEY_INVALIDN-Ways never issued this key: a typo, a key cut short or with extra characters (a key is nw_ and 32 letters and digits). Copy the whole key from the console.
401API_KEY_REVOKEDThe key was deleted, or this is the old value of a regenerated key whose grace period has ended. The message says which and when. Create a new key, or use the key’s new value from the console.
403PLATFORM_PREVIEW_ONLYN-Ways has limited the platform to the organisations it has invited, and yours isn’t one of them. Your key is fine; to be invited, email hello@nways.ng.
403ORGANISATION_CLOSEDYour organisation was closed (by its owner, or by N-Ways), so none of its keys work. Create a new organisation in the console, or email hello@nways.ng to reopen it.
403ORGANISATION_SUSPENDEDN-Ways suspended your organisation, so all its keys are refused. The message says until when (Lagos time), if there is an end, and the reason N-Ways gave, if it chose to share it. Calls work again on their own at that time; otherwise email hello@nways.ng.
403API_ACCESS_OFFYour organisation runs its deliveries on N-Ways (the console and N-Ways Business) without the API, so its keys are off. To use the API too, add it in the console, Billing: your API calls are then paid as you use them, alongside your monthly plan.
403API_TURNED_OFFN-Ways turned your organisation’s API keys off; your access and plan are unchanged, and the console and N-Ways Business keep working. The message gives the reason N-Ways recorded. Email hello@nways.ng to have them turned back on.
403PROJECT_SUSPENDEDN-Ways suspended this key’s project; the organisation’s other projects keep working. The message names the project and gives the reason. Email hello@nways.ng to restore it.
403API_KEY_PAUSEDThe key is paused in the console. Resume it there (Keys → the key → Resume); it works again within 30 seconds. (Before 16 October 2026 this was API_KEY_DISABLED.)
403API_KEY_SERVICE_BLOCKEDThe key may not call this API: the message names the API and what the key, its project or your plan allows (service, allowed). Add the API to the key’s APIs or the project’s in the console. If your plan doesn’t include it, email us to add it.
403API_KEY_HTTP_REFERRER_BLOCKEDThe web page isn’t in the key’s website restrictions, or the request named no page. The message shows the website seen and the ones allowed. Add its address, or if it isn’t yours, someone copied your key.
403API_KEY_IP_ADDRESS_BLOCKEDThe server’s address isn’t in the key’s IP restrictions. The message shows the address seen and the ones allowed. Add your public (NAT) address.
403API_KEY_ANDROID_APP_BLOCKEDThe Android app’s package or certificate isn’t allowed, or wasn’t sent. The message shows what was seen and what is allowed. Add both your upload and Play signing SHA-1.
403API_KEY_IOS_APP_BLOCKEDThe iOS app’s bundle ID isn’t allowed, or wasn’t sent. The message shows what was seen and what is allowed.
429RATE_LIMIT_EXCEEDEDToo many requests this minute: the key’s cap for this API, or your organisation’s (all its keys together). The message and cap say which; it resets at the end of the minute: wait Retry-After seconds.
429QUOTA_EXCEEDEDA daily cap is used up: the key’s for this API, or your organisation’s. The message and cap say which, and when it resets (midnight in Lagos, UTC+1; resetsAt, Retry-After). Raise the key’s cap in the console, or wait.
402BILLING_DISABLEDAdd credit: this API’s free calls for the month are used up and there’s no prepaid credit left. Other APIs keep working within their free calls. Add credit in the console (Billing → Add credit) and calls work again at once.
429TEMPORARILY_BLOCKEDToo many refused requests from one connection (a wrong or blocked key sent over and over). Fix the key, then wait Retry-After seconds.
503BACKEND_ERRORKeys couldn’t be checked just then (a problem on our side). Retry with backoff.

Since 16 October 2026, PARTNER_SUSPENDED is ORGANISATION_SUSPENDED, an organisation disabled by N-Ways is ORGANISATION_SUSPENDED rather than PROJECT_SUSPENDED, and deleted or regenerated keys are API_KEY_REVOKED rather than API_KEY_INVALID.

Refusals and preflights always carry CORS headers for the calling page, on /maps/v1 and on the earlier addresses (/v1, /tiles, /fonts) alike, so your code (and the Maps SDK’s note over the map) can read the reason, even while the platform is switched off.

Tip:

In a web page, a refused map shows the Maps SDK’s note over the map: N-Ways’ message, with “What to do” linking the reason here. The browser’s developer console has the same, with the HTTP status.

Each API’s reasons

Each operation in the API reference lists its own reasons. The ones you’ll meet most:

ReasonStatusAPIMeaning
QUERY_REQUIRED, QUERY_TOO_LONG400Geocoding, autocompleteq is missing or over 200 characters.
POSTCODE_INVALID400Geocoding, routesNot a NIPOST postcode.
POSTCODE_NOT_FOUND_CHECK404GeocodingA well-formed postcode N-Ways can’t place: check it with the customer.
GHANAPOST_INVALID, GHANAPOST_UNKNOWN400, 404GeocodingNot a GhanaPost GPS address; or one N-Ways can’t place.
FIELDS_REQUIRED, FIELDS_INVALID400PlacesPlace details need fields; or a field name is unknown.
SESSION_INVALID400AutocompleteThe session token isn’t 8 to 64 letters, digits, - or _.
TOO_MANY_INTERMEDIATES400RoutesMore than 25 stops on the way.
NO_ROUTE, NO_ROAD_ROUTE422RoutesNo route: a point is too far from a road, or across water for a car or okada.
OKADA_BANNED_…, MOTORBIKE_BANNED_…, KEKE_BANNED_…, DANFO_BANNED_…, each ending _ORIGIN, _DESTINATION, _STOP or _ROUTE422RoutesThe law keeps that vehicle off the trip: the start, the end, a stop on the way, or every way between them is in a ban area. The message names the ban.
ROUTE_TOO_FAR422RoutesThe places are too far apart for one route of this kind.
MATRIX_TOO_LARGE, MATRIX_TOO_FAR400Route matrixOver 50 origins or destinations or 625 pairs; or points too far apart.
STOPS_INVALID, VEHICLES_INVALID400Route optimisation1 to 50 stops and 1 to 5 vehicles.
ROUTING_UNAVAILABLE503RoutesThe routing engine is busy or restarting. Retry.
INVALID_JSON400AnyThe request body isn’t valid JSON for this endpoint. The message says where.
BODY_TOO_LARGE413AnyThe request body is over the endpoint’s size limit.
NOT_FOUND404AnyNo such endpoint: check the address and method.
INTERNAL500AnySomething failed on our side. Retry with backoff; if it persists, send us the X-Request-Id.
TASK_NOT_FOUND, TASK_ENDED404, 409FleetNo such delivery; or it has ended.
DELIVERIES_OFF403FleetN-Ways turned new deliveries off for your organisation (the message says why). Deliveries under way carry on.
CONTRACTORS_OFF403FleetSending deliveries to N-Ways drivers, inviting or hiring them, is turned off for your organisation. Your own riders can still take deliveries.
SMART_PRICE_OFF403FleetPay suggestions and Smart Price are turned off for your organisation: send payMax yourself, without smartPrice.
WEBHOOKS_OFF403FleetWebhooks are turned off for your organisation: nothing is sent, and adding or testing an endpoint is refused. Events are still kept for the export.
ERP_OFF403FleetThe ERP sync (the events export) is turned off for your organisation.
ORGANISATION_SUSPENDED403FleetN-Ways suspended your organisation: new deliveries are refused as its keys are. Deliveries under way carry on.

Retrying well

  • Retry 429 and 5xx only, with growing waits and a little randomness, so many clients don’t retry at once.
  • Never retry a 4xx other than 429 unchanged: it will fail the same way.
  • Set a timeout: 10 seconds for geocoding and places, 20 for routes.
  • Cache what you may (see what you may store), so a short outage doesn’t stop your riders.