Contextualize REST API: Query Context - Products

Method description

Returns the top specific products for a specific query. The specific product weights are calculated based on user clicks, add-to-carts and purchases and the values are normalized using a linear function.

With segmentation can sent a user attributes list ("key":"value", ...) and number of tries in the request and the API try to return a segment data using this user attributes. If not have results for this user attributes in this number of tries it return the basic query context.

"topProducts" are sorted by "weight" in descending order.

HTTP method


URL schema


URL example


Path Parameters

Parameter nameRequiredDescription
client_id(tick)Client identifier on the system

URI Parameters

Parameter nameRequiredDescriptionDefault


Search term that user did
lang(tick)Language of the query
rows(error) Number of products to return




Minimum number of events required to return a field or product.

client configuration / 10
userAttributes (error) User attributes to get segmentation data-
maxTries(error) Max tries to do segmentation intentsclient configuration / 3


200 - successful request

Type: application/json

Example application/json
  {"value":"213115", weight:"3"},
  {"value":"213149", weight:"1.3"}
400 - mandatory query parameter is missing

Type: application/json

Example application/json
  "code": 400,
  "error": "XXX is mandatory"
404 - either client or endpoint don't exist

Type: application/json

Example application/json
  "code": 404,
  "error": "XXX not found"