HW agent API 2.14.1

API section

Fiscal register

Shift, reports, receipts and correction receipts, cash in and out, fiscal drive documents and status, counters, the register cash drawer. The register number comes from GET /api/v1/devices.

Open shift#

POST/api/v1/registers/{id}/shift/open
Operation

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Idempotency-Keyrequiredheaderstring
Preferheaderstring

Request body application/json

Fields · OperatorRequest
  • operatorOperator
    2 fields · Operator
    • namestringrequired
      from 1
    • innstring
JSON
{
  "operator": {
    "name": "string",
    "inn": "string"
  }
}

Response 200 application/json

Fields · Operation
  • idstring uuid
  • typestring
  • idempotencyKeystring
  • resourcesarray of string
  • statusstring
    values: QUEUED RUNNING SUCCEEDED FAILED UNKNOWN
  • stagestring
  • createdAtstring date-time
  • startedAtstring date-time
  • finishedAtstring date-time
  • resultany value
  • 3 fields · OperationError
    • codestring
    • messagestring
    • detailsany value
  • warningsarray of string

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

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/registers/1/shift/open' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"}}'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/shift/open' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"}}'

Close shift (Z report)#

POST/api/v1/registers/{id}/shift/close
Operation

By law the Z-report is the shift closing report: it never exists apart from closing. Result — the fiscal document, shift counters (read before closing) and the report tape (tape)

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Idempotency-Keyrequiredheaderstring
Preferheaderstring

Request body application/json

Fields · OperatorRequest
  • operatorOperator
    2 fields · Operator
    • namestringrequired
      from 1
    • innstring
JSON
{
  "operator": {
    "name": "string",
    "inn": "string"
  }
}

Response 200 application/json

Fields · Operation
  • idstring uuid
  • typestring
  • idempotencyKeystring
  • resourcesarray of string
  • statusstring
    values: QUEUED RUNNING SUCCEEDED FAILED UNKNOWN
  • stagestring
  • createdAtstring date-time
  • startedAtstring date-time
  • finishedAtstring date-time
  • resultany value
  • 3 fields · OperationError
    • codestring
    • messagestring
    • detailsany value
  • warningsarray of string

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

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/registers/1/shift/close' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"}}'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/shift/close' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"}}'

X report#

POST/api/v1/registers/{id}/reports/x
Operation

The register prints an X-report; result — shift number, shift counters and the report tape (tape)

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Idempotency-Keyrequiredheaderstring
Preferheaderstring

Request body application/json

Fields · OperatorRequest
  • operatorOperator
    2 fields · Operator
    • namestringrequired
      from 1
    • innstring
JSON
{
  "operator": {
    "name": "string",
    "inn": "string"
  }
}

Response 200 application/json

Fields · Operation
  • idstring uuid
  • typestring
  • idempotencyKeystring
  • resourcesarray of string
  • statusstring
    values: QUEUED RUNNING SUCCEEDED FAILED UNKNOWN
  • stagestring
  • createdAtstring date-time
  • startedAtstring date-time
  • finishedAtstring date-time
  • resultany value
  • 3 fields · OperationError
    • codestring
    • messagestring
    • detailsany value
  • warningsarray of string

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

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/registers/1/reports/x' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"}}'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/reports/x' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"}}'

Current calculation state report#

POST/api/v1/registers/{id}/reports/calculation-state
Operation

A fiscal document from the fiscal drive: how many documents have not been sent to the OFD and since when

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Idempotency-Keyrequiredheaderstring
Preferheaderstring

Request body application/json

Fields · OperatorRequest
  • operatorOperator
    2 fields · Operator
    • namestringrequired
      from 1
    • innstring
JSON
{
  "operator": {
    "name": "string",
    "inn": "string"
  }
}

Response 200 application/json

Fields · Operation
  • idstring uuid
  • typestring
  • idempotencyKeystring
  • resourcesarray of string
  • statusstring
    values: QUEUED RUNNING SUCCEEDED FAILED UNKNOWN
  • stagestring
  • createdAtstring date-time
  • startedAtstring date-time
  • finishedAtstring date-time
  • resultany value
  • 3 fields · OperationError
    • codestring
    • messagestring
    • detailsany value
  • warningsarray of string

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

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/registers/1/reports/calculation-state' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"}}'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/reports/calculation-state' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"}}'

Print a receipt#

POST/api/v1/registers/{id}/receipts
Operation

Receipt on the register only. Together with a card payment — POST /api/v1/checkouts

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Idempotency-Keyrequiredheaderstring
Preferheaderstring

Request body application/json required

Fields · Receipt
  • typestringrequired
    values: SELL SELL_RETURN BUY BUY_RETURN
  • taxationstring
    values: OSN USN_INCOME USN_INCOME_OUTCOME ESHN PATENT
  • operatorOperator
    2 fields · Operator
    • namestringrequired
      from 1
    • innstring
  • customerCustomer
    3 fields · Customer
    • contactstring
    • namestring
    • innstring
  • headerarray of TextLine
    4 fields · TextLine
    • kindstringrequired
      values: TEXT PAIR SEPARATOR
    • textstring
    • rightstring
    • alignstring
      values: LEFT CENTER RIGHT
  • itemsarray of ReceiptItemrequired
    from 1
    9 fields · ReceiptItem
    • namestringrequired
      from 1
    • priceinteger int64
      from 0
    • quantitynumberrequired
    • amountinteger int64
      from 0
    • vatstringrequired
      values: NONE VAT0 VAT5 VAT7 VAT10 VAT20 VAT22 VAT105 VAT107 VAT110 VAT120 VAT122
    • paymentMethodstringrequired
      values: FULL_PREPAYMENT PREPAYMENT ADVANCE FULL_PAYMENT PARTIAL_PAYMENT CREDIT CREDIT_PAYMENT
    • paymentObjectstringrequired
      values: COMMODITY EXCISE JOB SERVICE GAMBLING_BET GAMBLING_PRIZE LOTTERY LOTTERY_PRIZE INTELLECTUAL_ACTIVITY PAYMENT AGENT_COMMISSION COMPOSITE ANOTHER
    • departmentinteger int32
    • markingMarking
      4 fields · Marking
      • codestringrequired
        from 1
      • fractionstring
        pattern: \d+/\d+
      • measurestring
        values: PIECE GRAM KILOGRAM TON CENTIMETER DECIMETER METER SQUARE_CENTIMETER SQUARE_DECIMETER SQUARE_METER MILLILITER LITER CUBIC_METER KILOWATT_HOUR GKAL DAY HOUR MINUTE SECOND KILOBYTE MEGABYTE GIGABYTE TERABYTE OTHER
      • industryPropsstring
  • paymentsarray of ReceiptPaymentrequired
    from 1
    2 fields · ReceiptPayment
    • typestringrequired
      values: CASH CARD PREPAID CREDIT OTHER
    • amountinteger int64
  • footerarray of TextLine
    4 fields · TextLine
    • kindstringrequired
      values: TEXT PAIR SEPARATOR
    • textstring
    • rightstring
    • alignstring
      values: LEFT CENTER RIGHT
  • electronicboolean
  • senderEmailstring
  • settlementPlacestring
JSON
{
  "type": "SELL",
  "taxation": "OSN",
  "operator": {
    "name": "string",
    "inn": "string"
  },
  "customer": {
    "contact": "string",
    "name": "string",
    "inn": "string"
  },
  "header": [
    {
      "kind": "TEXT",
      "text": "string",
      "right": "string",
      "align": "LEFT"
    }
  ],
  "items": [
    {
      "name": "string",
      "price": 0,
      "quantity": 1.5,
      "amount": 0,
      "vat": "NONE",
      "paymentMethod": "FULL_PREPAYMENT",
      "paymentObject": "COMMODITY",
      "department": 1,
      "marking": {}
    }
  ],
  "payments": [
    {
      "type": "CASH",
      "amount": 1
    }
  ],
  "footer": [
    {
      "kind": "TEXT",
      "text": "string",
      "right": "string",
      "align": "LEFT"
    }
  ],
  "electronic": false,
  "senderEmail": "string",
  "settlementPlace": "string"
}

Response 200 application/json

Fields · Operation
  • idstring uuid
  • typestring
  • idempotencyKeystring
  • resourcesarray of string
  • statusstring
    values: QUEUED RUNNING SUCCEEDED FAILED UNKNOWN
  • stagestring
  • createdAtstring date-time
  • startedAtstring date-time
  • finishedAtstring date-time
  • resultany value
  • 3 fields · OperationError
    • codestring
    • messagestring
    • detailsany value
  • warningsarray of string

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

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/registers/1/receipts' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"type":"SELL","taxation":"OSN","operator":{"name":"string","inn":"string"},"customer":{"contact":"string","name":"string","inn":"string"},"header":[{"kind":"TEXT","text":"string","right":"string","align":"LEFT"}],"items":[{"name":"string","price":0,"quantity":1.5,"amount":0,"vat":"NONE","paymentMethod":"FULL_PREPAYMENT","paymentObject":"COMMODITY","department":1,"marking":{}}],"payments":[{"type":"CASH","amount":1}],"footer":[{"kind":"TEXT","text":"string","right":"string","align":"LEFT"}],"electronic":false,"senderEmail":"string","settlementPlace":"string"}'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/receipts' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"type":"SELL","taxation":"OSN","operator":{"name":"string","inn":"string"},"customer":{"contact":"string","name":"string","inn":"string"},"header":[{"kind":"TEXT","text":"string","right":"string","align":"LEFT"}],"items":[{"name":"string","price":0,"quantity":1.5,"amount":0,"vat":"NONE","paymentMethod":"FULL_PREPAYMENT","paymentObject":"COMMODITY","department":1,"marking":{}}],"payments":[{"type":"CASH","amount":1}],"footer":[{"kind":"TEXT","text":"string","right":"string","align":"LEFT"}],"electronic":false,"senderEmail":"string","settlementPlace":"string"}'

Print a copy of a fiscal drive document#

POST/api/v1/registers/{id}/fn-documents/{number}/print
Operation

ATOL, Pirit: a document from the fiscal drive archive by number

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

numberrequiredpathinteger int64

device number from GET /api/v1/devices

Idempotency-Keyrequiredheaderstring
Preferheaderstring

Response 200 application/json

Fields · Operation
  • idstring uuid
  • typestring
  • idempotencyKeystring
  • resourcesarray of string
  • statusstring
    values: QUEUED RUNNING SUCCEEDED FAILED UNKNOWN
  • stagestring
  • createdAtstring date-time
  • startedAtstring date-time
  • finishedAtstring date-time
  • resultany value
  • 3 fields · OperationError
    • codestring
    • messagestring
    • detailsany value
  • warningsarray of string

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

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/registers/1/fn-documents/1/print' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/fn-documents/1/print' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30'

Print non-fiscal text#

POST/api/v1/registers/{id}/documents
Operation

Terminal slip, service documents

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Idempotency-Keyrequiredheaderstring
Preferheaderstring

Request body application/json required

Fields · TextRequest
  • linesarray of TextLinerequired
    from 1
    4 fields · TextLine
    • kindstringrequired
      values: TEXT PAIR SEPARATOR
    • textstring
    • rightstring
    • alignstring
      values: LEFT CENTER RIGHT
JSON
{
  "lines": [
    {
      "kind": "TEXT",
      "text": "string",
      "right": "string",
      "align": "LEFT"
    }
  ]
}

Response 200 application/json

Fields · Operation
  • idstring uuid
  • typestring
  • idempotencyKeystring
  • resourcesarray of string
  • statusstring
    values: QUEUED RUNNING SUCCEEDED FAILED UNKNOWN
  • stagestring
  • createdAtstring date-time
  • startedAtstring date-time
  • finishedAtstring date-time
  • resultany value
  • 3 fields · OperationError
    • codestring
    • messagestring
    • detailsany value
  • warningsarray of string

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

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/registers/1/documents' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"lines":[{"kind":"TEXT","text":"string","right":"string","align":"LEFT"}]}'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/documents' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"lines":[{"kind":"TEXT","text":"string","right":"string","align":"LEFT"}]}'

Print a correction receipt#

POST/api/v1/registers/{id}/corrections
Operation

Receipt type — the same as the corrected transaction: SELL, SELL_RETURN, BUY, BUY_RETURN

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Idempotency-Keyrequiredheaderstring
Preferheaderstring

Request body application/json required

Fields · CorrectionRequest
  • receiptReceiptrequired
    11 fields · Receipt
    • typestringrequired
      values: SELL SELL_RETURN BUY BUY_RETURN
    • taxationstring
      values: OSN USN_INCOME USN_INCOME_OUTCOME ESHN PATENT
    • operatorOperator
      2 fields · Operator
      • namestringrequired
        from 1
      • innstring
    • customerCustomer
      3 fields · Customer
      • contactstring
      • namestring
      • innstring
    • headerarray of TextLine
      4 fields · TextLine
      • kindstringrequired
        values: TEXT PAIR SEPARATOR
      • textstring
      • rightstring
      • alignstring
        values: LEFT CENTER RIGHT
    • itemsarray of ReceiptItemrequired
      from 1
      9 fields · ReceiptItem
      • namestringrequired
        from 1
      • priceinteger int64
        from 0
      • quantitynumberrequired
      • amountinteger int64
        from 0
      • vatstringrequired
        values: NONE VAT0 VAT5 VAT7 VAT10 VAT20 VAT22 VAT105 VAT107 VAT110 VAT120 VAT122
      • paymentMethodstringrequired
        values: FULL_PREPAYMENT PREPAYMENT ADVANCE FULL_PAYMENT PARTIAL_PAYMENT CREDIT CREDIT_PAYMENT
      • paymentObjectstringrequired
        values: COMMODITY EXCISE JOB SERVICE GAMBLING_BET GAMBLING_PRIZE LOTTERY LOTTERY_PRIZE INTELLECTUAL_ACTIVITY PAYMENT AGENT_COMMISSION COMPOSITE ANOTHER
      • departmentinteger int32
      • markingMarking
        4 fields · Marking
        • codestringrequired
          from 1
        • fractionstring
          pattern: \d+/\d+
        • measurestring
          values: PIECE GRAM KILOGRAM TON CENTIMETER DECIMETER METER SQUARE_CENTIMETER SQUARE_DECIMETER SQUARE_METER MILLILITER LITER CUBIC_METER KILOWATT_HOUR GKAL DAY HOUR MINUTE SECOND KILOBYTE MEGABYTE GIGABYTE TERABYTE OTHER
        • industryPropsstring
    • paymentsarray of ReceiptPaymentrequired
      from 1
      2 fields · ReceiptPayment
      • typestringrequired
        values: CASH CARD PREPAID CREDIT OTHER
      • amountinteger int64
    • footerarray of TextLine
      4 fields · TextLine
      • kindstringrequired
        values: TEXT PAIR SEPARATOR
      • textstring
      • rightstring
      • alignstring
        values: LEFT CENTER RIGHT
    • electronicboolean
    • senderEmailstring
    • settlementPlacestring
  • correctionCorrectionrequired
    3 fields · Correction
    • typestringrequired
      values: SELF INSTRUCTION
    • baseDatestring daterequired
    • baseNumberstring
JSON
{
  "receipt": {
    "type": "SELL",
    "taxation": "OSN",
    "operator": {
      "name": "string",
      "inn": "string"
    },
    "customer": {
      "contact": "string",
      "name": "string",
      "inn": "string"
    },
    "header": [
      {}
    ],
    "items": [
      {}
    ],
    "payments": [
      {}
    ],
    "footer": [
      {}
    ],
    "electronic": false,
    "senderEmail": "string",
    "settlementPlace": "string"
  },
  "correction": {
    "type": "SELF",
    "baseDate": "2026-11-01",
    "baseNumber": "string"
  }
}

Response 200 application/json

Fields · Operation
  • idstring uuid
  • typestring
  • idempotencyKeystring
  • resourcesarray of string
  • statusstring
    values: QUEUED RUNNING SUCCEEDED FAILED UNKNOWN
  • stagestring
  • createdAtstring date-time
  • startedAtstring date-time
  • finishedAtstring date-time
  • resultany value
  • 3 fields · OperationError
    • codestring
    • messagestring
    • detailsany value
  • warningsarray of string

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

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/registers/1/corrections' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"receipt":{"type":"SELL","taxation":"OSN","operator":{"name":"string","inn":"string"},"customer":{"contact":"string","name":"string","inn":"string"},"header":[{}],"items":[{}],"payments":[{}],"footer":[{}],"electronic":false,"senderEmail":"string","settlementPlace":"string"},"correction":{"type":"SELF","baseDate":"2026-11-01","baseNumber":"string"}}'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/corrections' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"receipt":{"type":"SELL","taxation":"OSN","operator":{"name":"string","inn":"string"},"customer":{"contact":"string","name":"string","inn":"string"},"header":[{}],"items":[{}],"payments":[{}],"footer":[{}],"electronic":false,"senderEmail":"string","settlementPlace":"string"},"correction":{"type":"SELF","baseDate":"2026-11-01","baseNumber":"string"}}'

Cash out#

POST/api/v1/registers/{id}/cash/out
Operation

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Idempotency-Keyrequiredheaderstring
Preferheaderstring

Request body application/json required

Fields · CashRequest
  • operatorOperator
    2 fields · Operator
    • namestringrequired
      from 1
    • innstring
  • amountinteger int64
JSON
{
  "operator": {
    "name": "string",
    "inn": "string"
  },
  "amount": 1
}

Response 200 application/json

Fields · Operation
  • idstring uuid
  • typestring
  • idempotencyKeystring
  • resourcesarray of string
  • statusstring
    values: QUEUED RUNNING SUCCEEDED FAILED UNKNOWN
  • stagestring
  • createdAtstring date-time
  • startedAtstring date-time
  • finishedAtstring date-time
  • resultany value
  • 3 fields · OperationError
    • codestring
    • messagestring
    • detailsany value
  • warningsarray of string

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

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/registers/1/cash/out' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"},"amount":1}'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/cash/out' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"},"amount":1}'

Cash in#

POST/api/v1/registers/{id}/cash/in
Operation

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Idempotency-Keyrequiredheaderstring
Preferheaderstring

Request body application/json required

Fields · CashRequest
  • operatorOperator
    2 fields · Operator
    • namestringrequired
      from 1
    • innstring
  • amountinteger int64
JSON
{
  "operator": {
    "name": "string",
    "inn": "string"
  },
  "amount": 1
}

Response 200 application/json

Fields · Operation
  • idstring uuid
  • typestring
  • idempotencyKeystring
  • resourcesarray of string
  • statusstring
    values: QUEUED RUNNING SUCCEEDED FAILED UNKNOWN
  • stagestring
  • createdAtstring date-time
  • startedAtstring date-time
  • finishedAtstring date-time
  • resultany value
  • 3 fields · OperationError
    • codestring
    • messagestring
    • detailsany value
  • warningsarray of string

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

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/registers/1/cash/in' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"},"amount":1}'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/cash/in' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30' \
  -H 'Content-Type: application/json' \
  --data '{"operator":{"name":"string","inn":"string"},"amount":1}'

Open the cash drawer#

POST/api/v1/registers/{id}/cash-drawer/open
Operation

The drawer is connected to the register; no request body

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Idempotency-Keyrequiredheaderstring
Preferheaderstring

Response 200 application/json

Fields · Operation
  • idstring uuid
  • typestring
  • idempotencyKeystring
  • resourcesarray of string
  • statusstring
    values: QUEUED RUNNING SUCCEEDED FAILED UNKNOWN
  • stagestring
  • createdAtstring date-time
  • startedAtstring date-time
  • finishedAtstring date-time
  • resultany value
  • 3 fields · OperationError
    • codestring
    • messagestring
    • detailsany value
  • warningsarray of string

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

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/registers/1/cash-drawer/open' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/cash-drawer/open' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Idempotency-Key: $(uuidgen)' \
  -H 'Prefer: wait=30'

Shift state#

GET/api/v1/registers/{id}/shift

Read from the register; if the register is busy with another operation for more than 10 s — 409

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Response 200 application/json

Fields · ShiftState
  • statusstring
    values: OPENED CLOSED EXPIRED
  • numberinteger int32

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

Request example

curl
curl 'http://localhost:7790/api/v1/registers/1/shift'
curl
curl 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/shift' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42'

Fiscal drive status#

GET/api/v1/registers/{id}/fn-status

Fiscal drive expiry and documents not sent to the OFD (ATOL, Shtrih-M); register busy longer than 10 s — 409

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Response 200 application/json

Fields · FnStatus
  • validUntilstring date
  • daysLeftinteger int64
  • notSentinteger int64
  • firstNotSentinteger int64
  • firstNotSentAtstring date-time

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

Request example

curl
curl 'http://localhost:7790/api/v1/registers/1/fn-status'
curl
curl 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/fn-status' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42'

Fiscal drive document by number#

GET/api/v1/registers/{id}/fn-documents/{number}

Document attributes from the fiscal drive archive (ATOL, Shtrih-M): the register's answer as is — for Shtrih-M a list of tags {tag, value}

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

numberrequiredpathinteger int64

device number from GET /api/v1/devices

Response 200 application/json

Type: map → any value

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

Request example

curl
curl 'http://localhost:7790/api/v1/registers/1/fn-documents/1'
curl
curl 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/fn-documents/1' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42'

Register counters#

GET/api/v1/registers/{id}/counters

Receipt count and sums by calculation sign for the shift and the whole fiscal drive (ATOL — the driver's answer as is); sums in kopecks

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Response 200 application/json

Type: map → any value

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

Request example

curl
curl 'http://localhost:7790/api/v1/registers/1/counters'
curl
curl 'https://cloud.hw-connector.ru/agent/api/v1/registers/1/counters' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42'