Response objects
Each page type has a set of defined response objects, found in the API specification. Some response objects apply to multiple pages and reoccur within different types of responses, such as product groups. Common response objects are detailed and listed in this section.
- Always account for the possibility that lists may be empty, unless explicitly specified otherwise.
- Listed attribute names suffixed with
?
may be undefined. - An attribute that is returned as
null
from Elevate is automatically removed from the response object.
ProductGroup
Name | Type | Description |
key | string | Product group identifier. |
products | Product[ ] | Products in the Product group. |
remaining | number | The number of products in this group not included in the response. |
Only the first product in the products
array matches the current context. The other products can be used to portray thumbnails and swatches to inform the visitor of additional similar options. If multiple products within the same product group match a result, they will be returned as separate product groups with each product positioned as the first item in the products
array respectively. If the number of products returned per group has been limited, then remaining
will say how many products were not included.
Product
Name | Type | Description |
key | string | Product identifier. |
title | string | Title of the product. |
brand | string | Brand of the product. |
description? | string | Description of the product. Undefined if omitted during import. |
link | string | Link to the product page. |
ticket | string | Use with notifications to identify interaction. |
rating? | string | Current rating value. Undefined when ratings are disabled. |
inStock | boolean | True if any variant is in stock. |
listPrice | Price | Min and max list price of variants. |
sellingPrice | Price | Min and max selling price of variants. |
variants | Variant[ ] | List of variants. Empty if all variants are out of stock and the setting Display out of stock sizes in product card is disabled. |
badges | {
primary: Badge[ ],
secondary: Badge[ ]
} | Product badges, split per area. |
imageInfo | ImageInfo | Product image information. |
swatch | Swatch | Swatch information. |
custom? | { [key: string]: CustomAttribute[ ] } | Custom attributes of the product. Only available on the product-page productGroup. |
Price
Name | Type | Description |
min | number | The lowest variant price. |
max | number | The highest variant price. |
ImageInfo
Name | Type | Description |
effect | ImageEffect | The interaction effects of the product images. Merchandiser option |
images | Image[ ] | The product images to display. |
thumbnail? | string | The URL of the thumbnail for the product. Undefined if images is empty. |
ImageEffect
Name | Description |
NONE | No image effect should be applied. The images array will contain as most one element. |
SWAP | The images array will always contain two elements. The images should swap on hover. |
GALLERY | The images array will always contain more than one element. The images can be used to, for example, present an image gallery where the visitor can alternate between images. |
Image
Name | Type | Description |
sources | Source[ ] | Multiple sources for each image, used with <img srcset={VALUES}/> .
<img srcset="my-image-480w.jpg 480w, my-image-800w.jpg 800w" |
alt? | string | The alt text of the image. The alt text should describe the image. Undefined if omitted in import. |
caption? | string | The caption of the image. Only present if specified in import and on product page or content information. |
Source
Name | Type | Description |
url | string | The URL of the image source. |
width? | number | The width of the image. Undefined if width was not specified and hasn not yet been assessed by the image service. |
height? | number | The height of the image. Undefined if height was not specified and has not yet been assessed by the image service. |
Swatch
Name | Type | Description |
type | SwatchType | Type of color swatch for the product. |
colors | string[] | An array with 1 - 3 CSS color codes for SwatchType COLORS . Empty for other types. |
Swatch information is used to generate swatches for different products. The type COLORS
is the most common returned type and is accompanied by the actual colors as CSS color codes. Special color properties, supported in the data feed such as GOLD
, SILVER
, or MULTI
are other possible return types. These are to be used to generate swatches matching these specific properties.
SwatchType
Name | Description |
MISSING_COLORS | Used if there is no available color. |
COLORS | Used if colors have been analysed or provided in the data feed. |
GOLD | Used if gold properties are found in analysis or GOLD is provided as color in the data feed. |
SILVER | Used if silver properties are found in analysis or SILVER is provided as color in the data feed. |
MULTI | Used if MULTI was provided as color in the data feed. |
CustomAttribute
Name | Type | Description |
id | string | Id of the attribute (the actual value). |
label | string | The label of the attribute (the name attribute in the feed - currently not available for content items). |
Variant
Name | Type | Description |
key | string | Variant identifier. |
ticket | string | Use with notifications to identify interaction. |
size? | string | The size of the variant. Undefined if not specified in the import. |
inStock | boolean | True if stockNumber > 0. |
stockNumber | number | The amount of this variant that is in stock in the stores as determined by the query parameters channels and stores. |
link | string | Link to product page with variant selected. |
prices | string[] | An array with the keys, list prices, and discounted prices for the selected custom prices defined by the presentPrices query parameter. |
listPrice | number | List price of the variant. |
sellingPrice | number | The discounted price of the variant. Same as listPrice if no discount is active. |
availability | VariantAvailabilityInfo[ ] | An array with stock numbers store availability information. |
VariantAvailabilityInfo
Name | Type | Description |
key? | string | Store identifier that corresponds to the imported store keys. Present on all elements with the channel STORE . |
channel | string | ONLINE for one entry that corresponds to the default stockNumber (imported directly on the variant) and STORE for the others. |
stockNumber | number | The number of items in stock for this channel/key combination. |
Badge
Name | Type | Description |
theme | BadgeTheme | The type of badge theme used. |
label | string | The presentation text of the badge. |
attribute | string | The attribute in the data feed that the badge is based on. |
BadgeTheme
Name | Description |
NONE | No badge is used. |
SALE | Used when the product is on sale. |
DISCOUNT | Used if the product has a discounted price. |
NEW | Used if the product is determined as new by Elevate. |
THEME_1 | Custom badge 1. |
THEME_2 | Custom badge 2. |
THEME_3 | Custom badge 3. |
PrimaryList
Name | Type | Description |
sort | Sort | How the product groups are sorted. |
productGroups | ProductGroup[ ] | Collection of product groups. |
totalHits | number | The total number of product group hits. |
facets | Facet[ ] | Collection of facets. |
Facets
There are different types of facets that can be returned, each supporting facet specific details to enable facet specific rendering. All facets have the properties listed below, but depending on facet type, unique additional properties apply.
Interface facetProperties
Name | Type | Description |
id | string | The identifier for the facet, used by Elevate to determine which facet has been selected. Should only be used when creating facet query-parameters. |
label | string | The presentation text for the facet. |
type | FacetType | The type of facet. The facet has additional properties based on its type. |
FacetType
Name | Type | Description |
TEXT | A facet containing text values. The facet has additional TextFacet properties. | |
COLOR | A facet containing color values. The facet has additional ColorFacet properties. | |
RANGE | A facet containing range values. The facet has additional RangeFacet properties. | |
SIZE | A facet containing size values. The facet has additional SizeFacet properties. | |
CHECKBOX | A facet designed to be rendered as a checkbox. The facet has additional CheckboxFacet properties. | |
TextFacet
Extends Interface facetProperties and additionally has the properties listed below.
Name | Type | Description |
sort | FacetTextSort | How the facet values are sorted. |
selectedCount | number | The number of selected facet values. |
values | TextFacetValue[ ] | The values of the facet. |
TextFacetValue
Name | Type | Description |
id | string | The identifier for the facet value, used by Elevate to determine which facet value has been selected. Should only be used when creating facet query-parameters. |
label | string | The presentation text for the facet value. |
selected | boolean | Identifies the value as selected. |
count | number | The number of values that matches the criteria. |
FacetTextSort
Name | Description |
ALPHABETICAL | Ordered in alphabetical order from A to Z, numbers are sorted as text values. |
RELEVANCE | Ordered by the relevance of the facet values given the current context, from the most relevant to the least relevant. |
NATURAL | Ordered in alphabetical order from A to Z, numbers are sorted as numbers. |
ColorFacet
Extends Interface facetProperties and additionally has the properties listed below.
Name | Type | Description |
selectedCount | number | The number of selected facet values. |
values | ColorFacetValue[ ] | The values of the facet. |
ColorFacetValue
Name | Type | Description |
id | string | The identifier for the facet value, used by Elevate to determine which facet value has been selected. Should only be used when creating facet query-parameters. |
label | string | The presentation text for the facet value. |
selected | boolean | Identifies the value as selected. |
count | number | The number of values that matches the criteria. |
color | string | A CSS-color code for this color facet. |
RangeFacet
Extends Interface facetProperties and additionally has the properties listed below.
Name | Type | Description |
min? | number | The minimum inclusive value of the range. Undefined if no products in selection. |
max? | number | The maximum inclusive value of the range. Undefined if no products in selection. |
minSelected? | number | The selected minimum value. Undefined if not selected. |
maxSelected? | number | The selected maximum value. Undefined if not selected. |
SizeFacet
Extends Interface facetProperties and additionally has the properties listed below.
Name | Type | Description |
selectedCount | number | The number of selected facet values. |
sizeTypes | SizeType[ ] | The defined SizeTypes. |
SizeType
Name | Type | Description |
label | string | The size type, e.g. shoe or clothes sizes. Empty if size type is disabled in the experience app. |
formats | SizeFormat[ ] | The size formats for the size type. |
Name | Type | Description |
format | string | The format, e.g. SML or custom.EU . Empty if size cleaning is enabled in the experience app. |
values | TextFacetValue[ ] | The size values for the format. |
CheckboxFacet
Extends Interface facetProperties and additionally has the properties listed below.
Name | Type | Description |
selected | boolean | Identifies the checkbox as selected. |
count | number | The number of products that match the criteria. Only available when selected is true |
Sort
Name | Type | Description |
selected | SortType | Which sort type is currently selected. |
options | SortOption[ ] | Which sort types to choose from. |
SortOption
Name | Type | Description |
id | SortType | Identifier for the SortOption. |
label | string | The presentation text for the SortOption. |
SortType
Name | Description |
RELEVANCE | The most relevant product in the current context, based on set business goals. Default for all primary listings. |
NEWEST_FIRST | The newest product first, determined by release date provided in the product feed. The first import date will be used for a product if no release date is provided in the product feed. |
PRICE_ASCENDING | Ordered by the selling price of the least expensive variant of a product, low to high. |
PRICE_DESCENDING | Ordered by the selling price of the most expensive variant of a product, high to low. |
DISCOUNT | Ordered by the discount percentage of the most discounted variant of a product, high to low. |
RATING | Ordered by the rating of a product, high to low. Only applicable if rating is supplied in the product feed. |
NAME | Ordered by the name of the products. Only applicable if name is supplied in the product feed. |
Navigation
The navigation object consists of breadcrumbs and a tree of navigation nodes, where the returned object is the root of the tree. The navigation can either contain nodes of type NavigationTreeNode which are returned in the navigation tree request; or nodes of type NavigationNode which are returned in the optional navigation structure for search pages and category and landing pages.
Breadcrumb
Name | Type | Description |
label | string | The presentation text for the node. |
path | string | The path to the node. |
Interface NavigationNodeProperties
Name | Type | Description |
label | string | The presentation text for the node. |
path | string | The path to the node. |
count | number | The number of product groups in the node. |
type | NavigationNodeType | The type of node, used for separating visuals of different node types. |
link? | string | Link to page, will only by populated if type is PAGE_LINK . |
NavigationNodeType
Name | Description |
PRODUCT | A node containing products, typically modifies a product listing on click. |
LABEL | A node used for visually separating other navigation nodes. |
PAGE_LINK | A node intended to takes the user to another page, does not have to contain products. |
SPACER | A node used for adding spaces between other navigation nodes. |
NavigationTreeNode
Extends Interface NavigationNodeProperties and additionally has the properties listed below.
NavigationNode
Extends Interface NavigationNodeProperties and additionally has the properties listed below.
Name | Type | Description |
children | NavigationNode[ ] | A list of the children of the current node. |
selected | boolean | Identifies the node as selected in the tree. |
expandable | boolean | Indicates that this node can be expanded, e.g. a request with this node as selected will return children under this node. |
RecommendationList
Name | Type | Description |
algorithm | Algorithm | The algorithm used for selecting content of the list. |
id | string | The identifier for the list. |
label? | string | The presentation text of the list, or null if not configured in the apps. |
visible | boolean | Indicates if list has been hidden in the apps |
visualization | Visualization | How the list should be presented. Merchandiser option |
showMoreLink? | string | A URL to see a large selection. Undefined if not specified in Elevate Apps. Merchandiser option |
productGroups | ProductGroup[ ] | Product groups that match the selected algorithm. |
Visualization
Name | Description |
CAROUSEL | The list is presented as a carousel. |
GRID | The list is presented as a grid. |
AutoCorrect
Name | Type | Description |
q | string | The autocorrected search query. |
originalTotalHits | int | The number of hits for the original search phrase. |
DidYouMean
Name | Type | Description |
q | string | A suggested correction of the original query. Never returned simultaneously as an applied autocorrection. |
ContentList
Name | Type | Description |
id | string | List identifier. |
totalHits | number | The total number of content that matches the filter and query if applicable. |
items | ContentItem[ ] | The content items. |
ContentItem
Name | Type | Description |
key | string | Content identifier. |
type | string | Type of the content item. |
title | string | Title of the content item. |
link | string | Link to the page representing this content item. |
ticket | string | Use with notifications to identify interaction. |
releaseDate? | ISO 8601 timestamp | Release date of the content item. Undefined if omitted during import. |
description? | string | Description of the content item. Undefined if omitted during import. |
image? | Image | Image information. Undefined if omitted during import. |
custom | { [key: string]: CustomAttribute[ ] } | Custom attributes of the content item. |