Beta: This endpoint is in beta and may change. It is currently available to a small group of users. To request access, contact your Customer Success Manager.
Retrieve recommendation results for every pod configured on a page in one request. Results are deduplicated across the page's pods server-side, so an item (or, if the page deduplicates by variation, an item variation) is returned by at most one pod unless it is slotted.
Shared parameters apply to every pod on the page. Use pod_overrides to give a pod its own num_results, filters, filter_match_types, pre_filter_expression, fmt_options or variations_map; every other parameter is page-wide. Prefer GET: every parameter, including pod_overrides (in bracket notation), can be sent in the query string. POST is also accepted, with pod_overrides as a JSON object in the body. The body accepts only pod_overrides; all other parameters stay in the query string.
Each element of response.pods carries the pod's effective request, its response and its result_id. A pod's response is the response of the single-pod endpoint, except experiments, which the page carries once, so existing rendering code can be reused.
Send the pod's own result_id (response.pods[].result_id) with that pod's recommendation_result_view and recommendation_result_click events. The top-level result_id identifies the page request and is not a beacon id.
This feature is currently in beta.This feature is currently available to a small group of users and may change. To request access, contact your Customer Success Manager.
Related content
- Retrieve by page (POST)
- Retrieve by pod
- Create a recommendation page
- Retrieve recommendation pages
- Variations mapping
- Pre-filter expressions
- Filter names & values
- Results response structure
Overview
A page is a named, ordered set of pods for one key and section, such as pdp_b2c or home. You create and manage pages through the recommendation pages API.
This endpoint returns the results of every pod on a page in one request. Constructor deduplicates results across the page's pods before it builds the response, so the same product does not appear in two carousels.
{page_id} is resolved within the index and section selected by key and section, so a page configured for one section cannot be retrieved from another. Authentication, the key parameter and section handling are the same as for Retrieve by pod.
GET or POST
GET or POSTBoth methods return the same response.
- Prefer
GET. Every parameter, includingpod_overrides(bracket notation, see Per-pod overrides), can be sent in the query string. POSTis also accepted, withpod_overridesas a JSON object in the body. The body accepts onlypod_overrides; all other parameters, includingkey, stay in the query string, and any other field in the body returns400.
Shared parameters
The parameters listed above are supplied once and apply to every pod on the page. Each pod uses the ones its strategy needs:
- Item-based pods need
item_id.variation_idcan accompany a singleitem_id. - User-based pods need
iorui. - Term-based pods need
term. - Filtered items pods need
filtersorpre_filter_expression.
num_results applies to every pod that has no num_results override, and it must be valid for each of those pods. If one pod allows at most 20 results, a shared num_results=50 is rejected unless that pod has its own valid override.
Per-pod overrides
Use pod_overrides to replace shared values for one pod, keyed by pod_id. Pods without an override use the shared values.
| Overridable per pod | Page-wide only |
|---|---|
num_results, filters, filter_match_types, pre_filter_expression, fmt_options, variations_map | Every other parameter, including key, section, i, ui, s, c, us, item_id, variation_id and term |
Page-wide parameters identify one user, session, index and placement context, so they cannot vary between pods. Supplying a page-wide parameter inside pod_overrides returns 400.
For GET, nest overrides with bracket notation:
GET /recommendations/v1/pages/pdp_b2c?key=abc123&i=visitor-guid&item_id=product-123&num_results=10&filters[in_stock]=true&pod_overrides[similar_items][num_results]=12&pod_overrides[complete_the_look][num_results]=8&pod_overrides[complete_the_look][filters][in_stock]=true&pod_overrides[complete_the_look][filters][category]=ApparelFor POST, send the same structure as an object in the body:
{
"pod_overrides": {
"similar_items": { "num_results": 12 },
"complete_the_look": {
"num_results": 8,
"filters": { "in_stock": "true", "category": "Apparel" }
}
}
}An override replaces the whole shared value for that parameter. In these examples, complete_the_look uses only the filters in its override, so the override repeats in_stock.
When the query string and the body both carry overrides, they merge per parameter: the body wins for a parameter set in both places for the same pod, and a body override does not remove unrelated query overrides for that pod.
Response
{
"request": {
"page_id": "pdp_b2c",
"item_id": "product-123",
"num_results": 10,
"filters": { "in_stock": "true" },
"section": "Products"
},
"response": {
"page_id": "pdp_b2c",
"display_name": "PDP - B2C",
"page_type": "pdp",
"pods": [
{
"pod_id": "similar_items",
"request": { "item_id": "product-123", "num_results": 12, "filters": { "in_stock": "true" }, "section": "Products" },
"response": {
"results": [
{
"data": { "id": "product-987", "variation_id": "product-987-red" },
"value": "Red Running Shoe",
"is_slotted": false,
"labels": {},
"strategy": { "id": "alternative_items" }
}
],
"total_num_results": 1,
"pod": { "id": "similar_items", "display_name": "Similar Items" }
},
"result_id": "a1b2c3d4-0000-0000-0000-000000000001"
},
{
"pod_id": "complete_the_look",
"request": { "item_id": "product-123", "num_results": 8, "filters": { "in_stock": "true", "category": "Apparel" }, "section": "Products" },
"response": {
"results": [
{
"data": { "id": "product-654", "variation_id": null },
"value": "Matching Jacket",
"is_slotted": false,
"labels": {},
"strategy": { "id": "complementary_items" }
}
],
"total_num_results": 1,
"pod": { "id": "complete_the_look", "display_name": "Complete the Look" }
},
"result_id": "a1b2c3d4-0000-0000-0000-000000000002"
}
]
},
"result_id": "a1b2c3d4-0000-0000-0000-0000000000ff"
}Each pod's results are shortened to one result here. They use the existing single-pod result shape.
requestis the page-level request as the API interpreted it, with defaults applied. Use it for debugging only.responseholds the page'spage_id,display_nameandpage_type, and itspods.response.experimentslists the experiments this user is part of, with the user's cell, once for the whole page. It can be empty.response.podscontains every pod configured on the page, in the page's configured order, including pods with no results. Render pods in this order to let the page configuration control their visual order, or look them up bypod_idto set the order yourself.- Each pod carries its effective
request(the shared parameters with its overrides applied), itsresponseand its ownresult_id. - Each pod's
responseobject is theresponsereturned by Retrieve by pod, exceptexperiments, which the page carries once, so existing carousel rendering code can be reused. - A pod that produces no results, or fails internally, still appears with
results: []andtotal_num_results: 0. The page request still returns200. - The top-level
result_ididentifies the page request. - The endpoint is not paginated. Each pod returns at most its effective
num_results.
Deduplication
Deduplication runs server-side before the response is built, so an item (or, if the page deduplicates by variation, an item variation) is returned by at most one pod.
- For ordinary results, how an overlap is resolved is managed by Constructor, is not configurable per request, and may change. Do not depend on a particular pod keeping a particular non-slotted product.
- Slotted (pinned) items are exempt, and slotting is the only supported way to guarantee an outcome. A slotted item is never removed, a non-slotted copy of it is removed from every other pod, and an item slotted in two pods is returned by both. A slotted item also keeps the position it was slotted to.
- The page's deduplication key is
item_id(the default) oritem_and_variation_id, set in the page configuration. It cannot be overridden per request or per pod.
Tracking: which result_id to send
result_id to sendSend each pod's own result_id (response.pods[].result_id) with the recommendation_result_view and recommendation_result_click events for that pod, as you would for Retrieve by pod.
The top-level result_id identifies the page request and is not a beacon ID. An integration that reads result_id once per response, as it would for a single pod, would send the page's ID with every pod's events. Read it from each pod instead. To learn more about these events, see direct-to-API tracking.
Errors
Validation is atomic. Every page-level input and every pod's effective input is checked before any pod runs. If any is invalid, the whole request is rejected, no pod runs, and every violation is described in the single message field, one per line.
| Status | Cause | Example message |
|---|---|---|
404 | The page does not exist, or is not available, for this key and section | Recommendation page "pdp_b2c" was not found. |
400 | pod_overrides names a pod that is not on the page | pod_overrides.unknown_pod: Pod "unknown_pod" is not configured on page "pdp_b2c". |
400 | A page-wide parameter is supplied in pod_overrides | pod_overrides.similar_items.ui: Parameter 'ui' is page-wide and cannot be set per-pod. |
400 | pod_overrides contains a parameter the API does not recognize | pod_overrides.similar_items.colour: Unknown parameter 'colour'. |
400 | The shared num_results exceeds one pod's maximum | num_results: Value 50 exceeds the maximum of 20 for pod "complete_the_look". Supply a valid pod_overrides.complete_the_look.num_results value. |
400 | A pod's strategy needs a parameter that was not supplied | i: Pod "recently_viewed" requires one of 'i' or 'ui', which was not supplied. |
400 | The total num_results across the page exceeds the page budget | num_results: Total num_results across the 5 pods on page "home" is 260, which exceeds the maximum of 200. Lower num_results or supply smaller pod_overrides.<pod>.num_results values. |
400 | A pod on the page is configured with more than one strategy | Pod "similar_items" is configured with multiple strategies, which is not currently supported on pages. |
A request with several violations returns them newline-joined in one message:
{
"message": "pod_overrides.unknown_pod: Pod \"unknown_pod\" is not configured on page \"pdp_b2c\".\ni: Pod \"recently_viewed\" requires one of 'i' or 'ui', which was not supplied."
}Malformed filters or pre_filter_expression values also return 400, as they do for Retrieve by pod.
Limits
| Limit | Default |
|---|---|
| Pods per page | 5 |
Total num_results across the page | 200 |
num_results per pod | The pod's existing maximum, unchanged from Retrieve by pod |
| Rate limit and timeout | The same as other recommendation endpoints |
400Validation Error
404Not Found