Importing the product feed¶
An import is made through using the standard HTTP POST protocol, with personal cluster credentials provided by Apptus.
A single data import request example, with fictive credentials, is demonstrated using cURL below.
curl -i -X POST -d @- \ -H "Content-Type: application/xml" \ -H "Api-Key: pkA123456789AB1BDA3E968F69A97B5508BF5B123456778912FFC99" \ "https://w1A2B3C45.api.esales.apptus.cloud/api/v1/import/fashion-data" < /my_data.xml
||The XML data feed.|
If the data feed is valid, a 204 OK response will be returned. If the data feed is invalid, an error will be returned with descriptions of the errors in the file.
The request body can be compressed with gzip if the header
Content-Encoding have the value
Continuous product feed¶
When going live, products and updates must be scheduled to be imported on a regular basis. This is typically achieved by creating a program that queries the retailers database for information and imports a feed based on that to eSales accordingly. If the database is reasonably small (i.e. less than 100.000 items), full updates can be sent regularly.
For large databases only the modified items should be sent, this as a partial update. Some sites with frequent updates to for example
stock_number can use attribute modification. This is also helpful if the
stock_number data is stored in a separate system.
Updates are processed one at a time
Incoming updates will be rejected while another update is being processed. This means that the data feed software must be set up to run updates one at a time.
All updates are atomic (i.e. either the entire update is processed or nothing will be imported), to make it easier to recover from errors. An error can be caused either by the content being invalid or because of other factors, such as network errors. If an error is received, the update can be safely rerun once the connection is restored or content of the data feed has been resolved.
The following types of errors can be returned:
|400||The import was deemed dangerous according to eSales. For more information, see Force imports.|
|403||Incorrect cluster credentials.|
|404||Cluster not found.|
|4xx||The import contained errors. The response body contains more information about the error to help with corrections to the data feed generation.|
|5xx||Server error such as cluster unavailable or busy. If 5xx errors persist, contact Apptus Support and attach any information found in the response body.|
If a retailer experiences persistent network errors they should first contact their network administrator. If the problem seems to be on Apptus end, please contact Apptus Support.
Temporary network errors
The data feed software should handle temporary network errors without manual intervention as this is usually done through retries.
Protection from potentially harmful imports is built into eSales Fashion. If an import looks dangerous, e.g. it removes half of all products in a market or removes the category from 50% or more of the products, it will be rejected with an appropriate error message and code 400. To override the protection and force eSales to accept such an import, a
force=true argument can be added to the import's post request.
curl -i -X POST -d @- \ -H "Content-Type: application/xml" \ -H "Api-Key: pkA123456789AB1BDA3E968F69A97B5508BF5B123456778912FFC99" \ "https://w1A2B3C45.api.esales.apptus.cloud/api/v1/import/fashion-data?force=true" < /my_data.xml
This online publication is intellectual property of Apptus Technologies. Its contents can be duplicated in part or whole, provided that a copyright label is visibly located on each copy and the copy is used in conjunction with the product described within this document.
All information found in these documents has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither Apptus Technologies nor the authors shall be held liable for possible errors or the consequences thereof.
Software and hardware descriptions cited in these documents might be registered trademarks. All trade names are subject to copyright restrictions and may be registered trademarks. Apptus Technologies essentially adheres to the manufacturer’s spelling. Names of products and trademarks appearing in this document, with or without specific notation, are likewise subject to trademark and trade protection laws and may thus fall under copyright restrictions.CLOSE