younifyd
Menu

Retrieve facet options

Retrieve facet options

GET/v1/facets/{facet_name}/options

Use it in a workflow

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

Request

Path parameters

facet_namestringrequired

Query parameters

sectionstring

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

num_results_per_pageinteger

The number of results per page to return.

Default 100

pageinteger

The page of results to return.

offsetinteger

The number of results to skip from the beginning. Cannot be used together with `page`.

cstring

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

filterany

Criteria to narrow the result set by. Different filters are `ANDed` together.

Response

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

facet_optionsarray<object>

A list of facet options.

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

total_countinteger

Total count of facet options.

json
{
  "facet_options": [
    {
      "value": "string",
      "value_alias": "string",
      "replace_value_alias": true,
      "display_name": "string",
      "position": 0,
      "data": {},
      "hidden": false
    }
  ],
  "total_count": 0
}

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

Retrieve facet options — Constructor — Documentation