3.20. Operations list
Connection URL
TEST URL | http://nap.dev.icash.bg/clientapi/v1/operations-list |
( AL ) PRODUCTION URL | https://v1.icash.al/clientapi/v1/operations-list |
( BG ) PRODUCTION URL | https://v5.icash.bg/clientapi/v1/operations-list |
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 | Operation ID | Integer | No/YES |
OperationStoreID | Store ID | Integer | No/YES |
OperationType | Sell or ReturnClient -storno | SET(Sell,ReturnClient)
Default Sell,ReturnClient |
No/YES |
OperationContragentID | Customer Indentificator | Integer | No/YES |
OperationStatus | Operation status | SET(TEMP,NORMAL,EDITED, DELETED,FOR_DOWNLOAD,
DOWNLOADED,POS_OPEN) Default NORMAL |
No/YES |
ImportSource | Import software name | String | No |
ImportRefID | Import software referral ID | Integer | No |
OperationDateFrom | From Date | String YYYY-MM-DD | No/YES |
OperationDateTo | To date | String YYYY-MM-DD | No/YES |
OperationCreateDateFrom | Create date from | STRING(YYYY-MM-DD HH:mm:ss) | No/YES |
OperationCreateDateTo | Create date to | STRING(YYYY-MM-DD HH:mm:ss) | No/YES |
OperationCompleteDateFrom | Complete date from | STRING(YYYY-MM-DD HH:mm:ss) | No/YES |
OperationCompleteDateTo | Complete date to | STRING(YYYY-MM-DD HH:mm:ss) | No/YES |
OperationCreateUserID | User Indentificator (who is creating operation) | Integer | No/YES |
OperationCompleteUserID | User Indentificator (who finish the operation) | Integer | No/YES |
sort | Sort by | String | No |
order | Order of sort | ENUM(ASC,DESC)
Default ASC |
No |
offset | The offset of returned data | Integer
Default 0 |
No |
count | Count of rows | Integer(MAX 100)
Default 10 |
No |
JSON response on success
Param | Description | Field type | Required |
nonce | Nonce from request | Integer | YES |
status | Request status | Integer
1 – successful |
YES |
data | Result | result | YES |
Structure of type “result”
Param | Description | Field type | Required |
TotalRecords | Count of total records | Integer | YES |
Data | Array of items | Array of operation | YES |
Structure of type “operation”
Param | Description | Field type | Required |
OperationID | Operation ID | Integer | YES |
OperationType | Operation type | ENUM(Sell, ReturnClient) | YES |
OperationStoreID | Store ID | Integer | YES |
OperationCashRegisterID | Cash register ID | Integer | YES |
OperationNum | Operation number | Integer | YES |
OperationDate | Operation date | String YYYY-MM-DD | YES |
OperationStatus | Operation status | SET(TEMP,NORMAL,EDITED,DELETED, FOR_DOWNLOAD, DOWNLOADED,POS_OPEN) | YES |
OperationContragentID | Customer ID | Integer | YES |
OperationComment | Comment | String | YES |
OperationPrice | Amount with discount | DECIMAL(15,5) | YES |
OperationPriceWithoutVat | Amount without vat | DECIMAL(15,5) | YES |
OperationTotalVat | Tax amount | DECIMAL(15,5) | YES |
OperationPayedSum | Total payed amount | DECIMAL(15,5) | YES |
OperationCurrencyCode | Currency | String(3) | YES |
OperationCreateUserID | Operation create user ID | Integer | YES |
OperationCreateDate | Document create date | String
(YYYY-MM-DD HH:MM:SS) |
YES |
OperationCompleteUserID | Operation complete user ID | Integer | YES |
OperationCompleteDate | Operation complete date | String
(YYYY-MM-DD HH:MM:SS) |
YES |
OperationTotalDiscount | Discount % | DECIMAL(15,5) | YES |
OperationFiskBonUUID | УНП | String | YES |
OperationImportType | Import type | String | YES |
OperationImportRefID | Import software item ID | String(30) | YES |
OperationImportSource | Import software name | String(30) | YES |
OperationOperationCustomStateID | Indentificator на избраното състояние | Integer | YES |
OperationCustomStateName | Име на състоянието | Text | YES |
Example:
{ „nonce“: „1553083092“, „status“: 1, „data“: { „TotalRecords“: 6976, „Data“: [ { „OperationID“: 12591, „OperationType“: „Sell“, „OperationStoreID“: 1, „OperationCashRegisterID“: 4, „OperationNum“: 1, „OperationDate“: „2015-02-09“, „OperationStatus“: „NORMAL“, „OperationContragentID“: 25, „OperationComment“: „“, „OperationPrice“: „264.00000“, „OperationPriceWithoutVat“: „220.00000“, „OperationTotalVat“: „44.00000“, „OperationPayedSum“: „264.00000“, „OperationCurrencyCode“: „EUR“, „OperationCreateUserID“: 1, „OperationCreateDate“: „2015-02-09 13:03:22“, „OperationCompleteUserID“: 1, „OperationCompleteDate“: „2015-02-09 13:08:57“, „OperationTotalDiscount“: „0.00000“, „OperationFiskBonUUID“: null, „OperationImportType“: null, „OperationImportRefID“: null, „OperationImportSource“: „“, „OperationOperationCustomStateID“: null, „OperationCustomStateName“: null }, { „OperationID“: 12594, „OperationType“: „Sell“, „OperationStoreID“: 1, „OperationCashRegisterID“: null, „OperationNum“: 1, „OperationDate“: „2015-02-09“, „OperationStatus“: „NORMAL“, „OperationContragentID“: 25, „OperationComment“: „“, „OperationPrice“: „46.01000“, „OperationPriceWithoutVat“: „38.34000“, „OperationTotalVat“: „7.67000“, „OperationPayedSum“: „23.00000“, „OperationCurrencyCode“: „EUR“, „OperationCreateUserID“: 1, „OperationCreateDate“: „2015-02-09 13:20:38“, „OperationCompleteUserID“: 1, „OperationCompleteDate“: „2015-02-09 13:21:57“, „OperationTotalDiscount“: „0.00000“, „OperationFiskBonUUID“: null, „OperationImportType“: null, „OperationImportRefID“: null, „OperationImportSource“: „“, „OperationOperationCustomStateID“: 1, „OperationCustomStateName“: “state1” } ] } } |
JSON response on unsucces
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“: „1552990901“, „status“: 0, „error_message“: „Session expired“ } |