younifyd
Menu

Update facet configuration (Deprecated)

Update facet configuration (Deprecated)

PATCH/v1/facets/{facet_name}

Use it in a workflow

  1. Add a step and choose the Constructor connector.
  2. Pick the Update facet configuration (Deprecated) action (under Facets).
  3. Fill in the fields below, then reference the result from later steps as {{updateFacetConfigurationDeprecated.response.data}}.

Request

Path parameters

facet_namestringrequired

Query parameters

sectionstring

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

cstring

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

Request body

Enter the body as JSON in the step's Body field.

optionsarray<object>

A list of facet option configurations to create and associate with this facet configuration. Default value is `[]` (empty list).

Default []

valuestringrequired

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.

Default true

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.

Default false

namestring

The facet name used to refer to the facet in your catalog. Must be unique inside the section and key.

typeany

Type of facet. Use `multiple` to display the facet as categorical values (for example, a Brand facet with values of Under Armour, Adidas and Puma) and `range` to display as a numeric range. You must use `range` when you want to display a slider, as well as when you want to display a list of range buckets.

display_namestring

The name of the facet to present to end users. Default value is `null`, in which case the `name` will be presented.

sort_orderany

Determines the default criterion by which options of this facet group are sorted. Must be one of `relevance`, `value` (to sort facet options alphanumerically), `num_matches` (to sort facet options by number of matching results). Default value is `relevance`. Sort can be overridden by setting the `position` attribute on facet options.

sort_descendingboolean

`true` if this facet group's options should be sorted in descending order, `false` to sort ascending. Default value is `true` if `sort_order` is `relevance` or `num_matches` and `false` for `value`. Setting `sort_order: relevance` will set `sort_descending: true` for `POST`, `PUT`, `PATCH` endpoints if `sort_descending` is not explicitly set in the request.

range_typeany

Should be `static` if a facet is configured as `range`. If the facet is not configured as a range, value will be `null`. Default value is null.

range_formatany

Format of `range` facets. Determines whether the facet is configured to display as a slider (in which case the search endpoint will return only min & max values) or as a list of buckets. `boundaries` for sliders, `options` for buckets. Default value is `null`.

range_inclusiveany

Used to create inclusive buckets. For example, for a `rating` facet, you might want to display options like `1 and above`, `2 and above`, `3 and above`, etc. Values can be either `above` (options have no upper bound), `below` (options have no lower bound), or `null` if range options should not be inclusive. Default value is `null`

range_limitsarray<oneOf>

Defines the cut-off points for generating static range buckets. Expects list of sorted numbers (like `[10, 25, 40]`). Default value is `null`

match_typeany

Match types specify the behavior of filters when multiple options of the same facet (e.g: color: yellow & blue) are selected. Specifies whether the results must match all options, any of them or none.

positioninteger

Used to slot facet groups to fixed positions. Default value is `null`.

hiddenboolean

Specifies whether the facet is hidden from users. Use this for facet data that you don't want shown to end users, but that isn't sensitive.

protectedboolean

Specifies whether the facet is protected from users. Setting this to `true` will require authentication to view the facet.

countableboolean

Specifies whether counts for each facet option should be calculated and shown in the response. Setting this to `false` will skip counting these options, improving performance for facets with high cardinality.

options_limitinteger

Maximum number of options of facet type `multiple` to return in search responses. If absent, the default limit is applied.

Default 500

dataobject

Dictionary with any extra facet data. Default value is `{}` (empty dictionary).

json
{
  "options": [],
  "name": "string",
  "type": null,
  "display_name": "string",
  "sort_order": null,
  "sort_descending": false,
  "range_type": null,
  "range_format": null,
  "range_inclusive": null,
  "range_limits": [
    null
  ],
  "match_type": null,
  "position": 0
}

Response

Returns 200 with an object. Read it in later steps with {{updateFacetConfigurationDeprecated.response.data.<field>}}.

optionsarray<object>

A list of facet option configurations to create and associate with this facet configuration. Default value is `[]` (empty list).

Default []

valuestringrequired

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.

Default true

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.

Default false

namestring

The facet name used to refer to the facet in your catalog. Must be unique inside the section and key.

typeany

Type of facet. Use `multiple` to display the facet as categorical values (for example, a Brand facet with values of Under Armour, Adidas and Puma) and `range` to display as a numeric range. You must use `range` when you want to display a slider, as well as when you want to display a list of range buckets.

display_namestring

The name of the facet to present to end users. Default value is `null`, in which case the `name` will be presented.

sort_orderany

Determines the default criterion by which options of this facet group are sorted. Must be one of `relevance`, `value` (to sort facet options alphanumerically), `num_matches` (to sort facet options by number of matching results). Default value is `relevance`. Sort can be overridden by setting the `position` attribute on facet options.

sort_descendingboolean

`true` if this facet group's options should be sorted in descending order, `false` to sort ascending. Default value is `true` if `sort_order` is `relevance` or `num_matches` and `false` for `value`. Setting `sort_order: relevance` will set `sort_descending: true` for `POST`, `PUT`, `PATCH` endpoints if `sort_descending` is not explicitly set in the request.

range_typeany

Should be `static` if a facet is configured as `range`. If the facet is not configured as a range, value will be `null`. Default value is null.

range_formatany

Format of `range` facets. Determines whether the facet is configured to display as a slider (in which case the search endpoint will return only min & max values) or as a list of buckets. `boundaries` for sliders, `options` for buckets. Default value is `null`.

range_inclusiveany

Used to create inclusive buckets. For example, for a `rating` facet, you might want to display options like `1 and above`, `2 and above`, `3 and above`, etc. Values can be either `above` (options have no upper bound), `below` (options have no lower bound), or `null` if range options should not be inclusive. Default value is `null`

range_limitsarray<oneOf>

Defines the cut-off points for generating static range buckets. Expects list of sorted numbers (like `[10, 25, 40]`). Default value is `null`

match_typeany

Match types specify the behavior of filters when multiple options of the same facet (e.g: color: yellow & blue) are selected. Specifies whether the results must match all options, any of them or none.

positioninteger

Used to slot facet groups to fixed positions. Default value is `null`.

hiddenboolean

Specifies whether the facet is hidden from users. Use this for facet data that you don't want shown to end users, but that isn't sensitive.

protectedboolean

Specifies whether the facet is protected from users. Setting this to `true` will require authentication to view the facet.

countableboolean

Specifies whether counts for each facet option should be calculated and shown in the response. Setting this to `false` will skip counting these options, improving performance for facets with high cardinality.

options_limitinteger

Maximum number of options of facet type `multiple` to return in search responses. If absent, the default limit is applied.

Default 500

dataobject

Dictionary with any extra facet data. Default value is `{}` (empty dictionary).

created_atstring (date-time)

Facet creation date and time in ISO 8601 format

updated_atstring (date-time)

Last facet update date and time in ISO 8601 format.

json
{
  "created_at": "2025-01-01T00:00:00Z",
  "options": [],
  "name": "string",
  "type": null,
  "display_name": "string",
  "sort_order": null,
  "sort_descending": false,
  "range_type": null,
  "range_format": null,
  "range_inclusive": null,
  "range_limits": [
    null
  ],
  "match_type": null
}

Need more? See the Constructor guide for connection setup and behaviour shared by every action.