Skip to main content

Response Schema Reference

This page details the structure and fields of the Recommendations API response.

Response Structure

The response from the Recommendations API follows a hierarchical structure:

Recommendation Response
└── Route Object
└── Widgets Array
└── Widget Object
└── Slots Array
└── Slot Object
├── Products Array
│ └── Product Object
└── Banners Array
└── Banner Object
├── CTAs Array
│ └── CTA Object
└── Images Array
└── Image Object
└── Banner Image Variations Array
└── Image Variation Object

Response Objects

Response Object

The top-level response object.

FieldTypeDescription
recommendationsobjectContainer for all recommendation data, containing a Route object

Route Object

Represents a matched route based on the provided URL or routeName.

FieldTypeDescription
idGUIDUnique identifier for the route
namestringHuman-readable name of the route
widgetsarrayArray of Widget objects

Widget Object

Represents a UI component within a route.

FieldTypeDescription
idGUIDUnique identifier for the widget
namestringHuman-readable name of the widget
slotsarrayArray of Slot objects

Widget Extended Fields

When includeWidgetDetails=true, these additional fields are returned:

FieldTypeDescription
typeintegerWidget type identifier
numberOfSlotsintegerNumber of slots in the widget
headerobjectWidget header configuration object

Widget Header Object

FieldTypeDescription
titleobjectTitle configuration object

Widget Title Configuration Object

FieldTypeDescription
collapsedobjectCollapsed state configuration
expandedobjectExpanded state configuration

Widget State Configuration Object

FieldTypeDescription
desktopstringDesktop configuration value
mobilestringMobile configuration value

Slot Object

Represents a position within a widget that contains products or banners.

FieldTypeDescription
labelstringHuman-readable label for the slot
tacticIdGUIDID of the tactic used for this slot
campaignIdGUIDID of the campaign for this slot
recommenderIdGUIDID of the recommender for this slot
productsarrayArray of Product objects
bannersarrayArray of Banner objects

Slot Tracking Fields

Additional fields in the Slot object used for tracking and sponsored content:

FieldTypeDescription
retailBoostCollectionCampaignIdGUID?ID for Retailer Boost campaigns
adSetIdGUID?ID of the Retail Media Ad Set
adSetVersioninteger?Version number of the Ad Set
costPerClickstringCost per click for this slot
costPerMillestringCost per thousand impressions
costPerActionstringCost per action for this slot
hmacSaltstringSalt for HMAC authentication
hmacstringAuthentication code for tracking
timeStamplong?Timestamp when slot was populated
placementIdGUID?ID of the placement
supplierIdGUID?ID of the supplier

Product Data Objects

Product Object (Basic Fields)

When expandProductDetails=false (default), only this field is returned:

FieldTypeDescription
refIdstringProduct reference ID (always returned)

Product Object (Extended Fields)

When expandProductDetails=true, these additional fields are returned:

FieldTypeDescription
idGUID?Internal product ID
namestringProduct name
itemGroupIdstringItem group/family ID
descriptionstringProduct description
skustringProduct SKU
urlstringProduct URL
isInStockboolean?Product availability status
sourcestringProduct source information
brandobjectBrand information object
imagesarrayArray of image URLs
pricesarrayArray of price objects
contentsarrayArray of localized content objects
attributesarrayArray of product attribute objects

Brand Object

FieldTypeDescription
idGUID?Brand ID
namestringBrand name
logoUrlstringURL to brand logo

Price Object

FieldTypeDescription
pricedecimalBase price
codestringCurrency code
discountPricedecimal?Discounted price (if applicable)

Content Object

FieldTypeDescription
languageTagstringLanguage code
namestringLocalized name
descriptionstringLocalized description
urlstringLocalized URL

Attribute Object

Product attributes use different fields based on the valueType property:

FieldTypeDescriptionUsed When
namestringAttribute nameAlways
valueTypestringType of value (see below)Always
stringValuestringString valuevalueType = 1
scalarValuenumberNumeric valuevalueType = 2
optionsarrayArray of option objectsvalueType = 3
jsonbooleanWhether value is JSON formatAlways

valueType values:

  • 0 = None (default fallback to String)
  • 1 = String (uses stringValue property)
  • 2 = Scalar (uses scalarValue property for numeric values)
  • 3 = StringArray (uses options array of objects with value property)

Represents a promotional banner that can be displayed in a slot.

FieldTypeDescription
idGUIDUnique identifier for the banner
titlestringBanner title text
titleColorstringColor code for the title text
subTitlestringBanner subtitle text
subTitleColorstringColor code for the subtitle text
descriptionstringBanner description text
smallPrintstringSmall print text (terms and conditions)
smallPrintColorstringColor code for the small print text
textAlignmentstringAlignment of text (e.g., "left", "center")
backgroundColorstringBackground color code for the banner
ctasarrayArray of CTA objects
imagesarrayArray of Banner Image objects

CTA Object

Represents a Call-to-Action button within a banner.

FieldTypeDescription
idGUIDUnique identifier for the CTA
enablebooleanWhether the CTA is enabled
textstringText to display on the CTA button
textColorstringColor code for the CTA text
backgroundColorstringBackground color code for the CTA
redirectUrlstringURL to navigate to when clicked
altTextstringAlternative text for accessibility
positionintPosition/order of the CTA

Represents an image used within a banner.

FieldTypeDescription
idGUIDUnique identifier for the image
imageUrlstringURL to the image
titlestringTitle of the image
isFilebooleanWhether the image is a file or URL
assetIdGUID?ID of the digital asset
altTextstringAlternative text for accessibility
containerFitstringHow image fits in container
alignmentstringAlignment of the image
bannerTypestringType of banner (see note below)
digitalAssetDeviceTypesstringDevice types bit field (see note)
bannerImageVariationsarrayArray of image variations for different devices
Device Types

Banner Type values:

  • 1 = Desktop
  • 2 = Tablet
  • 3 = Mobile

Digital Asset Device Types values (bit field):

  • 1 = Desktop
  • 2 = Tablet
  • 3 = Desktop and Tablet
  • 4 = Mobile
  • 5 = Desktop and Mobile
  • 6 = Tablet and Mobile
  • 7 = All devices (Desktop, Tablet, and Mobile)

Image Variation Object

Represents a variation of a banner image for different devices.

FieldTypeDescription
idGUIDUnique identifier for the variation
imageUrlstringURL to the variation image
titlestringTitle of the variation image
isFilebooleanWhether the image is a file or URL
assetIdGUID?ID of the digital asset
altTextstringAlternative text for accessibility
containerFitstringHow image fits in container
alignmentstringAlignment of the image
bannerTypestringType of banner (see note above)
digitalAssetDeviceTypesstringDevice types bit field (see note above)

Complete Response Example

Below is a comprehensive example showing a response with all possible fields populated:

{
"recommendations": {
"route": {
"id": "sample-route-id",
"name": "Sample Mens Clothing Route",
"widgets": [
{
"id": "sample-widget-id",
"name": "Sample Mini Cart Widget",
"type": 1,
"numberOfSlots": 1,
"header": {
"title": {
"collapsed": {
"desktop": "Sample Widget",
"mobile": "Sample Widget"
},
"expanded": {
"desktop": "Sample Mini Cart Widget",
"mobile": "Sample Mini Cart Widget"
}
}
},
"slots": [
{
"label": "Sample Slot 1",
"tacticId": "sample-tactic-id",
"campaignId": "sample-campaign-id",
"recommenderId": "sample-recommender-id",
"retailBoostCollectionCampaignId": "sample-boost-id",
"adSetId": "sample-adset-id",
"adSetVersion": 1,
"costPerClick": "0.50",
"costPerMille": "5.00",
"costPerAction": "1.00",
"hmacSalt": "sample-salt",
"hmac": "sample-hmac",
"timeStamp": 638469344702812000,
"placementId": "sample-placement-id",
"supplierId": "sample-supplier-id",
"products": [
{
"id": "sample-product-id",
"refId": "sample-refId",
"name": "Sample Product Name",
"itemGroupId": "SAMPLE-GROUP-ID",
"description": "This is a sample product description.",
"sku": "SKU123ABC",
"url": "http://www.example.com/product/sample",
"isInStock": true,
"source": "sample-source",
"brand": {
"id": "sample-brand-id",
"name": "Sample Brand",
"logoUrl": "https://www.example.com/brand-logo.jpg"
},
"images": [
"https://www.example.com/image1.jpg",
"https://www.example.com/image2.jpg",
"https://www.example.com/image3.jpg"
],
"prices": [
{
"price": 123.12,
"code": "AUD",
"discountPrice": 119.5
},
{
"price": 67.12,
"code": "SGD"
}
],
"contents": [
{
"languageTag": "en-AU",
"name": "Sample Product Name AU",
"description": "Description for Australian market.",
"url": "http://www.example.com/au/product/sample"
},
{
"languageTag": "ja-JP",
"name": "サンプル商品名",
"description": "日本市場向けの説明。",
"url": "http://www.example.com/jp/product/sample"
}
],
"attributes": [
{
"name": "Material",
"stringValue": "Synthetic",
"scalarValue": null,
"json": false,
"options": null,
"valueType": "1"
},
{
"name": "Color",
"stringValue": null,
"scalarValue": null,
"json": false,
"options": [
{
"value": "Black"
},
{
"value": "White"
}
],
"valueType": "3"
},
{
"name": "Weight",
"stringValue": null,
"scalarValue": 250,
"json": false,
"options": null,
"valueType": "2"
}
]
}
],
"banners": [
{
"id": "sample-banner-id",
"title": "Special Offer",
"titleColor": "#333333",
"subTitle": "Limited Time Only",
"subTitleColor": "#666666",
"description": "Get 20% off on all products",
"smallPrint": "Terms and conditions apply",
"smallPrintColor": "#999999",
"textAlignment": "center",
"backgroundColor": "#FFFFFF",
"ctas": [
{
"id": "sample-cta-id",
"enable": true,
"text": "Shop Now",
"textColor": "#FFFFFF",
"backgroundColor": "#FF5500",
"redirectUrl": "https://www.example.com/shop",
"altText": "Shop the collection",
"position": 1
}
],
"images": [
{
"id": "sample-image-id",
"imageUrl": "https://www.example.com/banner.jpg",
"title": "Banner Image",
"isFile": true,
"assetId": "sample-asset-id",
"altText": "Special offer banner",
"containerFit": "cover",
"alignment": "center",
"bannerType": "1",
"digitalAssetDeviceTypes": "1",
"bannerImageVariations": [
{
"id": "sample-variation-id",
"imageUrl": "https://www.example.com/banner-mobile.jpg",
"title": "Mobile Banner Image",
"isFile": true,
"assetId": "sample-asset-id-mobile",
"altText": "Mobile special offer banner",
"containerFit": "cover",
"alignment": "center",
"bannerType": "3",
"digitalAssetDeviceTypes": "4"
}
]
}
]
}
]
}
]
}
]
}
}
}