...
...
...
...
...
...
...
...
Method description
Returns the top product attributes and the last visited specific products for a specific user and session. While the "userPreferences" and "sessionPreferences" are query agnostic, both "userLastViewedProducts" and "sessionLastViewedProducts" are returned for the specific query requested.
...
Remember that your EB Contextualize configuration could use different fields for the preferences calculations, so the ones showing below ("brand" and "gender") are just examples.
HTTP method
GET
URL schema
No Format |
---|
/v2/usercontext/all/{client_id}?user={user_id}&session={session_id}&query={query}&preferences.rows={preferences.rows}&last_products.rows={last_products.rows} |
Path Parameters
Parameter name | Required | Description |
---|---|---|
client_id | Client identifier on the system |
URI Parameters
Parameter name | Required | Description | Default |
---|---|---|---|
user_id | Identifier that represents an unique user along the client | ||
session_id | 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 | ||
preferences.rows | Number of values of each field | 1 | |
last_products.rows | Number of products to return | 5 |
Responses
200 - successful request
Type: application/json
Code Block | ||
---|---|---|
| ||
{ "userPreferences": [ { "field": "brand", "values": [ {"value": "apple", "weight": 3}, {"value": "sony", "weight": 2.1} ] }, { "field": "gender", "values": [ {"value": "woman", "weight": 3} ] } ], "sessionPreferences": [ { "field": "brand", "values": [ {"value": "apple", "weight": 3} ] }, { "field": "gender", "values": [ {"value": "woman", "weight": 3} ] } ], "userLastViewedProducts": [ {"value":"213115", weight:"3"}, {"value":"213149", weight:"1.3"} ], "sessionLastViewedProducts": [ {"value":"213142", weight:"3"} ] } |
400 - mandatory query parameter is missing
Type: application/json
Code Block | ||
---|---|---|
| ||
{ "code": 400, "error": "XXX is mandatory" } |
404 - either client or endpoint don't exist
Type: application/json
Code Block | ||
---|---|---|
| ||
{ "code": 404, "error": "XXX not found" } |
Related articles
Filter by label (Content by label) | ||
---|---|---|
|