Method description
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.
HTTP method
GET
URL schema
/v2/categorycontext/{client_id}/scores?pid={pid}&pid={pid}&pid={pid}
URL example
/v2/categorycontext/ebdemo/scores?pid=2201331&pid=1265192&pid=1241510
Path Parameters
Parameter name | Required | Description |
---|---|---|
client_id | Client identifier on the system |
URI Parameters
Parameter name | Required | Description | Default |
---|---|---|---|
pid | Search category scores for this product. Is required to send one at least. | - |
Responses
200 - successful request
Type: application/json
Example application/json
[ { "productId": "pid1", "scores": [ { "categoryId": "1", "weight": 50.0 } , { "categoryId": "2", "weight": 10.0 } ] }, { "productId": "pid2", "scores": [ { "categoryId": "3", "weight": 100.0 } ] } ]
400 - mandatory query parameter is missing
Type: application/json
Example application/json
{ "code": 400, "error": "productId 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)
-