Errors
Every error the Device API returns is application/problem+json (RFC 7807)
and carries a request_id. Quote the request_id when you contact Narya support.
| Status | Meaning | What to do |
|---|---|---|
400 | The request is invalid. For a validation problem, invalid_params names each field. A malformed-request problem means the body could not be read. | Fix the request. Do not resend it unchanged. |
401 | The device token is missing, invalid or revoked, or the terminal is decommissioned. On activation: the code or identifier was not accepted, or the terminal is suspended or decommissioned. | Activate the terminal again with a new code. A decommissioned terminal must be registered again first. |
404 | No such operation, or the resource does not exist for this terminal. | Do not retry. |
409 | The terminal is suspended. Nothing was stored. | Keep running. Keep any unsent transactions, totals and events, and resend them unchanged at your normal interval. Requests succeed again once an operator resumes the terminal. |
413 | The request body is larger than 1 MiB. | Send less data, such as less in extensions. An event batch has a lower limit of 256 KiB, answered 400. |
429 | Too many requests. | Wait the number of seconds in Retry-After, then resend. If there is no Retry-After, back off, then resend. |
500 | An unexpected error. | Retry as the operation describes. |
503 | Temporarily unavailable. | Retry after Retry-After seconds where given, otherwise with backoff. |
Responses may gain new fields, and fields documented as open, such as
reason, may gain new values. Ignore fields you do not recognise.