v1

latestOpenAPI 3.1.02026-07-241765501.1 MB
Facets

Create or replace facet configurations with options (Deprecated)

🔐 This endpoint requires HTTP authentication (either Basic or Bearer). For authenticating with Bearer token, required scopes are: facets(w).

Create or replace facet configurations with their options. Replacing will delete the existing facet and recreate it with the provided data.

put/v1/facets

Query parameters

keystring required

The key of the index to use.

Example:key_K2pX7vBnU0bgA5xp
sectionstring

The section of the index to use. Defaults to Products.

Example:Products
cstring

The ID of the client and version that the request is coming from, such as cio-js-2.90.

Example:cio-js-2.90

Request body

Example request

{
  "facets": [
    {
      "options": [
        {
          "value": "Red",
          "value_alias": "blue",
          "replace_value_alias": true,
          "display_name": "Bright Red",
          "position": 1,
          "data": {
            "hex": "#FF0000"
          }
        }
      ],
      "name": "Brand",
      "display_name": "Brand Name",
      "sort_descending": true,
      "position": 1,
      "options_limit": 300,
      "data": {
        "key": "value"
      }
    }
  ]
}

Response

OK

Example response

{
  "facets": [
    {
      "name": "Brand",
      "display_name": "Brand Name",
      "sort_descending": true,
      "position": 1,
      "data": {
        "key": "value"
      }
    }
  ]
}