The category context allows to evaluate the user navigation data to offer a score to each product that indicates the weight that it has within each category according to this data and the concrete configurations of the product fields given by the client.
Returns the scores for the products indicated in the categories configured for the client. This method get all the categories available for the client and check what is the score weight for each one of the product ids indicated in the request. Is required that this endpoint receive at least one product id to get the scores.
GET
/v2/categorycontext/{client_id}/scores?pid={pid}&pid={pid}&pid={pid} |
/v2/categorycontext/ebdemo/scores?pid=2201331&pid=1265192&pid=1241510 |
Parameter name | Required | Description |
---|---|---|
client_id | Client identifier on the system | |
lang | Default_lang set by configuration |
Parameter name | Required | Description | Default |
---|---|---|---|
pid | Search category scores for this product. Is required to send one at least. | - |
Type: application/json
[ { "productId": "pid1", "scores": [ { "categoryId": "1", "weight": 50.0 } , { "categoryId": "2", "weight": 10.0 } ] }, { "productId": "pid2", "scores": [ { "categoryId": "3", "weight": 100.0 } ] } ] |
Type: application/json
{ "code": 400, "error": "productId is mandatory" } |
Type: application/json
{ "code": 404, "error": "XXX not found" } |