HW cloud API v1

API section

Receipts

Receipts through the cloud: a site, CRM or bot prints a receipt on an account register; a queue while the register is offline, the result and a webhook, accounting by point.

GET/api/v1/receiptsRecent receipts
POST/api/v1/receiptsPrint a receipt on an account register
GET/api/v1/receipts/{id}Receipt
GET/api/v1/receipts/statsReceipt accounting by point for a month

Recent receipts#

GET/api/v1/receipts

Newest first; deviceId — only this register, idempotencyKey — find a receipt by your key

Parameters

NameInTypeDescription
idempotencyKeyquerystring
deviceIdqueryinteger int64
limitqueryinteger int32

Response 200 application/json

Array · ReceiptView
  • idinteger int64
  • idempotencyKeystring
  • statusstring
  • deviceIdinteger int64
  • registerinteger int32
  • totalinteger int64
  • attemptsinteger int32
  • createdAtstring date-time
  • doneAtstring date-time
  • resultResult
    10 fields · Result
    • fdNumberinteger int64
    • fiscalSignstring
    • shiftNumberinteger int32
    • receiptNumberinteger int32
    • fnNumberstring
    • registrationNumberstring
    • dateTimestring
    • qrCodestring
    • fnsUrlstring
    • linkstring
  • errorError
    2 fields · Error
    • codestring
    • messagestring

Errors — problem+json with a code field, see error codes.

Request example

curl
curl 'https://cloud.hw-connector.ru/api/v1/receipts' \
  -H 'X-Api-Key: hwk_…'

Print a receipt on an account register#

POST/api/v1/receipts
Operation

A receipt — as in the agent API (POST /api/v1/registers/{n}/receipts). New — 202, the same key — 200 with the same receipt, the same key with another receipt — 409. Register offline — the receipt waits in the queue up to cloud.receipts.ttl-hours; Prefer: wait=N — wait for the result up to 60 s. Trial plan over the limit — 402

Parameters

NameInTypeDescription
Idempotency-Keyheaderstring
Preferheaderstring

Request body application/json required

Fields · ReceiptRequest
  • idempotencyKeystring
    from 0
    to 100
  • deviceIdinteger int64
  • registerinteger int32
    from 1
    to 99
  • receiptobjectrequired
  • callbackUrlstring
    pattern: https?://.+
    from 0
    to 500
JSON
{
  "idempotencyKey": "string",
  "deviceId": 1,
  "register": 1,
  "receipt": {},
  "callbackUrl": "string"
}

Response 200 application/json

Fields · ReceiptView
  • idinteger int64
  • idempotencyKeystring
  • statusstring
  • deviceIdinteger int64
  • registerinteger int32
  • totalinteger int64
  • attemptsinteger int32
  • createdAtstring date-time
  • doneAtstring date-time
  • resultResult
    10 fields · Result
    • fdNumberinteger int64
    • fiscalSignstring
    • shiftNumberinteger int32
    • receiptNumberinteger int32
    • fnNumberstring
    • registrationNumberstring
    • dateTimestring
    • qrCodestring
    • fnsUrlstring
    • linkstring
  • errorError
    2 fields · Error
    • codestring
    • messagestring

Errors — problem+json with a code field, see error codes.

Request example

curl
curl -X POST 'https://cloud.hw-connector.ru/api/v1/receipts' \
  -H 'X-Api-Key: hwk_…' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"idempotencyKey":"string","deviceId":1,"register":1,"receipt":{},"callbackUrl":"string"}'

Receipt#

GET/api/v1/receipts/{id}

status: QUEUED, SENDING, DONE, FAILED, UNKNOWN, EXPIRED; result — FD number, fiscal sign, receipt link for the customer

Parameters

NameInTypeDescription
idrequiredpathinteger int64

Response 200 application/json

Fields · ReceiptView
  • idinteger int64
  • idempotencyKeystring
  • statusstring
  • deviceIdinteger int64
  • registerinteger int32
  • totalinteger int64
  • attemptsinteger int32
  • createdAtstring date-time
  • doneAtstring date-time
  • resultResult
    10 fields · Result
    • fdNumberinteger int64
    • fiscalSignstring
    • shiftNumberinteger int32
    • receiptNumberinteger int32
    • fnNumberstring
    • registrationNumberstring
    • dateTimestring
    • qrCodestring
    • fnsUrlstring
    • linkstring
  • errorError
    2 fields · Error
    • codestring
    • messagestring

Errors — problem+json with a code field, see error codes.

Request example

curl
curl 'https://cloud.hw-connector.ru/api/v1/receipts/42' \
  -H 'X-Api-Key: hwk_…'

Receipt accounting by point for a month#

GET/api/v1/receipts/stats

How many receipts and for what sum each register printed, the plan and the trial limit; month=2026-11

Parameters

NameInTypeDescription
monthquerystring

Response 200 application/json

Fields · Stats
  • monthstring
  • planstring
  • paidPointsinteger int32
  • trialMonthlyinteger int32
  • trialUsedinteger int64
  • pointsinteger int64
  • doneinteger int64
  • failedinteger int64
  • totalinteger int64
  • byPointarray of PointStats
    6 fields · PointStats
    • deviceIdinteger int64
    • namestring
    • doneinteger int64
    • failedinteger int64
    • pendinginteger int64
    • totalinteger int64

Errors — problem+json with a code field, see error codes.

Request example

curl
curl 'https://cloud.hw-connector.ru/api/v1/receipts/stats' \
  -H 'X-Api-Key: hwk_…'