Answers and errors
One thing: { "data": { … } }. A list: { "data": [ … ], "next": "…" }; pass next as after for the next page, until it’s null. A refusal:
{ "error": { "code": "forbidden",
"message": "The key “Website orders” may not read and change customers. Tick it on the key in Routr Dispatch → Settings → API keys, or use another." } }
| Status | code | When |
|---|---|---|
| 400 | invalid | Something sent can’t be used; the message says which and how to write it |
| 401 | unauthorized | No key, or one that doesn’t work (deleted, replaced, past its end date) |
| 402 | plan | The business isn’t on a paid plan |
| 403 | forbidden | The key may not do this |
| 404 | not_found | No such stop, route or customer at this business |
| 405 | method | The path takes other methods (Allow says which) |
| 409 | conflict | Not now: the route has started, or the stop was handled, for example |
| 413 | too_big | More than 256 KB sent |
| 429 | too_many | Over the key’s calls a second, or too many wrong keys |
| 500 | server | Something went wrong at Routr; try again in a minute |