Skip to main content
RichRelevance

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

  • userid
  • userAttributes

   Items: UserAttribute

  • attributeName
  • attributeValue
  • segments

userAgent

(object)

  • (string)
  • (array of UserAttributes)

 

  • required (string)
  • (array of )
  • (array of string)   

required (string)

All the user specific information that can be provided for the request

  • The merchant defined identifier for the user.
  • The attributes of the user that merchant can provide.

 

  • The name of the user attribute.
  • The value of the user attribute.
  •  All the segments a user might belong to

The user agent string making the request

ipAddress (string) The public ip address of the originating request.

localizationContext

  • region
     
  • language
     
  • currency

(object)

  • (string)
     
  • (string)
     
  • (string)

The localization context of the request.

  • The merchant defined region from which the request originated. It must match the regions provided in the feed by the merchant.
  • The merchant defined language code of the request. It must match the language codes in the feed provided by the merchant.
  • The currency code for the request. It mush match the currency codes in the feed provided by the merchant.
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
Items: MVTTreatment

  • testId
  • treatmentId: 
  • treatmentName
  • control

(array of MVTTreatment)
 

  •  required (number)
  • required (string)
  • required (string)
  • required (boolean)

The MVT specific information for the request.
 

  • The test identifier for MVT.
  • The treatment identifier for MVT.
  • The name of the treatment.
  • Was the MVT part of the control.
rrUserGuid required (string) The user id assigned to the request by Rich Relevance

responsePlacements
Items: ResponsePlacement

  • placementName
  • strategyMessage
     
  • strategyName
     
  • recommendedProducts
    Items: RecommendedProduct
    • productId
    • productName
    • productURL
    • imageURL
    • price
    • priceRange
      • minSalesPrice
      • maxSalesPrice
  • brand
  • categories

    Items: ProductCategories

    • categoryId
    • categoryName
  • productAttributes: ProductAttributes
    • attributeName
    • attributeValue
  • ratings
  • reviews
  • clickTrackingURL


unFulfilledPlacements
Items: UnFulfilledPlacement

  • placementName
     
  • reason

 

required (array of ResponsePlacement)

  • required (string)
  • required (string)
     
  • required (string)
     
  • required (array of RecommendedProduct)
    • required (string)
    • required (string)
    • required (string)
    • required (string)
    • required (integer)
    • required (object)
      • ​​​​​​​required (integer)
      • required (integer)
  • ​​​​​​​required (string)
  • required (string)

     
    • required (string)
    • required (string)
  • ​​​​​​required (array of ProductAttributes)
    ​​​​​​​
    • ​​​​​​​required (string)
    • required (array of )
  •  required (number)
  • required (integer)
  • required (string)


​​​​​​​required (array of UnFulfilledPlacement)

  • required (string)
     
  • required (string)

The recommendations for each placement fulfilled by the service for the request.

  • The placement name for which the recommendation are returned.
  • The message attached to the strategy whose recommendations are being returned.
  • The name of the strategy whose recommendations are being returned.
  • The most relevant information of the products that are being recommended for the placement.
    • The unique identifier of the product being recommended.
    • The name of the product being recommended.
    • The link on the merchant's website for the product.
    • The location to the image of the product.
    • The price of the product in cents.
       
      • The minimum sales price of the product in cents.
      • The maximum sales price of the product in cents.
    • The brand of the product.
    • The categories to which a product belongs.

      ​​​​​​​
    • The identifier for a merchant's category.
    • The name of the category.
  • All the product attributes.
    ​​​​​​​
    • The name of the product attribute.
    • The value associated with the attribute name.
  • The ratings that the product has received.
  • The number of reviews that the product has received.
  • The URL to track a click on the product by a Rich Relevance service.

The placements for which the recommendations are not being generated.

  • The name of the placement for which the recommendations are not returned
  • The reason why the recommendations were not returned for the placement.
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)
  • Was this article helpful?