eConnect API for your website and online store

Besides all we have provided through our Enterprise Gateway and eCommerce modules, Nikrad eConnect API is designed to connect your current website or Online Store to the enterprise system and dynamic modules such as inventory, finance and trades, as well, Having an integrated solution.

Nikrad eConnect is not only an API, it is an engine and automated solution to process summarized activities and register relevant information into the enterprise system, fully integrated with dynamic modules such as inventory, sales and finance, Simplifying all the processes you need.


Nikrad econnect is designed for businesses who have a developed website or online shopping system and need to keep it active. Therefore, they can continue using their systems similar to the past and connect it to the nikrad enterprise system using an application programming interface (API), allowing them to use any type of programming languages and server technologies. This scenario is different from using nikrad enterprise gateway, which is a comprehensive issue traching and ecommerce system for people who need to hire a fully seamless solution with new technology. Therefore your current website or eShop system will continue working without any interruption, so it will send abstract information to the enterprise system to make it synchronized with the desired online system automatically at regular periods of time or occurence of specified events.



This article is designed to help you to make your website integrated into the enterprise system, step by step. You just need to keep your information related to contacts, inventory items, invoices and tickets synchronized, all by sending equivalent information into the enterprise system. Your existing website will call api commands, provided by the enterprise core objects, and the enterprise system will process and register all the required information into the database.

The first step is obtaining an eConnect API Key and registering it into the system by referring to the section "Settings \ System Settings \ System Information". eConnect service will start serving once you define a valid api key. We set the parameter "apikey" while sending requests to the server. This example shows how to get information related to a crm account with a specified id.

We had better to use post method to send data to the server. There are too many commands and libraries recognized to post data to a server. For example $.ajax in JQuery, cURL in php, WebClient in .NET and HttpURLConnection in Java. We also can create a simple html file with a form containing named inputs with values and a button to submit the form (e.g. click to see). Another simple way which is used by us through this article is sending data to a server by using a web browser and a URL with query parameters. 

[Server Address]/nep/api/econnect/[Command].jsp[?param1=value&param2=value...]

Response will be formed in XML format which is so clear to understand and applicable by xml manipulating libraries. We can also deal with xml content as simple text by parsing its elements. The example below shows a query to a server with invalid or missing api key:

As you can see, the response is too clear to understand, following a standard style defined through all the eConnect api commands. The main tag is named as "packet" containing different sub elements. We must always check for the value "up" in the tag "status" saying that the service for the command (e.g. "account.get") is available and we can process the rest of the response content. We also need to control If the tag "result" contains "error" we must stop processing the xml considering the reason lied in the tag "data" (e.g. "invalid api key"). If the tag "result" contains other values (e.g. "done") we can use all the information provided in the tag "data" (e.g. click to see).

In conclusion, we have two systems, In one hand the website (eshop), on the othe other hand the enterprise system, both should be up to date and information need to be trackable in the other system. We need to customize our website to register required information into the enterprise system by executing eConnect api commands. Finding a good method to fulfil this need is up to you and we will just give you adequate information and knowledge to find the best way for this purpose. If some errors occured while executing api commands (e.g. network connection problems, invalid information,...) we need to implement a good mechanism to keep the online system active and useful, and update the enterprise system at next possible times. For instance we can send an email to the system administrator on every single error containig all details related to the transaction, and the admin can update the enterprise system manually to keep both systems current. Another good technique is creating a data table in the database of website to store information related to postponed commands. In other words the website should review all postponed commands and execute them immediately once the connection to the enterprise system is set or at regular scheduled intervals.


CRM Accounts

There are parameters such as ID, CID, Email, Name recognized to identify an account. All of them are unique and appropriate for syncronization. ID is provided by the enterprise system automatically when creating a new account. So if you can reserve a free data field in your website, keeping id of relevant account in the database of website could be a precise method for locationg to an account. CID is good too, editable by users and suitable for storing the id of account registered in website to the enterprise system. Name is applicable but we do not recommend it. Email could be the best factor for matching accounts between two different systems, provided that you manage email addresses appropriately and keep them as they always will be unique. You also need to prevent users from changing their email address in the website or at least control email addresses for being updated in both systems. This table shows major commands related to crm accounts:

Command Description
account.list Categorizes and fetches accounts in a list with less details
account.get Fetches information related to a specified account with full details
account.add Inserts a new account into the database
account.set Updates information related to a specified account
account.del Removes an account and all its activities and dependencies from the database


Inventory Items

The best parameter to identify an inventory item is its ID which is generated by system or its Code or Barcode defined by user. These parameters could be use to sync information related to goods and services between two systems. Therefore, an inventory item which is elected to be sold online should have the same identifier (e.g. Code) in both systems. The preferable scenario is updating information related to inventory items in enterprise system whithout any need to update the online eshop system manually. In this case the eshop system need to update its items automatically at scheduled times or even on every single new visit considering a time controller to prevent overload of resources. That is an important task which need to be done precisely. However fetching information related to a specified item from the enterprise system and updating the eshop could be done every time a visitor refers to the webpage containing information details of desired good or service. Controlling the quantity on hand of items achievable from the enterprise system is another task which could be considered by the eshop system while accepting new orders.

Command Description
inventory.list Categorizes and fetches inventory items in a list with less details
inventory.get Fetches information related to a specified inventory item with full details
inventory.set Updates information of a specified inventory item



Sales Invoices are dynamic activities which hold information of sales transactions and details of inventory items which are sold. It is possible to adjust the amount of available stocks by mentioning the Store ID in invoice rows. This series of commands help us to automate the process of registering online orders as invoices into the enterprise system and control or adjust the quantity on hand of inventory items. The journal entry related to the issued invoices will be created automatically once the registered invoices are opened in the enterprise system by users.

Command Description
invoice.register Simplifies the process of registering an invoice into the system controlling quantity on hand and payment status
invoice.set Updates payment information and fixation status of a specified invoice










Powered by Nikrad Enterprise Gateway

Copyright © 2023 Nikrad Hypersystems
All rights reserved