Purchase Page
POST /runtime/v1/recommend/purchasePage/
Get recommendations for the purchase page.
Request:
Body
Media type: application/json
Type: object
Properties
Property | Required (type) | Description |
---|---|---|
rrContext
| required (object)
| The context that can be provided to Rich Relevance to best serve a request.
|
ipAddress | (string) | The public ip address of the originating request. |
localizationContext
| (object)
| The localization context of the request.
|
placements | (array of string) | The list of the all the placements for which the recommendations were requested. |
channelId | (string) | The channel of the request. |
rrUserGuid | (string) | The user id assigned to the request by Rich Relevance. |
mvtId | (number) | Id to recognize the MVT split. Required to run MVT tests. |
treatmentId | (number) | The id to force an MVT treatment. |
purchaseOrders
| required (array of PurchaseOrder)
| The information about the products purchased.
|
Example:
{ "rrContext": { "apiKey": "649d16cbc8097816", "apiClientKey": "026658c7e431cdb5", "sessionId": "session1", "user": { "userId": "user123", "userAttributes": [ { "attributeName": "hairColor" }, { "attributeName": "age", "attributeValue": [ "30" ] } ], "segments": [ "under 30", "books" ] }, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1944.0 Safari/537.36", "ipAddress": "64.125.118.246", "localizationContext": { "region": "r1", "language": "en-US", "currency": "$" }, "placements": [ "purchase_page.rr1", "purchase_page.horizontal" ], "channelId": "online", "rrUserGuid": "2694fbdf-c756-4a79-b7bf-a6560ac2ebd5", "mvtId": 123, "treatmentId": 125 }, "purchaseOrders": [ { "orderId": "order123", "productLineItems": [ { "productId": "product345", "quantity": 2, "priceCents": 200, "sku": "sku3451" } ], "orderChannel": "store", "storeId": "sf94107", "emailHash": "d927ad81199aa7dcadfdb4e47b6dc694", "cardHash": "d927ad81199aa7dcadfdb4e47b6dc694" } ] }
Response:
HTTP status code 200
Body
Media type: application/json
Type: object
Properties
Properties | Required (type) | Description |
---|---|---|
requestId | required (string) | A unique request id assgined for each request by Rich Relevance. |
viewGuid | required (string) | The view context id assigned by Rich Relevance. |
mvt
| (array of MVTTreatment)
| The MVT specific information for the request.
|
rrUserGuid | required (string) | The user id assigned to the request by Rich Relevance |
responsePlacements
| required (array of ResponsePlacement)
| The recommendations for each placement fulfilled by the service for the request.
The placements for which the recommendations are not being generated.
|
Example:
{
"requestId": "request123",
"rrUserGuid": "2694fbdf-c756-4a79-b7bf-a6560ac2ebd5",
"viewGuid": "792b640b-8b56-4e8b-5249-0856340e99ce",
"mvt": [
{
"testId": 12343545,
"treatmentId": 123435454,
"treatmentName": "TestTreatment",
"control": true
}
],
"responsePlacements": [
{
"placementName": "purchase_page.rr1",
"strategyMessage": "People who viewed this also bought.",
"strategyName": "PurchaseCP",
"recommendedProducts": [
{
"productId": "product123",
"productName": "Product Name",
"productURL": "http://www.merchant.com/en/ip/productName/6000138847418",
"imageURL": "images/Thumbnails/806/396/806396.jpg",
"price": 798,
"priceRange": {
"minSalesPrice": 798,
"maxSalesPrice": 798
},
"brand": "brandName",
"categories": [
{
"categoryId": "cat1",
"categoryName": "category1"
},
{
"categoryId": "cat2",
"categoryName": "category2"
}
],
"productAttributes": [
{
"attributeName": "attribute1",
"attributeValues": [
"attrValue1, attrValue2"
]
},
{
"attributeName": "attribute2",
"attributeValues": [
"attrValue3",
"attrValue4"
]
}
],
"ratings": 3.5,
"reviews": 100,
"clickTrackingURL": "http://api.richrelevance.com/rrserver/apiclick?apiKey=649d16cbc8097816apiClientKey=026658c7e431cdb5&viewGuid=80014ed0-8f22-4f5b-8455-7f550aeba753&strategyId=8&placement=item_page.rr1&position=1&productId=product123&channelId=channel1&sessionId=session1&userId=user123"
}
]
}
],
"unFulfilledPlacements": [
{
"placementName": "purchase_page.horizontal",
"reason": "The requested placement does not exists."
}
]
}
HTTP status code 400
Body
Media type: application/json
Type: object
Properties
- code: required (integer)
- details: required (string)
- message: required (string)
- status: required (string)
HTTP status code 500
Body
Media type: application/json
Type: object
Properties
- code: required (integer)
- details: required (string)
- message: required (string)
- status: required (string)