---
updatedAt: 2026-06-11T21:07:31.000Z
agentTools:
  projectIndex: https://docs.constructor.com/llms.txt
---

# Update facet configuration

**🔐 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)`.

Partially update facet configuration with specified `facet_name`.

<Callout icon="🚧">
  The Facets API has been upgraded to v2. See the [Facets and Searchabilities v2 migration guide](https://docs.constructor.com/reference/configuration-facets-and-searchabilities-v2-migration-guide) for what's changing and how to migrate.
</Callout>

***

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "contact": {
      "email": "support@constructor.io"
    },
    "title": "Configuration",
    "version": "0.1"
  },
  "servers": [
    {
      "url": "https://ac.cnstrc.com"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Facets"
    }
  ],
  "paths": {
    "/v2/facets/{facet_name}": {
      "patch": {
        "tags": [
          "Facets"
        ],
        "operationId": "v2-facets-update-facet",
        "summary": "Update facet configuration",
        "description": "**🔐 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)).**\nFor authenticating with Bearer token, required scopes are: `facets(w)`.\n\nPartially update facet configuration with specified `facet_name`.",
        "parameters": [
          {
            "name": "facet_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "Brand",
                "Color",
                "Price"
              ]
            }
          },
          {
            "name": "key",
            "in": "query",
            "schema": {
              "title": "Key",
              "description": "The key of the index to use.",
              "maxLength": 100,
              "minLength": 1,
              "examples": [
                "key_K2pX7vBnU0bgA5xp"
              ],
              "type": "string"
            },
            "required": true
          },
          {
            "name": "section",
            "in": "query",
            "schema": {
              "title": "Section",
              "description": "The section of the index to use. Defaults to `Products`.",
              "maxLength": 100,
              "minLength": 1,
              "examples": [
                "Products",
                "Search Suggestions"
              ],
              "type": "string"
            },
            "required": false
          },
          {
            "name": "c",
            "in": "query",
            "schema": {
              "title": "C",
              "description": "The ID of the client and version that the request is coming from, such as `cio-js-2.90`.",
              "maxLength": 100,
              "minLength": 1,
              "examples": [
                "cio-js-2.90",
                "cio-ios-1.0"
              ],
              "type": "string"
            },
            "required": false
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FacetV2PatchRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacetV2PatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error"
          },
          "401": {
            "description": "Credentials are not passed or action is forbidden."
          },
          "403": {
            "description": "The supplied token does not have the required permissions."
          },
          "404": {
            "description": "Not Found"
          },
          "409": {
            "description": "Conflict"
          },
          "429": {
            "description": "Rate limit breached"
          }
        },
        "security": [
          {
            "http_basic_auth": []
          },
          {
            "http_bearer_auth": [
              "facets(w)"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "FacetType": {
        "title": "FacetType",
        "enum": [
          "multiple",
          "range",
          "hierarchical"
        ],
        "type": "string"
      },
      "FacetOptionSortOrder": {
        "title": "FacetOptionSortOrder",
        "enum": [
          "relevance",
          "value",
          "num_matches"
        ],
        "type": "string"
      },
      "FacetRangeType": {
        "title": "FacetRangeType",
        "enum": [
          "static"
        ],
        "type": "string"
      },
      "FacetRangeFormat": {
        "title": "FacetRangeFormat",
        "enum": [
          "boundaries",
          "options"
        ],
        "type": "string"
      },
      "FacetRangeInclusionType": {
        "title": "FacetRangeInclusionType",
        "enum": [
          "above",
          "below"
        ],
        "type": "string"
      },
      "FilterMatchType": {
        "title": "FilterMatchType",
        "enum": [
          "any",
          "all",
          "none"
        ],
        "type": "string"
      },
      "FacetV2PatchRequestBody": {
        "title": "FacetV2PatchRequestBody",
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "description": "The facet name used to refer to the facet in your catalog. Must be unique inside the section and key.",
            "maxLength": 100,
            "minLength": 1,
            "examples": [
              "Brand",
              "Color"
            ],
            "type": "string"
          },
          "path_in_metadata": {
            "title": "Path In Metadata",
            "description": "The path in metadata of each item where this facet is present. Must be unique inside the section and key.",
            "maxLength": 300,
            "minLength": 1,
            "examples": [
              "data.brand",
              "data.attributes.color"
            ],
            "type": "string"
          },
          "type": {
            "description": "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.",
            "examples": [
              "multiple",
              "range"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacetType"
              }
            ]
          },
          "display_name": {
            "title": "Display Name",
            "description": "The name of the facet to present to end users. Default value is `null`, in which case the `name` will be presented.",
            "maxLength": 200,
            "examples": [
              "Brand Name",
              "Size"
            ],
            "type": "string"
          },
          "sort_order": {
            "description": "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.",
            "examples": [
              "relevance",
              "value",
              "num_matches"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacetOptionSortOrder"
              }
            ]
          },
          "sort_descending": {
            "title": "Sort Descending",
            "description": "`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.",
            "examples": [
              true,
              false
            ],
            "type": "boolean"
          },
          "range_type": {
            "description": "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.",
            "examples": [
              "static"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacetRangeType"
              }
            ]
          },
          "range_format": {
            "description": "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`.",
            "examples": [
              "boundaries",
              "options"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacetRangeFormat"
              }
            ]
          },
          "range_inclusive": {
            "description": "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`",
            "examples": [
              "above",
              "below"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacetRangeInclusionType"
              }
            ]
          },
          "range_limits": {
            "title": "Range Limits",
            "description": "Defines the cut-off points for generating static range buckets. Expects list of sorted numbers (like `[10, 25, 40]`). Default value is `null`",
            "minItems": 1,
            "maxItems": 24,
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                }
              ],
              "examples": [
                10,
                25,
                40
              ]
            }
          },
          "match_type": {
            "description": "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.",
            "examples": [
              "any",
              "all",
              "none"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FilterMatchType"
              }
            ]
          },
          "position": {
            "title": "Position",
            "description": "Used to slot facet groups to fixed positions. Default value is `null`.",
            "minimum": 1,
            "examples": [
              1,
              5
            ],
            "type": "integer"
          },
          "hidden": {
            "title": "Hidden",
            "description": "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.",
            "examples": [
              false,
              true
            ],
            "type": "boolean"
          },
          "protected": {
            "title": "Protected",
            "description": "Specifies whether the facet is protected from users. Setting this to `true` will require authentication to view the facet.",
            "examples": [
              false,
              true
            ],
            "type": "boolean"
          },
          "countable": {
            "title": "Countable",
            "description": "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.",
            "examples": [
              true,
              false
            ],
            "type": "boolean"
          },
          "options_limit": {
            "title": "Options Limit",
            "description": "Maximum number of options of facet type `multiple` to return in search responses. If absent, the default limit is applied.",
            "minimum": 0,
            "maximum": 2000,
            "examples": [
              300,
              500
            ],
            "type": "integer",
            "default": 500
          },
          "data": {
            "title": "Data",
            "description": "Dictionary with any extra facet data. Default value is `{}` (empty dictionary).",
            "examples": [
              {
                "key": "value"
              },
              {
                "config_key": "config_value"
              }
            ],
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "FacetV2PatchResponse": {
        "title": "FacetV2PatchResponse",
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "description": "The facet name used to refer to the facet in your catalog. Must be unique inside the section and key.",
            "maxLength": 100,
            "minLength": 1,
            "examples": [
              "Brand",
              "Color"
            ],
            "type": "string"
          },
          "path_in_metadata": {
            "title": "Path In Metadata",
            "description": "The path in metadata of each item where this facet is present. Must be unique inside the section and key.",
            "maxLength": 300,
            "minLength": 1,
            "examples": [
              "data.brand",
              "data.attributes.color"
            ],
            "type": "string"
          },
          "type": {
            "description": "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.",
            "examples": [
              "multiple",
              "range"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacetType"
              }
            ]
          },
          "display_name": {
            "title": "Display Name",
            "description": "The name of the facet to present to end users. Default value is `null`, in which case the `name` will be presented.",
            "maxLength": 200,
            "examples": [
              "Brand Name",
              "Size"
            ],
            "type": "string"
          },
          "sort_order": {
            "description": "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.",
            "examples": [
              "relevance",
              "value",
              "num_matches"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacetOptionSortOrder"
              }
            ]
          },
          "sort_descending": {
            "title": "Sort Descending",
            "description": "`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.",
            "examples": [
              true,
              false
            ],
            "type": "boolean"
          },
          "range_type": {
            "description": "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.",
            "examples": [
              "static"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacetRangeType"
              }
            ]
          },
          "range_format": {
            "description": "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`.",
            "examples": [
              "boundaries",
              "options"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacetRangeFormat"
              }
            ]
          },
          "range_inclusive": {
            "description": "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`",
            "examples": [
              "above",
              "below"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FacetRangeInclusionType"
              }
            ]
          },
          "range_limits": {
            "title": "Range Limits",
            "description": "Defines the cut-off points for generating static range buckets. Expects list of sorted numbers (like `[10, 25, 40]`). Default value is `null`",
            "minItems": 1,
            "maxItems": 24,
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                }
              ],
              "examples": [
                10,
                25,
                40
              ]
            }
          },
          "match_type": {
            "description": "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.",
            "examples": [
              "any",
              "all",
              "none"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/FilterMatchType"
              }
            ]
          },
          "position": {
            "title": "Position",
            "description": "Used to slot facet groups to fixed positions. Must be >= 1. Default value is `null`.",
            "examples": [
              1,
              5
            ],
            "type": "integer"
          },
          "hidden": {
            "title": "Hidden",
            "description": "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.",
            "examples": [
              false,
              true
            ],
            "type": "boolean"
          },
          "protected": {
            "title": "Protected",
            "description": "Specifies whether the facet is protected from users. Setting this to `true` will require authentication to view the facet.",
            "examples": [
              false,
              true
            ],
            "type": "boolean"
          },
          "countable": {
            "title": "Countable",
            "description": "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.",
            "examples": [
              true,
              false
            ],
            "type": "boolean"
          },
          "options_limit": {
            "title": "Options Limit",
            "description": "Maximum number of options of facet type `multiple` to return in search responses. If absent, the default limit is applied.",
            "minimum": 0,
            "maximum": 4000,
            "type": "integer",
            "default": 500
          },
          "data": {
            "title": "Data",
            "description": "Dictionary with any extra facet data. Default value is `{}` (empty dictionary).",
            "examples": [
              {
                "key": "value"
              },
              {
                "config_key": "config_value"
              }
            ],
            "type": "object"
          },
          "created_at": {
            "title": "Created At",
            "description": "Facet creation date and time in ISO 8601 format",
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "title": "Updated At",
            "description": "Last facet update date and time in ISO 8601 format.",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "created_at"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "http_basic_auth": {
        "type": "http",
        "scheme": "basic"
      },
      "http_bearer_auth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```