Body structure (JSON)
Required fields are in bold.
| Field | Example | Type and format | Comments |
| { | |||
| "msgID" | 16, | int | |
| "currency" | "UAH", | string | |
| "totalAmount" | 39340, | int | should be strictly equal to the sum of amounts of all items, and equal to the sum of amounts of all paid items |
| "zNumber" | 4, | int | shift number, should be unique for deviceID |
| "fiscalNum" | 70113, | int | |
| "receiptNumber" | 3, | int | receipt number, should be unique for the shift and deviceID |
| "parentFiscalNum" | 1, | int | parent document number, optional |
| "cashier" | "Cashier 1", | string | |
| "dateTime" | "2025-01-02T092521.076Z", | dateTime of ISO-8601 format | should be bigger than the datetime of the last document of the same shift |
| "items" | |||
| [ | |||
| { | |||
| "name" | "Pepsi 0.3l", | string | if parent document is present, it should countain an item with the same name and unit |
| "unit" | "pcs", | string | if parent document is present, it should countain an item with the same name and unit |
| "qty" | 1000, | int | |
| "price" | 20000, | int | |
| "amount" | 18000, | int | if parent document is present, the amount of parent’s item of the same name and unit should be equal or bigger |
| "taxes" | |||
| [ | |||
| { | |||
| "taxCode" | "A", | string | |
| "taxRate" | 15000, | int | should be the same for all taxes of the same taxCode |
| "taxBase" | 3000, | int | |
| "taxAmount" | 2000 | int | |
| } | |||
| ] | |||
| }, | |||
| { | |||
| "name" | "Apples", | string | if parent document is present, it should countain an item with the same name and unit |
| "unit" | "kg", | string | if parent document is present, it should countain an item with the same name and unit |
| "qty" | 2134, | int | |
| "price" | 10000, | int | |
| "amount" | 21340, | int | if parent document is present, the amount of parent’s item of the same name and unit should be equal or bigger |
| "taxes" | |||
| [ | |||
| { | |||
| "taxCode" | "A", | string | |
| "taxRate" | 17783, | int | should be the same for all taxes of the same taxCode |
| "taxBase" | 3557, | int | |
| "taxAmount" | 2000 | int | |
| } | |||
| ] | |||
| }, | |||
| ], | |||
| "payments" | |||
| [ | |||
| { | |||
| "type" | "CASH", | string | |
| "amount" | 39340, | int | |
| "change" | 660 | int | |
| } | |||
| ], | |||
| "taxTotals" | |||
| [ | |||
| { | |||
| "taxCode" | "A", | string | |
| "taxRate" | 2000, | int | |
| "taxAmount" | 6557 | int | |
| } | |||
| ], | |||
| "identity" | |||
| { | |||
| "fn" | "567765", | string | device token |
| "tin" | "1111111111", | string | |
| "shopName" | "SHOP #1", | string | |
| "shopAddress" | "Unknown st., 404" | string | |
| }, | |||
| "location" | optional | ||
| { | |||
| "latitude" | 6.500183676689106, | float | |
| "longitude" | 120.76210479216934, | float | |
| } | |||
| } |
Example:
{
"msgID": 16,
"currency": "UAH",
"totalAmount": 39340,
"zNumber": 4,
"fiscalNum": 70113,
"receiptNumber": 3,
"parentFiscalNum": 1,
"cashier": "Cashier 1",
"dateTime": "2025-01-02T092521.076Z",
"items": [
{
"name": "Pepsi 0.3l",
"unit": "pcs",
"qty": 1000,
"price": 20000,
"amount": 20000,
"taxes": [
{
"taxCode": "A",
"taxRate": 1500,
"taxBase": 20000,
"taxAmount": 2609
}
]
}
],
"payments": [
{
"type": "CASH",
"amount": 39340,
"change": 660
}
],
"taxTotals": [
{
"taxCode": "A",
"taxRate": 1500,
"taxAmount": 2609
}
],
"identity": {
"fn": "567765",
"tin": "1111111111",
"shopName": "SHOP #1",
"shopAddress": "Unknown st., 404"
},
"location": {
"latitude": 6.500183676689106,
"longitude": 120.76210479216934
}
}