Skip to content

Templates

https://{cluster-id}.api.esales.apptus.cloud/api/admin/v4/export/templates

GET

An export of all templates in Elevate.

Request

curl -i \
-X GET \
-H 'Api-Key: pkA123456789AB1BE..' \
"https://{cluster-id}.api.esales.apptus.cloud/api/admin/v4/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
application/json;charset=UTF-8
{
  "templates" : {
    "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

Name Type Description Example
templates <string, TemplateSettings> Template definitions for response object customization. Template IDs must be alphanumeric and up to 25 characters. {"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}}}}

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.
×
Copyright

This online publication is intellectual property of Voyado Lund AB. 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 Voyado Lund AB 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. Voyado Lund AB 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