API: limits and errors
Limits
A key may make 600 calls a minute. Over that, the answer is 429 with a Retry-After header in seconds — wait that long and try again. The limit is the same on every dhivi POS server, and a restart does not reset it.
Errors
Every error is JSON with one sentence in error.
| Status | Means |
|---|---|
400 | Something in the call is wrong — the sentence says what. |
401 | The credential is not valid. — a wrong, revoked or ended key. The same words whatever the reason. |
403 | The key may not do that (the sentence names what it needs), may not act at that shop, or the business does not have that application. |
404 | No such thing — or not this business's, which looks the same. |
409 | It clashes with what is there, for example a phone number already on file. |
429 | Over the limit. See above. |
Repeated wrong keys from one address are slowed down, so a script with a typo in its key should stop and be fixed rather than retried.