Updates one or more ranking mix configurations. The request body is an object keyed by configuration type (search, category). Only the provided fields are updated; omitted fields retain their current values.
Request
PUT /ranking-mix-config
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Request Body
The body is a map from configuration type to a partial configuration object.
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | No | Enable or disable ranking mix boosting for this context. |
out_stock_at_the_end | boolean | No | Push out-of-stock products to the end of results. |
view | integer | No | Boost weight for page view count (0–100). |
basket | integer | No | Boost weight for add-to-basket count (0–100). |
new | integer | No | Boost weight for new/recently added products (0–100). |
profit_margin | integer | No | Boost weight for profit margin (0–100). |
rating | integer | No | Boost weight for product rating (0–100). |
revenue | integer | No | Boost weight for revenue generated (0–100). |
sold | integer | No | Boost weight for number of units sold (0–100). |
Example Request
{
"search": {
"active": true,
"out_stock_at_the_end": true,
"view": 10,
"basket": 20,
"sold": 30
},
"category": {
"active": true,
"sold": 40,
"revenue": 20
}
}Response
Returns a JSON object with the updated configurations, keyed by type.
Example Response
{
"search": {
"id": 1,
"type": "search",
"active": true,
"out_stock_at_the_end": true,
"view": 10,
"basket": 20,
"new": 5,
"profit_margin": 0,
"rating": 15,
"revenue": 25,
"sold": 30,
"variation_id": 0
},
"category": {
"id": 2,
"type": "category",
"active": true,
"out_stock_at_the_end": true,
"view": 5,
"basket": 10,
"new": 10,
"profit_margin": 0,
"rating": 10,
"revenue": 20,
"sold": 40,
"variation_id": 0
}
}
