Warning

This site is no longer being maintained. Visit the eDocs documentation portal for updated information.

Visit eDocs
Dismiss message

User Context - Products

Created by Pedro Ondiviela · last update June 5, 2020

About this Endpoint

Returns the last visited specific products for a specific user and query.

userLastViewedProducts” weight is calculated using the difference 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.

Request URL example

GET https://api.empathybroker.com/contextsearch/v2/usercontext/products/{instance_id}?{Input_Parameters}

Input Parameters

Parameter name Data Type
Required:  
user String
query String
Not required:  
session String
rows Integer


Responses

Responses examples for successful and failing calls to the endpoint.

200 400 404

Successful request

Type: application/json

1
2
3
4
5
6
7
8
9
{
  "userLastViewedProducts": [
    {"value":"213115", weight:3},
    {"value":"213149", weight:1.3}
  ],
  "sessionLastViewedProducts": [
    {"value":"213142", weight:3}
  ]
}