fbpx
3.14 Read operation


Connection URL

TEST URL  http://nap.dev.icash.bg/clientapi/v1/get-operation
( AL ) PRODUCTION URL  https://v1.icash.al/clientapi/v1/get-operation
( BG ) PRODUCTION URL https://v5.icash.bg/clientapi/v1/get-operation

 

POST REQUEST

Param Description Field type Зад./Сорт.
api_key API Key String YES
nonce Nonce Integer YES
signature Signature String YES
ses Session indentificator String YES
OperationID Indentificator на операция Integer No/YES

 

JSON response on success

Param Description Field type Required
nonce Nonce from request Integer YES
status Request status Integer

1 – successful

YES
data Result operation YES

 

Structure of type “operation”

Param Description Field type Required
OperationID Indentificator Integer YES
OperationType Sell or

ReturnClient 

ENUM(Sell, ReturnClient) YES
OperationCashRegisterID Cash register Indentificator  Integer YES
OperationStoreID Store ID Integer YES
OperationNum Operation number Integer YES
OperationDate Operation Date String YYYY-MM-DD YES
OperationStatus Status String YES
OperationContragentID Customer/supplier Indentificator  Integer YES
OperationComment Comment String YES
OperationPrice Price with discount DECIMAL(15,5) YES
OperationCurrencyCode Currency String(3) YES
OperationPriceWithoutVat Price without VAT DECIMAL(15,5) YES
OperationTotalVat Tax of operation DECIMAL(15,5) YES
OperationPayedSum Total payed DECIMAL(15,5) YES
OperationFiskBonUUID Unique number String YES
OperationCreateUserID Create user Indentificator Integer YES
OperationCreateDate Create date and time String 

(YYYY-MM-DD HH:MM:SS)

YES
OperationCompleteUserID User ID that complete operation Integer YES
OperationCompleteDate Date and time of completion  String 

(YYYY-MM-DD HH:MM:SS)

YES
OperationPosCompleteDate Date and time in POS completion String 

(YYYY-MM-DD HH:MM:SS)

YES
OperationTotalDiscount Dicount in % DECIMAL(15,5) YES
OperationImportType Import type String YES
OperationImportRefID Referal number of import software String(30) YES
OperationImportSource Referal ID of import softwate String(30) YES
OperationElectronicReceipt Is complete with electronic receipt ENUM(YES, NO) YES
stornoType Type of return ENUM(0,1,2) YES-Сторно
FiskBonRcpNum Fiscal bon receipt number Integer YES -Сторно
FiskDeviceNum Number of cash register that is printed the operation which is returned Integer  ( >= 10000000) YES -Сторно
FiskBonDate Date of sale that is returned String (DD-MM-YY HH:mm) YES -Сторно
FiskBonUUID Unique number of sale that is returned String (/^([a-zA-Z0-9]{8})-([a-zA-Z0-9]{4})-(\d{7})$/) YES -Сторно
OperationSaleItems Canceled items of operation Array of operation_saleitem YES
OperationPayments Payments of operation Array of payment YES
OperationElectronicDataQrCode QR of printed receipt String YES – при OperationElectronicReceipt = YES
OperationElectronicDataReceipt Text from cash register String YES – при OperationElectronicReceipt = YES
SellOperationID Id of operation that is returned  Integer YES -Сторно
OperationOperationCustomStateName Name of state String YES

 

Structure of type “operation_saleitem

Param Description Field type Required
OperationSaleItemID Item Indentificator Integer YES
OperationSaleItemOperationID Operation Indentificator Integer YES
OperationSaleItemSaleItemID Item/product Indentificator Integer YES
OperationSaleItemStatus Status of item ENUM

(NORMAL,DELETED)

YES
OperationSaleItemPMUQuantity Quantity  DECIMAL(10,5) YES
OperationSaleItemPrice Unite price with discount  DECIMAL(15,5) YES
OperationSaleItemCurrencyCode Currency String(3) YES
OperationSaleItemPriceWithoutVat Item unit price with discount without tax DECIMAL(15,5) YES
OperationSaleItemDiscount Discount in % DECIMAL(15,5) YES
OperationSaleItemAverageBuyPrice Average delivery price DECIMAL(15,5) YES
MeasureUnitName Measure unit name  String YES

 

Structure of type “payment

Param Description Field type Required
PaymentID Payment Indentificator  Integer YES
PaymentOperationID Operation Indentificator  Integer YES
PaymentSum Operation unique number DECIMAL(10,2) YES
PaymentPayTypeID Method of payment Indentificator  Integer YES
PaymentCurrencyCode Currency String(3) YES
PaymentCashRegisterID Cash register Indentificator  Integer YES
PaymentCreateUserID User Indentificator Integer YES
PaymentCreateDate Payment date and time (YYYY-MM-DD HH:MM:SS) 

 

Example:

{
    „nonce“: „1553071123“,
    „status“: 1,
    „data“: {
        „OperationID“: 56078,
        „OperationType“: „ReturnClient“,
        „OperationCashRegisterID“: 1,
        „OperationStoreID“: 1,
        „OperationNum“: 190,
        „OperationDate“: „2019-03-20“,
        „OperationStatus“: „NORMAL“,
        „OperationContragentID“: null,
        „OperationComment“: „“,
        „OperationPrice“: „7.30000“,
        „OperationCurrencyCode“: „BGN“,
        „OperationPriceWithoutVat“: „6.08000“,
        „OperationTotalVat“: „1.22000“,
        „OperationPayedSum“: „7.30000“,
        „OperationFiskBonUUID“: „DY406477-0001-0000440“,
        „OperationCreateUserID“: 1,
        „OperationCreateDate“: „2019-03-20 10:44:19“,
        „OperationCompleteUserID“: 1,
        „OperationCompleteDate“: „2019-03-20 10:45:18“,
        „OperationPosCompleteDate“: „2019-03-20 10:45:17“,
        „OperationTotalDiscount“: „0.00000“,
        „OperationImportType“: „API“,
        „OperationImportRefID“: „388“,
        „OperationImportSource“: „API TEST“,
        „OperationElectronicReceipt“: „YES“,
        „OperationSaleItems“: [
            {
                „OperationSaleItemID“: 86660,
                „OperationSaleItemOperationID“: 56078,
                „OperationSaleItemSaleItemID“: 37891,
                „OperationSaleItemStatus“: „NORMAL“,
                „OperationSaleItemPMUQuantity“: „1.00000“,
                „OperationSaleItemPrice“: „7.30000“,
                „OperationSaleItemCurrencyCode“: „BGN“,
                „OperationSaleItemPriceWithoutVat“: „6.08333“,
                „OperationSaleItemDiscount“: „0.00000“,
                „OperationSaleItemAverageBuyPrice“: „0.00000“,
                „MeasureUnitName“: „кг”
            }
        ],
        „OperationPayments“: [
            {
                “PaymentID”:34,
                „PaymentOperationID“: 56078,
                „PaymentSum“: „7.30“,
                „PaymentPayTypeID“: 1,
                „PaymentCurrencyCode“: „BGN“,
                „PaymentCashRegisterID“: 1,
                „PaymentCreateUserID“: 1,
                „PaymentCreateDate“: „2019-03-20 10:45:14“
            }
        ],
        „stornoType“: „0“,
        „FiskBonRcpNum“: „292“,
        „FiskDeviceNum“: „36542249“,
        „FiskBonDate“: „20-03-19 10:44“,
        „FiskBonUUID“: „DY406477-0001-0000439“
        „SellOperationID“: null,
        „OperationOperationCustomStateName“: „“
    },
    „OperationElectronicDataQrCode“: „“,
    „OperationElectronicDataReceipt“: „\u001aD\t0000543 16-07-2019 12:17\r\u001aT\tB H      ФИРМА:     \r\u001aT\tB H      Адрес:     \r\u001aT\tN H ЕИК:                  –––-\r\u001aT\tN o #0001 Оператор 03           0003\r\u001aT\tN B    УНП: DY406477-0001-0000611   \r\u001aT\tN B   1.000 x 10.00 =               \r\u001aT\tN B ПРПХ\“Еаu\“ А/Ш бал.50мл 82232    \r\u001aT\tN B                          10.00 Б\r\u001aT\tB B ОБЩА СУМА: 10.00\r\u001aT\tN P В БРОЙ                     10.00\r\u001aT\tN B                     01 артикул  \r\u001aT\tB F   Екип Ракета   \r\u001aT\tB F   Здравейте 22  \r\u001aT\tN D 0000543         16-07-2019 12:17\r\u001aT\tB T  NOФИСКАЛЕН БОН \r\u001aT\tN Y DY406477                36542249\r\u001aT\tN S     FBDDA-9ACF1-D1FBE-1C792     \r\u001aT\tN S     B9D77-D64ED-683EC-00025     \r\u001aE\r“}

 

JSON response on unsuccess

Param Description Field type Required
nonce Nonce from request Integer YES
status Request status Integer

0 – unsuccess request

YES
error_message Error Description String YES

 

Example:

{
    „nonce“: „1553071114“,
    „status“: 0,
    „error_message“: „Wrong value for OperationID“
}

 

Безплатна консултация



Безплатна консултация



Безплатна консултация




Безплатна консултация




Безплатна консултация




Безплатна консултация