Last update 2021-07-26
This method is used in EPS - LDT project. Method is designed to insert sales transaction. It is redesigned copy of method rdata_kvitai2.
New features are receipt cancellation feature and possibility to insert sales in other currencies than EUR. Field names are also redesigned.
2021-07-26 Added features to delete and view sales transaction.
Call is performed via HTTP POST.
| Name | Description | Old value |
|---|---|---|
| user_id | Webservice API key obtained from administrator | user_id |
| terminal_id | Unique id for every terminal , provided by administrator | terminal_id |
| cardNumber | Credit card number | KortelesNr |
| receiptNumber | Number of receipt | n_kvitonr |
| receiptRow | Receipt rows list in JSON format | HTTP POST Body |
| Name | Description | Notes |
|---|---|---|
| lang | Web service response language. EN LT or RU | |
| receiptDateTime | Receipt date and time in format YYYY-MM-DD hh:mm:ss | data_laikas |
| currency | Currency of receipt. Currency is configured with terminal_id. Terminal can work with one currency only | kodas_vl |
| cancelReceipt | New feature to cancel receipt. Existing receiptNumber must be provided. Receipt must be from the same terminal_id | |
deleteReceiptNEW |
New feature to delete receipt. Values 0 - no 1 - yes .Aditional parameter receiptNumber must be provided. Receipt must be from the same terminal_id | |
viewReceiptNEW |
New feature to view receipt. Values 0 - no 1 - yes .Aditional receiptNumber must be provided. Receipt must be from the same terminal_id |
| Name | Description | Old value |
|---|---|---|
| barcode | Barcode. If fuel following codes must be used: 03 - Gasoline 04 - Diesel 07 - Dyed diesel 08 - Gas |
barkodas |
| name | Product name (New) | |
| qty | QTY | kiekis |
| vatAmount | Total VAT amount of row | mokesciai |
| vatPercent | VAT Percent of row | |
| totalAmount | Total amount of row (with discount if any and with VAT) | suma |
| Name | Description |
|---|---|
| status | Web service status |
| description | Status description |
| receipt | Receipt information |
| Name | Description | |
|---|---|---|
| 00 | Ok | |
| 01 | Card not found | |
| 03 | Card is blocked | |
| 04 | No parameter receiptNumber | |
| 05 | Wrong date format | |
| 06 | Receipt already exists | |
| 07 | No parameter - receiptRow | |
| 08 | Parameter receiptRow is not json List | |
| 09 | Mandatory receiptRow field - barcode is missing | |
| 10 | Mandatory receiptRow field - qty is missing | |
| 11 | Mandatory receiptRow field - vatAmount is missing | |
| 12 | Mandatory receiptRow field - totalAmount is missing | |
| 13 | Mandatory receiptRow field - vatPercent is missing | |
| 14 | Currency rate not found | |
| 15 | Receipt not found (cancelReceipt) | |
| 16 | Receipt already canceled (cancelReceipt) | |
| 17 | viewReceipt possible values 0 | 1 |
| 18 | ||
| 94 | DB write error | |
| 95 | Wrong terminal_id | |
| 96 | Wrong user_id | |
| 97 | No rights to call method | |
| 98 | DB connect error | |
| 99 | Web service call error, no POST data |
Call of method must be repeated until status 00 is received. All unsuccessful transactions must be stored in log files, and provided to administrator.

[{"barcode":"04","qty":1,"vatAmount":21,"totalAmount":121,"vatPercent":21}]