Templates¶
https://{cluster-id}.api.esales.apptus.cloud/api/admin/v3/export/templates
GET¶
An export of all templates in Elevate.
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 |
curl -i \
-X GET \
-H 'Api-Key: pkA123456789AB1BE..' \
-H 'Accept-Encoding: gzip' \
"https://{cluster-id}.api.esales.apptus.cloud/api/admin/v3/export/templates"
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. |
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. |
Response body¶
Example
{
"myTemplate" : {
"products" : {
"first" : {
"fields" : [ "brand", "title", "link", "sellingPrice", "listPrice", "inStock", "custom.material" ],
"variants" : {
"all" : {
"fields" : [ "label", "inStock", "sellingPrice", "listPrice", "custom.campaign" ]
}
}
},
"rest" : {
"fields" : [ "link", "swatch" ],
"maxVariants" : 0
}
}
}
}
Schema
TemplateBody¶
Template definitions for response object customization. Template Ids must be alphanumeric and up to 25 characters.
Keys following pattern: [a-zA-Z0-9]{1,25}
and with the value: TemplateSettings Max: 5 keys
Schemas¶
Inner schemas
ProductTemplate¶
Name | Type | Description | Example |
---|---|---|---|
fields Required | string[] | The product level attributes to include. Custom attributes can be included by prefixing them with custom. , or the special custom.* can be used to include all custom attributes. | |
maxVariants | integer | The max number of variants to include. If not specified, all variants will be included. | 0 |
variants | TemplateMappingVariantTemplateSettingsVariantTemplate | The definition of the product's variants for either all or the first and rest of the variants. Required unless maxVariants is not set to 0. |
TemplateMappingProductTemplateSettingsProductTemplate¶
Name | Type | Description | Example |
---|---|---|---|
all | ProductTemplate | All products/variants. Only if first and rest are not used. | |
first | ProductTemplate | The first product/variant in the list. | |
rest | ProductTemplate | The remaining products/variants in the list. Required if first is used. |
TemplateMappingVariantTemplateSettingsVariantTemplate¶
Name | Type | Description | Example |
---|---|---|---|
all | VariantTemplate | All products/variants. Only if first and rest are not used. | |
first | VariantTemplate | The first product/variant in the list. | |
rest | VariantTemplate | The remaining products/variants in the list. Required if first is used. |
TemplateSettings¶
Name | Type | Description | Example |
---|---|---|---|
products Required | TemplateMappingProductTemplateSettingsProductTemplate | The definition of the group's products for either all or the first and rest of the products. |
VariantTemplate¶
Name | Type | Description | Example |
---|---|---|---|
fields Required | string[] | The variant level attributes to include. Custom attributes can be included by prefixing them with custom. , or the special custom.* can be used to include all custom attributes. |