Data¶
https://{cluster-id}.api.esales.apptus.cloud/api/v1/import/data
POST¶
Deprecated
This endpoint is part of an API that has been deprecated and its end of life is 2024-04-20. All endpoints in this API version, including this, will be removed. Please upgrade to the latest version before 2024-04-20.
All API changes can be found here:
This endpoint will be replaced by data.
More information regarding the API versioning strategy can be found here.
An import of the data feed is made through using the standard HTTP POST method, with personal cluster credentials provided during onboarding. For information about the different import types and formats, see Format specification. For information about scheduling imports, see Scheduling.
Request¶
Header parameters¶
Name | Description | Example |
---|---|---|
Api-Key Required | Api-key that was supplied during on-boarding | pkA123456789AB1BE.. |
Accept-Encoding | Allows responses to be compressed using Gzip. | gzip |
Content-Encoding | Defines which encoding was used to compress the data. | gzip |
Content-Type | application/xml | application/xml |
Query parameters¶
Name | Description | Example |
---|---|---|
force | Argument to override protection against harmful imports. For more information, see Force imports. | false |
name | A name to identify the import in logs |
Supported Content-Type¶
application/xml
Request body¶
Example
<?xml version="1.0" encoding="UTF-8" ?>
<data_import type="full">
<modify market="UK" locale="en-GB">
<product_groups>
<add_or_replace>
<product_group key="1001">
<brand>Gazelle</brand>
<department>Men</department>
<products>
<product key="1001-100">
<title>Linen T-shirt</title>
<url>/products/1001-100</url>
<release_date>2019-10-27T00:00:00Z</release_date>
<description>Loose-fit striped T-shirt with a slightly lower neckline.</description>
<images>
<image>
<urls>
<url>//cdn.example.com/images/1001-100_model.jpg?preset=200x200</url>
<url>//cdn.example.com/images/1001-100_model.jpg?preset=600x600</url>
</urls>
</image>
</images>
<custom_attributes>
<category>T-Shirts</category>
</custom_attributes>
<variants>
<variant key="1001-100-1">
<stock_number>12</stock_number>
<selling_price>9.99</selling_price>
<list_price>12.99</list_price>
<cost>8.00</cost>
<url>/products/1001-100?size=S</url>
<sizes>
<size>S</size>
</sizes>
</variant>
</variants>
</product>
</products>
</product_group>
</add_or_replace>
</product_groups>
<content_items>
<add_or_replace>
<content key="871">
<type>link</type>
<title>Shipping</title>
<link>/uk/customer-service/shipping</link>
</content>
</add_or_replace>
</content_items>
</modify>
</data_import>
curl -i \
-X POST \
-H 'Api-Key: pkA123456789AB1BE..' \
-H 'Accept-Encoding: gzip' \
-H 'Content-Encoding: gzip' \
-H 'Content-Type: application/xml' \
"https://{cluster-id}.api.esales.apptus.cloud/api/v1/import/data?force=false&name=name" \
-T request-body.file.gz
Response¶
Response codes¶
Status | Description |
---|---|
204 | The import file was valid. |
400 | The import was deemed dangerous according to Elevate. For more information, see Force imports. |
403 | Incorrect cluster credentials. |
404 | Cluster not found. |
409 | An import is currently in progress. |
500 | Server error such as cluster unavailable, busy or internal error. If 5xx errors persist, contact support and attach any information found in the response body. |
503 | The server in the cluster that received the request is currently unavailable or busy. It is recommended to retry the request. The time between request attempts should be increasing. |