Update ranking mix configuration

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

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/json

Request Body

The body is a map from configuration type to a partial configuration object.

FieldTypeRequiredDescription
activebooleanNoEnable or disable ranking mix boosting for this context.
out_stock_at_the_endbooleanNoPush out-of-stock products to the end of results.
viewintegerNoBoost weight for page view count (0–100).
basketintegerNoBoost weight for add-to-basket count (0–100).
newintegerNoBoost weight for new/recently added products (0–100).
profit_marginintegerNoBoost weight for profit margin (0–100).
ratingintegerNoBoost weight for product rating (0–100).
revenueintegerNoBoost weight for revenue generated (0–100).
soldintegerNoBoost 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
  }
}