Reference
Error codes
A request error is HTTP 4xx or 5xx with application/problem+json (RFC 9457) and a machine code in the code field: branch on it, not on the text. A device error is in the operation itself.
Error format
problem+json
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"detail": "Device 1 is busy with another operation",
"code": "DEVICE_BUSY"
}Request errors
| HTTP | code | When |
|---|---|---|
| 400 | INVALID_REQUEST | Invalid JSON, no Idempotency-Key, field constraints violated (the fields are in detail) |
| 401 | BAD_SIGNATURE | A site with a signing key sent a request without a valid signature |
| 402 | LICENSE_REQUIRED | A license key with this feature is needed (terminals, several registers, the document scanner or marking module) |
| 403 | SITE_NOT_ALLOWED | The site (Origin) is not allowed yet: the cashier sees a request in the tray and on the agent page — retry after approval |
| 403 | SITE_DENIED | The site was denied on this computer |
| 404 | DEVICE_NOT_FOUND | No device with this number |
| 404 | NOT_FOUND | No such operation, print job, template or file |
| 409 | IDEMPOTENCY_KEY_REUSED | The key was used for another operation |
| 409 | DEVICE_BUSY | The device is busy with another operation |
| 409 | INVALID_STATE | The action is not possible now (e.g. cancelling a job that is already printed) |
| 413 | TOO_LARGE | The request body is too large |
| 422 | VALIDATION_ERROR | Totals do not match, no cashier, invalid parameter value |
| 502 | DEVICE_ERROR | The device returned an error for an immediate request (weight, fiscal drive status) |
Operation errors
The operation was accepted but the device failed: status: FAILED (or UNKNOWN) and error: {code, message, details}. Device error texts are in Russian.
JSON
{
"id": "3f6c1d9e-1b2a-4c55-9e0d-6a1f0c2b7d11",
"type": "receipt",
"status": "FAILED",
"error": {
"code": "DEVICE_ERROR",
"message": "Register: out of paper"
}
}| code | What happened |
|---|---|
DEVICE_ERROR | Register, terminal or printer error; the text is in message |
PAYMENT_CANCELLED | The receipt failed after a card payment; the payment was cancelled on the terminal |
PAYMENT_NOT_CANCELLED | The receipt failed and the payment could not be cancelled; payment data is in details |
RECEIPT_FAILED_AFTER_REFUND | Money was refunded to the card, the refund receipt was not printed |
MARKING_REJECTED | A marking code may not be sold (permissive mode) — the receipt was not printed |
INTERRUPTED | The agent restarted during the operation |
TIMEOUT | status: UNKNOWN — the device did not answer in time, the result is unknown: check the device and the last document |
INTERNAL_ERROR | Internal agent failure; details are in the agent log |
Cloud errors
When calling through the cloud, its own errors carry the X-Hw-Proxy-Error header — see Through the cloud.