Skip to main content

PageView


Pageview API call is used to request PA Recommendations widget configuration, product slots, and any related configuration. This API call will return products, and respective configurations for the route requested.

Request

Method: GET
Endpoint: /2.7/PageView
curl --location 'https://RECS_API_BASE_URL/2.7/PageView?w=WEBSITE_ID&p=PRODUCT_ID&r=URL_ENCODED_CURRENT_URL&c=CUSTOMER_ID&rcc=CURRENCY_CODE&rcl=CURRENT_LANGUAGE' \
--header 'authority: RECS_API_BASE_HOST' \
--header 'accept: */*'

Parameters

NameTypeDescriptionRequirements
wGUIDWebsite IDRequired.
cGUIDCustomer IDNot Required.
Available in config API call
pStringProduct Ref IDNot required. The Id is only available in product details page.
This is used for tactics where response is expected in relation to the current product.
For example - recommendation of other products related to the current product, or filter results based on the current product category etc..
rStringCurrent routeRequired. Current URL
rclStringCurrent languageRequired.
Not required if the website only has one language.
Follow IETF language tag
Example: 'en-AU'
rccStringCurrent currency codeNot required.
Not required if the website only has one currency.

Response

The original response is quite long but we will describe only the relevant part of the response here.

Format: JSON


{
"payload": {
"wavt": [],
"recs": [
{
"s": [
{
"slot": 0,
"label": "1",
"slotId": "SLOT_ID",
"tacticId": "TACTIC_ID",
"campaignId": "CAMPAIGN_ID",
"recommenderId": "RECOMMENDER_ID",
"products": [
{
"id": "ID",
"refId": "12360",
"name": "XXX-YYY-ZZZ",
"sku": "PRODUCT_SKU",
"description": "Product Description",
"price": "$17.30",
"imageURL": [
"PRODUCT_IMAGE_URL"
],
"url": "PRODUCT_PAGE_URL",
"isInStock": true,
"brandId": "BRAND_ID",
"brand": {
"name": "XXX-YYY"
},
"prices": [
{
"code": "NZD",
"symbol": "$",
"price": 17.3,
"rawPrice": "$17.30"
}
],
"attributes": [
{
"name": "Product_Retail_Price",
"type": 504,
"stringValue": "$15.00",
"options": [],
"valueType": 0
},
{
"name": "Menu_Category_Level_1",
"type": 9100,
"stringValue": "Food & Drink",
"options": [],
"valueType": 0
}
],
}
]
}
]
}
],
"rpu": true,
"piis": true
},
"type": 1,
"code": 0
}

Response Fields

KeySubKeyNameDescription
payload.recsRecommendationsAn array of recommendations based on the widgets that matched the current route
payload.recs[x].sRecommendation slotsAn array of Slot objects. Each recommended product is returned as a slot. The structure and data of the product slot object will depend upon the product attributes.
payload.recs[x].s[y].slotSlot number
payload.recs[x].s[y].slotIdSlot Id
payload.recs[x].s[y].campaignIdCampaign Id
payload.recs[x].s[y].recommenderIdRecommender Id
payload.recs[x].s[y].tacticIdTactic Id
payload.recs[x].s[y].productsThe product detail and attributes. It is returned as an array of object.
payload.recs[x].s[y].products[z].idProduct Id, PA generatedThe product id in the system
payload.recs[x].s[y].products[z].refIdThe product Ref IdThis is the product unique identifier of the store
payload.recs[x].s[y].products[z].nameProduct NameThe product name
payload.recs[x].s[y].products[z].skuProduct SKUThe product sku
payload.recs[x].s[y].products[z].descriptionProduct Description
payload.recs[x].s[y].products[z].priceProduct Price
payload.recs[x].s[y].products[z].imageURLProduct Image URLAn array of product image URL's
payload.recs[x].s[y].products[z].urlProduct Page URL
payload.recs[x].s[y].products[z].pricesProduct Prices objectThis is an array of object. Returns when the store supports multi currency.
payload.recs[x].s[y].products[z].isInStockProduct stock informationTrue/False Boolean Value
payload.recs[x].s[y].products[z].brandIdBrand IdNot always available
payload.recs[x].s[y].products[z].brandThe brand objectNot always available
payload.recs[x].s[y].products[z].brand.nameProduct Brand NameNot always available
payload.recs[x].s[y].products[z].attributesProduct AttributesAn array of product attribute objects