v1

latestOpenAPI 3.1.02026-07-241765501.1 MB
Facets

Create or update facet options

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

Update a list of facet options with specified value for the given facet_name. If a facet option config with provided value already exists it is updated partially, otherwise it is created.

patch/v1/facets/{facet_name}/options

Path parameters

facet_namestring required
Example:Brand

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

valuestring required

A value for this facet option. Must be unique for particular facet.

value_aliasstring

A value alias. It is used to merge several different but semantically similar facet options into one. For example, 'dark blue' and 'light blue' can be aliased to 'blue'.

replace_value_aliasboolean

Determines the handling of a value alias when present. If set to true, exclusively considers the aliased value. If false, both the original and the aliased values are used.

display_namestring

A display name for this facet option.

positioninteger

Used to order facet options.

dataobject

Dictionary with any extra facet option data. Default value is null.

hiddenboolean

Specifies whether the facet option is hidden from users.

Example request

[
  {
    "value": "Red",
    "value_alias": "blue",
    "replace_value_alias": true,
    "display_name": "Bright Red",
    "position": 1,
    "data": {
      "hex": "#FF0000"
    }
  }
]

Response

OK

valuestring required

A value for this facet option. Must be unique for particular facet.

value_aliasstring

A value alias. It is used to merge several different but semantically similar facet options into one. For example, 'dark blue' and 'light blue' can be aliased to 'blue'.

replace_value_aliasboolean

Determines the handling of a value alias when present. If set to true, exclusively considers the aliased value. If false, both the original and the aliased values are used.

display_namestring

A display name for this facet option.

positioninteger

Used to order facet options.

dataobject

Dictionary with any extra facet option data. Default value is null.

hiddenboolean

Specifies whether the facet option is hidden from users.

Example response

[
  {
    "value": "Red",
    "value_alias": "blue",
    "replace_value_alias": true,
    "display_name": "Bright Red",
    "position": 1,
    "data": {
      "hex": "#FF0000"
    }
  }
]