---
title: "Replace facet option"
method: PUT
path: "/v1/facets/{facet_name}/options/{facet_option_value}"
tags: ["Facets"]
---

# Replace facet option

`PUT /v1/facets/{facet_name}/options/{facet_option_value}`

## Request

- Base URL: `https://ac.cnstrc.com`
- URL: `https://ac.cnstrc.com/v1/facets/{facet_name}/options/{facet_option_value}`
- Auth: one of:
  - HTTP basic
  - HTTP bearer

**🔐 This endpoint requires [HTTP authentication](https://docs.constructor.com/reference/main-authentication) (either [Basic](https://docs.constructor.com/reference/main-authentication#basic-authentication) or [Bearer](https://docs.constructor.com/reference/main-authentication#bearer-authentication)).**
For authenticating with Bearer token, required scopes are: `facets(w)`.

Replace facet option with specified `facet_name` and `facet_option_value`.

## Path parameters

- `facet_name` string, required
- `facet_option_value` string, required

## Query parameters

- `key` string, required: The key of the index to use.
- `section` string: The section of the index to use. Defaults to `Products`.
- `c` string: The ID of the client and version that the request is coming from, such as `cio-js-2.90`.

## Request body

- FacetOptionPutRequestBody
  - `value` string, required: A value for this facet option. Must be unique for particular facet.
  - `value_alias` string: 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_alias` boolean: 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_name` string: A display name for this facet option.
  - `position` integer: Used to order facet options.
  - `data` object: Dictionary with any extra facet option data. Default value is `null`.
  - `hidden` boolean: Specifies whether the facet option is hidden from users.

## Response `200`

OK

- FacetOptionPutResponse
  - `value` string, required: A value for this facet option. Must be unique for particular facet.
  - `value_alias` string: 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_alias` boolean: 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_name` string: A display name for this facet option.
  - `position` integer: Used to order facet options.
  - `data` object: Dictionary with any extra facet option data. Default value is `null`.
  - `hidden` boolean: Specifies whether the facet option is hidden from users.

## Other responses

- `400`: Validation Error
- `401`: Credentials are not passed or action is forbidden.
- `403`: The supplied token does not have the required permissions.
- `404`: Not Found
- `429`: Rate limit breached

---

[API](https://skmtc.dev/constructor/apis/configuration.md) - [All operations](https://skmtc.dev/constructor/apis/configuration/llms.txt) - [OpenAPI document](https://skmtc.dev/constructor/apis/configuration/revisions/205ffdb5f494?raw)
