Method description
...
No Format |
---|
/v2/categorycontext/{client_id}/preview?categoryId={categoryId}&categoryEqualize={customEqualize}&categoryEqualizeEvents={customEqualizeEvents} |
URL example
No Format |
---|
/v2/categorycontext/ebdemo/preview?categoryId=125151632&categoryEqualize={"price":5,"stock":4,"color":1}&categoryEqualizeEvents={"browseProduct":1,"browseCheckout":3} |
Path Parameters
Parameter name | Required | Description |
---|---|---|
client_id | Client identifier on the system |
URI Parameters
Parameter name | Required | Description | Default | Max | Example |
---|---|---|---|---|---|
categoryEqualize | Custom equalize to obtain products scores related to. | - | - | categoryEqualize={"price":5,"stock":4,"color":1} | |
categoryEqualizeEvents | Events weights to affect scores. | - | - | categoryEqualizeEvents={"browseProduct":1,"browseCheckout":3} | |
categoryId | CategoryId to get the product scores. | - | - | categoryId=125151632 | |
lang | Language of the category to request. | There is a default lang in service configuration. | - | lang=en | |
field | Field name to get value from the products in the preview. | {"eb_name", "eb_image"} | - | field=tittle&field=image_url... | |
maxProducts | Maximum of products in the output result. | 50 | 100 | maxProducts=100 |
Responses
200 - successful request
...
Code Block | ||
---|---|---|
| ||
[ { "pid": "656296", "eb_name": "Product 1", "eb_image": "../assets/product1.jpg", "scores": { "price": 0.3055021834061135, "stock": 0.054012821703985886, "color": 0.20550218340611354 }, "score": 0.565017188516213 }, { "pid": "2352351", "eb_name": "Product 2", "eb_image": "../assets/product2.jpg", "scores": { "price": 0.30078602620087336, "stock": 0.062488153860447836, "color": 0.20078602620087338 }, "score": 0.5640602062621946 }, { "pid": "7515814", "eb_name": "Product 3", "eb_image": "../assets/product3.jpg", "scores": { "price": 0.3005240174672489, "stock": 0.02924742172256806, "color": 0.20052401746724893 }, "score": 0.5302954566570659 }, ... ] |
400 - mandatory query parameter is missing
...