Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Method description

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

No Format
/v2/categorycontext/{client_id}/scores?pid={pid}&pid={pid}&pid={pid}

URL example

No Format
/v2/categorycontext/ebdemo/scores?pid=2201331&pid=1265192&pid=1241510

Path Parameters

Parameter nameRequiredDescription
client_id(tick)Client identifier on the system

URI Parameters

Parameter nameRequiredDescriptionDefault
pid

(tick)

Search category scores for this product. Is required to send one at least.-

Responses

200 - successful request

Type: application/json

Code Block
titleExample 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

Code Block
titleExample application/json
{
  "code": 400,
  "error": "productId is mandatory"
}
404 - either client or endpoint don't exist

Type: application/json

Code Block
titleExample application/json
{
  "code": 404,
  "error": "XXX not found"
}

Filter by label (Content by label)
cqllabel = "empathy-contextualize-api-rest" and space = currentSpace ( )