Accessing the ECommerce API
Generally, EC works much like the standard Perfion API. You write some Xml telling “what data you want” and then both APIs responds with the wanted data.
Both the ECommerce API and the Perfion API can be accessed in the exact same two ways:
By consuming the Perfion Web Service, or
By using the API Query Analyzer tool built into Perfion.
Using either of the above method, Perfion deducts whether the Xml-is an EC API Request or a Perfion API Query. It is done pretty simple:
If the text is well-formed xml and root-node is named “Execute”, then it is reckoned an EC API request and relayed to the EC API.
In all other cases, the Perfion API will get it.
A short note on wording
In EC we say that you “execute a request” or “call a method”, while you in the Perfion API rather “executes a Query”. Since EC is being configured in high details with settings and mappings it really only needs a few parameters to be able to do quite a lot. So accessing it is really more like calling a method than executing a query. On the opposite, the Perfion API needs to be told “everything” regarding the data you are about to retrieve, so here you indeed write a query telling everything about what data you need on its own.
With the exception that they both responds by returning Xml, the results are quite different. While the Perfion API returns data “the Perfion way”, i.e. in a structure that makes sense for Perfion, and hereby in almost all cases needs to be reformatted to suit your purpose. EC, on the other hand, has knowledge that helps it get a lot “closer” to the receiving system.
The API Query Tool Analyzer
As for Perfion Queries, the API Query Tool Analyzer-windows is the place to construct/debug your ECommerce API-methods. Depending on your Perfion version, this windows will be slightly different.
API Query Analyzer window before Perfion 4.5 2018 R3
Figure 23 shows the Query tool built into the Perfion Client now (from version 4.5.31) being capable of running EC requests. A small menu allows you to get “sample” requests to get easily started.
NOTE: If you do not see this menu, EC is not enabled. In that case please check that you are indeed running Perfion 4.5.31 or later and that you have installed the EC features as described in chapter Auto creating features. You might also be running Perfion 4.5 2018 R3 or later, which means that this menu has been moved to a right-click menu as described in the next section.
API Query Analyzer window in Perfion 4.5 2018 R3 and later
From this version the “ECommerce API Samples”-menu has been moved to a right click menu in the Query Editor as shown in Figure 2: