Exports¶
Exports is the method used to extract data from Elevate. When exporting data via the Web API, an Api-Key
header is required for authentication.
Method¶
GET
URL format¶
/api/v2/export/{type}
Parameters¶
Name | Type | Description | Example |
---|---|---|---|
type | array[string] | Type of export. | See Export types |
Export types¶
The following content types are allowed for the type
parameter.
products
(for products and categories)ads
synonyms
configuration
panels
Compression¶
The export can be compressed using gzip
. This is done automatically if the client that triggers the export support compression using the header Accept-Encoding: gzip
, or if the request contained the header Accept-Encoding: gzip
.
Request body¶
N/A
Request content-type¶
N/A
Response content-type¶
application/xml
Responses¶
Response | Description |
---|---|
200 | The export completed successfully. |
403 | Api-Key could not be validated. |
404 | Cluster not found. |
4xx | The request made by the client was invalid. This may mean that the export contained errors or that the cluster has not been defined prior the export. The response body may contain more information about the error. |
503 | The server in the cluster that received the request is currently unavailable. It is recommended to retry the request. The time between request attempts should be increasing. |
5xx | Server error such as cluster unavailable or busy. The response body may contain more information about the error. |
Example¶
Request¶
cURL¶
#!/bin/bash
curl \
-X GET \
-H "Api-Key: {PRIVATE-KEY}" \
-H "Accept-Encoding:gzip" \
"https://{cluster-id}.api.esales.apptus.cloud/api/v2/export/products"
Response¶
The response depends on the specified type
, the response below is for the products
type.
<?xml version="1.0" encoding="UTF-8"?>
<operations>
<clear>
<category_tree />
<product />
</clear>
<add>
<product>
<product_key>P001</product_key>
<locale>en-GB</locale>
<title>The Magical Programmer</title>
<category>Movies</category>
<variants>
<variant>
<variant_key>V001</variant_key>
<format>DVD</format>
<price>£11.99</price>
</variant>
<variant>
<variant_key>V002</variant_key>
<format>Blueray</format>
<price>£13.99</price>
</variant>
</variants>
</product>
</add>
</operations>