younifyd
Menu

Create facet option

Create facet option

POST/v1/facets/{facet_name}/options

Use it in a workflow

  1. Add a step and choose the Constructor connector.
  2. Pick the Create facet option action (under Facets).
  3. Fill in the fields below, then reference the result from later steps as {{createFacetOption.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.

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

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

Response

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

valuestring

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

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

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