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." } }
StatuscodeWhen
400invalidSomething sent can’t be used; the message says which and how to write it
401unauthorizedNo key, or one that doesn’t work (deleted, replaced, past its end date)
402planThe business isn’t on a paid plan
403forbiddenThe key may not do this
404not_foundNo such stop, route or customer at this business
405methodThe path takes other methods (Allow says which)
409conflictNot now: the route has started, or the stop was handled, for example
413too_bigMore than 256 KB sent
429too_manyOver the key’s calls a second, or too many wrong keys
500serverSomething went wrong at Routr; try again in a minute