Skip to content

Import

An import of the data feed is made through using the standard HTTP POST method, with personal cluster credentials provided by Apptus. For information about the different import types and formats, see Format specification. For information about scheduling imports, see Scheduling.

Request

Request method

POST

Request URL

https://{cluster-id}.api.esales.apptus.cloud/api/v1/import/lifestyle-data

Request parameters

Name Type Description Example
body XML The data feed in XML-format. For more information, see Format specification.
Required
N/A
force boolean Argument to override protection against harmful imports. For more information, see Force imports. force=true

Request headers

The Content-Type and Api-Key request headers are required.

  • Content-Type - application/XML.
  • Accept-Encoding - gzip, allows responses to be compressed using Gzip.
  • Api-Key - apiKey, the unique apiKey provided by Apptus.

Request body

For information about the different import types and formats, see Format specification.

<?xml version="1.0" encoding="UTF-8" ?>
    <lifestyle_data_import type="full">
        ...
    </lifestyle_data_import>

Request example

An full import example is demonstrated using cURL below.

curl -i -X POST -T my_data.xml \
-H "Content-Type: application/xml" \
-H "Api-Key: pkA123456789AB1BDA3E968F69A97B5508BF5B123456778912FFC99" \
"https://w1A2B3C45.api.esales.apptus.cloud/api/v1/import/lifestyle-data"

my_data.xml

XML
<?xml version="1.0" encoding="UTF-8" ?>
<lifestyle_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>
                            <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 custom_format="SML">S</size>
                                        <size custom_format="EU">36</size>
                                    </sizes>
                                    <custom_prices>
                                        <price id="EUR">
                                            <selling_price>9.99</selling_price>
                                            <list_price>12.99</list_price>
                                        </price>
                                        <price id="SEK">
                                            <selling_price>99.90</selling_price>
                                            <list_price>129.90</list_price>
                                        </price>
                                        <price id="VIP_SEK">
                                            <selling_price>69.90</selling_price>
                                            <list_price>129.90</list_price>
                                        </price>
                                    </custom_prices>
                                </variant>
                                <variant key="1001-100-2">
                                    <stock_number>0</stock_number>
                                    <selling_price>9.99</selling_price>
                                    <list_price>12.99</list_price>
                                    <cost>8.00</cost>
                                    <url>/products/1001-100?size=M</url>
                                    <sizes>
                                        <size custom_format="SML">M</size>
                                        <size custom_format="EU">38</size>
                                    </sizes>
                                    <custom_prices>
                                        <price id="EUR">
                                            <selling_price>9.99</selling_price>
                                            <list_price>12.99</list_price>
                                        </price>
                                        <price id="SEK">
                                            <selling_price>99.90</selling_price>
                                            <list_price>129.90</list_price>
                                        </price>
                                        <price id="VIP_SEK">
                                            <selling_price>69.90</selling_price>
                                            <list_price>129.90</list_price>
                                        </price>
                                    </custom_prices>
                                </variant>
                                <variant key="1001-100-3">
                                    <stock_number>5</stock_number>
                                    <selling_price>9.99</selling_price>
                                    <list_price>12.99</list_price>
                                    <cost>8.00</cost>
                                    <url>/products/1001-100?size=L</url>
                                    <sizes>
                                        <size custom_format="SML">L</size>
                                        <size custom_format="EU">40</size>
                                    </sizes>
                                    <custom_prices>
                                        <price id="EUR">
                                            <selling_price>9.99</selling_price>
                                            <list_price>12.99</list_price>
                                        </price>
                                        <price id="SEK">
                                            <selling_price>99.90</selling_price>
                                            <list_price>129.90</list_price>
                                        </price>
                                        <price id="VIP_SEK">
                                            <selling_price>69.90</selling_price>
                                            <list_price>129.90</list_price>
                                        </price>
                                    </custom_prices>
                                </variant>
                            </variants>
                            <release_date>2019-10-27T00:00:00Z</release_date>
                            <description>Loose-fit striped T-shirt with a slightly lower neckline.</description>
                            <images>
                                <image>
                                    <type_default>model</type_default>
                                    <tags>Hero</tags>
                                    <urls>
                                        <url width="200">//cdn.esalesdrivensite.com/images/1001-100_model.jpg?preset=200x200</url>
                                        <url width="600">//cdn.esalesdrivensite.com/images/1001-100_model.jpg?preset=600x600</url>
                                    </urls>
                                </image>
                                <image>
                                    <type_override>cutout</type_override>
                                    <urls>
                                        <url width="40">//cdn.esalesdrivensite.com/images/1001-100_cutout_thumbnail.jpg</url>
                                        <url width="600">//cdn.esalesdrivensite.com/images/1001-100_cutout.jpg</url>
                                    </urls>
                                </image>
                            </images>
                            <custom_attributes>
                                <season name="Summer">m_678</season>
                                <style name="Casual">m_c_349</style>
                                <category name="T-shirts">349</category>
                            </custom_attributes>
                            <pattern>striped</pattern>
                            <rating>4.3</rating>
                            <color_default>#0000ff|#ffffff</color_default>
                        </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>
                <content key="872">
                    <type>link</type>
                    <title>Contact</title>
                    <link>/uk/contact</link>
                </content>
                <content key="901">
                    <type>faq</type>
                    <title>How do I return clothes?</title>
                    <link>/uk/faq/returns</link>
                    <release_date>2020-12-01T00:00:00Z</release_date>
                    <image>
                        <urls>
                            <url width="400">http://returns-pic-11204.com</url>
                        </urls>
                    </image>
                    <custom_attributes>
                        <keywords>replace|swap|take back</keywords>
                    </custom_attributes>
                </content>
            </add_or_replace>
        </content_items>
    </modify>
</lifestyle_data_import>

Response

Response headers

N/A

Response content-type

N/A

Response codes

Code Description
204 The import file was valid.
4xx The import contained errors. The response body contains more information about the error to help with corrections to the data feed generation.
400 The import was deemed dangerous according to eSales. For more information, see Force imports.
403 Incorrect cluster credentials.
404 Cluster not found.
409 An import is currently in progress.
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.

Response objects

Response example
HTTP/1.1 204 No Content

Force imports

Protection from potentially harmful imports is built into eSales Lifestyle. If an import looks dangerous, e.g. it removes half of all products in a market 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 post request of the import.


Last update: September 8, 2021
×
Copyright

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