Home / User guide / Integration of I-CASH with external software via API
Integration of I-CASH with external software via API
API integration
Integration of external software and I-CASH API
1. Description.
The I-CASH API is used to read and enter data into I-CASH. Printing of electronic receipts or ordinary fiscal receipts, issue invoices, pro forma invoices, credit notes, advance invoices and other documents.
2. Security.
The security of the provided WEB service is guaranteed by https connection and exchange of encryption keys.
3. Login (get a session)
To get a session, you must provide the following information:
1) API Key – can be obtained from the Login documentation from the user settings. Each user has a separate API key and secret key.
2) Stock item number. You get it when you create your account.
3) User ID - visible in the users settings after displaying the additional column for user ID.
4) Nonce – or request number a number that is always incremented with each subsequent request to the API
5) Signature - HMAC-SHA256 encoded string containing nonce, warehouse_id and API Key, encoded with API Secret.
PHP example:
<?php
$nonce=time()+$g_cnt; // $g_cnt – additional counter in your script, use $g_cnt++; after POST request
$message = $nonce.$WareHouseID.$api_key;
$signature = strtoupper(bin2hex(hash_hmac(‘sha256’,$message, $secret_key,true)));
?>
You can view the Login documentation here:
4. Basic guidelines for online stores and other platforms
1) Synchronization of items - in order to synchronize items in I-CASH it is necessary to choose when it is appropriate to do this. If I-CASH is used outside of your sales and warehouse platform, it is necessary to do full synchronization or all items from your platform to enter us with the same item numbers or SKU numbers and vice versa for items from our platform to enter yours. If you only use I-CASH to print fiscal receipts or documents, you can only send us the products included in the order.
2) Customer Synchronization – When creating an operation, a customer ID from our system is involved, so if the customer does not exist, you need to add or edit the customer in our system using the add and edit customer method.
3) Create a sales transaction and print a fiscal receipt.
Since our platform directly manages the cash register through the POS software, a series of commands need to be executed to make a sale, namely
- New operation
- Add items to sale
- Add a discount to the entire operation (option)
- Add payment (optional if the operation has no mixed payments)
- Finalize the sale and print a fiscal receipt (if the payment is in cash or equivalent to a cash payment by H18 card payment, cash on delivery without PPP, Stripe, etc.)
After execution and the last command finalizing the cash sale, a receipt will be printed if your cash register is not registered as an online store cash register, or will be sent by email if your cash register is registered as an online store type and electronic receipt parameter.
4) Read operation. Very often an operation needs to be read by our system. Operation does not only mean sales, but also supplies, sales returns or supplies. This can be done in two ways, one is for CronJob to call a method to enumerate operations with specific date parameters and then read the operations one by one, or use a WebHook to give you information about changes in real time. Implementation is possible in both ways.
5) Checking the quantities. It is a common practice to synchronize quantities after deliveries or stocktake or sales have been made.
Description
The iCash Client API allows you to access:
basic nomenclatures – reading
contractors – adding, reading
items – add, read
operations (sale and reversal) – adding, reading
invoices – reading
Communication is used through web servers with signed messages. The query method is POST. Requests are answered in JSON format
The current version of the project is 1.06. – change log
For more information -> HERE