Skip to content

Response Objects

Each page type has a set of defined response objects, found in the specification for each page type. 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.

ProductGroup

Name Type Description
key string Product group identifier.
products Product[ ] Products in the Product group.

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.

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.

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't yet been assessed by the image service.

Swatch

Name Type Description
type SwatchType Type of colour swatch for the product.
colors string[] An array with 1 - 3 CSS colour 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 colours as CSS colour codes. Special colour 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 colour.
COLORS Used if colours have been analysed or provided in the data feed.
GOLD Used if gold properties are found in analysis or GOLD is provided as colour in the data feed.
SILVER Used if silver properties are found in analysis or SILVER is provided as colour in the data feed.
MULTI Used if MULTI was provided as colour in the data feed.

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 the variant is in stock.
stockNumber number The amount of this variant that is in stock.
link string Link to product page with variant selected.
listPrice Price List price of the variant.
sellingPrice Price The discounted price of the variant. Same as listPrice if no discount is active.

Price

Name Type Description
min number The lowest variant price.
max number The highest variant price.

Badge

Name Type Description
style BadgeType The type of badge style used.
label string The presentation text of the badge.
attribute string The attribute in the data feed that the badge is based on.
BadgeType
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 eSales.
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. Should be used when creating a facet query-parameter in combination with a facet value.
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.

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. Should be used when creating a facet query-parameter in combination with a facet id.
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.

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. Should be used when creating a facet query-parameter in combination with a facet id.
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-colour code for this colour facet.

RangeFacet

Extends Interface facetProperties and additionally has the properties listed below.

Name Type Description
min number The minimum inclusive value of the range.
max number The maximum inclusive value of the range.
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.

SizeFormat

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.

Sort

Name Type Description
selected SortType Which sort type is currently selected.
options SortOptions[ ] 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 a product, low to high.
PRICE_DESCENDING Ordered by the selling price of a product, high to low.
DISCOUNT Ordered by the discount percentage of a product, high to low.
RATING Ordered by the rating of a product, high to low.

The navigation consists of 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.

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.
Name Type Description
PRODUCT A node containing products, typically modifies a product listing on click.
LABEL A node used for grouping or visually separating other navigation nodes.
PAGE_LINK A node intended to takes the user to another page, does not have to contain products.

Extends Interface NavigationNodeProperties and additionally has the properties listed below.

Name Type Description
children NavigationTreeNode[ ] A list of the children of the current node.

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
id string The identifier for the list.
label string The presentation text of the list.
visualization Visualization How the list should be presented.
Merchandiser option
showMoreLink? string A URL to see a large selection.
Undefined if not specified in eSales 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 original 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{ ]]ci 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 CustomAttribute[ ] Custom attributes of the content item.

CustomAttribute

Name Type Description
name string Name of the attribute.
value string[] The values of the custom attrbiute.

Last update: January 15, 2021
×
Copyright

This online publication is intellectual property of Apptus Technologies. 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 Apptus Technologies 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. Apptus Technologies 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