HW cloud API v1

Reference

Error codes

An 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.

Error format

problem+json
{
  "type": "about:blank",
  "title": "Not Found",
  "status": 404,
  "detail": "Register 42 not found",
  "code": "DEVICE_NOT_FOUND"
}

Codes

HTTPcodeWhen
400INVALID_REQUESTInvalid JSON or parameters; what is wrong is in detail
401UNAUTHORIZEDMissing or wrong X-Api-Key
402TRIAL_LIMITTrial plan: more receipts this month than the limit — subscribe in the cabinet
403FORBIDDENThe action is not available to this key
403KEY_READ_ONLYA read-only key or sign-in: register changes, commands, the proxy (except GET) and receipts are unavailable
403DEVICE_DISABLEDThe register is disabled in the account (PATCH /api/v1/devices/{id} disabled=true): commands and the proxy are not passed; for a receipt — 409
404DEVICE_NOT_FOUNDNo such register or it belongs to another account
404NOT_FOUNDNo such receipt or address
409IDEMPOTENCY_KEY_REUSEDThe key was already used for another receipt
429RATE_LIMITEDAgent request limit — wait Retry-After
503NOT_CONNECTEDThe register is offline (command or proxy); Retry-After — when to retry
504TIMEOUTThe register did not answer — retry with the same idempotency key

Agent proxy errors (/agent/api/v1/** and commands) also carry the X-Hw-Proxy-Error header — see Agent API → Through the cloud.