Category Page
POST /runtime/v1/recommend/categoryPage/{categoryId}
Get recommendations for the item page.
URI Parameters
productId: required (string)
Request:
Body
Media type: application/json
Type: object
Properties
Property | Required (type) | Description |
---|---|---|
apiClientKey | required (string) | The api client assigned for the client specific application. |
apiKey | required (string) | The api key of the merchant. |
sessionId | (string) | The session id assigned to the request by the merchant. |
user
Items: UserAttribute
userAgent | (object)
required (string) | All the user specific information that can be provided for the request
The user agent string making the request |
ipAddress | (string) | The public ip address of the originating request. |
localizationContext
| (object)
| The localization context of the 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. |
Example:
{ "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": [ "item_page.rr1", "item_page.horizontal" ], "channelId": "online", "rrUserGuid": "2694fbdf-c756-4a79-b7bf-a6560ac2ebd5", "mvtId": 123, "treatmentId": 125 }
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": "item_page.rr1",
"strategyMessage": "People who viewed this also viewed.",
"strategyName": "ClickCP",
"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": "item_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)