Contextualize REST API: User Context - Products
Method description
Returns the last visited specific products for a specific user, session and query.
"userLastViewedProducts" and "sessionLastViewedProducts" weight is calculated using the different between the last time there was an interaction with the product and "now". So, the more recent events will have more weight than others that happened long ago.
HTTP method
GET
URL schema
/v2/usercontext/products/{client_id}?user={user_id}&session={session_id}&query={query}&rows={rows}
URL example
/v2/usercontext/products/ebdemo?user=user_test&session=session_test&query=dress&rows=5
Path Parameters
Parameter name | Required | Description |
---|---|---|
client_id | Client identifier on the system |
URI Parameters
Parameter name | Required | Description | Default |
---|---|---|---|
user | Identifier that represents an unique user along the client | ||
session | Identifier that represents an unique session for the given user along the client If it's not specified there isn't session object in response | ||
query | Search term that user did | ||
rows | Number of products to return | 5 |
Responses
200 - successful request
Type: application/json
Example application/json
{ "userLastViewedProducts": [ {"value":"213115", weight:3}, {"value":"213149", weight:1.3} ], "sessionLastViewedProducts": [ {"value":"213142", weight: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" }
Related articles
-
-
EmpathyBroker Contextualize REST API (Empathy Knowledge Base)
-
-
-
Contextualize REST API: Query Context (Empathy Knowledge Base)
-
-
Contextualize REST API: Events (Empathy Knowledge Base)
-
-
Contextualize REST API: User Context (Empathy Knowledge Base)
-