Product Groups¶
https://{cluster-id}.api.esales.apptus.cloud/api/v2/export/product-groups
GET¶
Deprecated
This endpoint is part of an API that has been deprecated and its end of life is 2024-04-30. All endpoints in this API version, including this, will be removed. Please upgrade to the latest version before 2024-04-30.
All API changes can be found here:
This endpoint will be replaced by product-groups.
More information regarding the API versioning strategy can be found here.
An export of the product data in Elevate 4 as a json object.
Request¶
Header parameters¶
Name | Description | Example |
---|---|---|
Api-Key Required | Api-key that was supplied during on-boarding | pkA123456789AB1BE.. |
Accept-Encoding Required | Allows responses to be compressed using Gzip. | gzip |
Query parameters¶
Name | Description | Example |
---|---|---|
market Required | The visitor market identifier. Must match the corresponding market identifier in the data feed. | UK |
limit | The number of product groups to include. If parameter is omitted, all product groups will be returned. | 10 |
productRules | Filter which products should be returned. | rule incl product_key {"pk1" "pk2"} |
curl -i \
-X GET \
-H 'Api-Key: pkA123456789AB1BE..' \
-H 'Accept-Encoding: gzip' \
"https://{cluster-id}.api.esales.apptus.cloud/api/v2/export/product-groups?market=UK&limit=10&productRules=rule incl product_key {"pk1" "pk2"}"
Response¶
Response codes¶
Status | Description |
---|---|
200 | Query accepted. The data will be returned as an application/json-object. |
403 | Incorrect cluster credentials. |
404 | Cluster not found. |
406 | No acceptable encoding found in Accept-Encoding header. |
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. |
POST¶
Deprecated
This endpoint is part of an API that has been deprecated and its end of life is 2024-04-30. All endpoints in this API version, including this, will be removed. Please upgrade to the latest version before 2024-04-30.
All API changes can be found here:
This endpoint will be replaced by product-groups.
More information regarding the API versioning strategy can be found here.
Returns a transformed version of the JSON product-groups feed if a handlebars template is provided in the body, otherwise the JSON feed with Content-Type text/plain.
Request¶
Header parameters¶
Name | Description | Example |
---|---|---|
Api-Key Required | Api-key that was supplied during on-boarding | pkA123456789AB1BE.. |
Accept-Encoding Required | Allows responses to be compressed using Gzip. | gzip |
Query parameters¶
Name | Description | Example |
---|---|---|
market Required | The visitor market identifier. Must match the corresponding market identifier in the data feed. | UK |
limit | The number of product groups to include. If parameter is omitted, all product groups will be returned. | 10 |
productRules | Filter which products should be returned, which needs be url encoded. | rule%20incl%20product_key%20%7B%20%22pk1%22%20%22pk2%22%20%7D |
Supported Content-Type¶
text/plain;charset=UTF-8
Request body¶
Example
{{#productGroups}}
{{#each products}}
{{#each variants}}
{{~../../../market}};{{../../key}};{{../key}};{{key}}
{{/each}}
{{/each}}
{{/productGroups}}
curl -i \
-X POST \
-H 'Api-Key: pkA123456789AB1BE..' \
-H 'Accept-Encoding: gzip' \
-H 'Content-Type: text/plain;charset=UTF-8' \
-L \
"https://{cluster-id}.api.esales.apptus.cloud/api/v2/export/product-groups?market=UK&limit=10&productRules=rule%20incl%20product_key%20%7B%20%22pk1%22%20%22pk2%22%20%7D" \
--data-binary @request-body.file
Response¶
Response codes¶
Status | Description |
---|---|
200 | Query accepted. The returned data will have the content type text/plain. |
400 | Bad request. Check for syntax or encoding errors ('{' and '}' in product filters must be url encoded) |
403 | Incorrect cluster credentials. |
404 | Cluster not found. |
406 | No acceptable encoding found in Accept-Encoding header. |
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. |
504 | The template transformation took too long to complete, consider using a smaller limit or a smaller template. Max duration is 29 seconds. |