---
updatedAt: 2026-06-09T13:57:58.000Z
agentTools:
  projectIndex: https://docs.constructor.com/llms.txt
---

# Facets

> 🚧 Important
>
> 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.

> 🚧 Important
>
> As of **November 2024**, facets are no longer specified and ingested via catalog upload. You should treat facets as product metadata. Once uploaded, you can configure facets using the [Constructor dashboard](https://docs.constructor.com/docs/using-the-constructor-dashboard-configuring-rules-facets-configure-global-facets) or our API.

Facets play a crucial role in creating an intuitive and efficient search experience by helping users quickly find the products they seek by applying relevant filters, such as price, brand, color, etc.

When you configure a facet, you control how the facet options are displayed, sorted, and behave in product listing pages.

Available configurations include:

* **Display name.** Customize the name of the facet as it appears to end users.
* **Sort order.** Control the order in which facets or facet options appear (for example, alphanumeric, etc.).
* **Type.** Specify whether a facet displays as a list of options (multiple), a hierarchical structure, or a range (for numerical values).
* **Range configuration.** Specify how ranges are defined and displayed for numerical facets. These ranges can be static (predefined buckets) or dynamic (automatically adjusted based on data).
* **Visibility and access.** Specify whether facets are hidden or protected. Hidden facets are not displayed to end users but can be accessed via API. Protected facets require authentication to be accessed.

**When uploading a product catalog, treat facets as product metadata.** Once uploaded, you can configure facets using the [Constructor dashboard](https://docs.constructor.com/docs/using-the-constructor-dashboard-configuring-rules-facets-configure-global-facets) or our API. You must configure a facet for it to appear on a product listing page. Facet configurations are not created automatically.

It is possible to configure facet groups and facet options for product data that doesn’t exist in your index. While this ability isn’t supported in the dashboard, you can configure the data using our API.

### API endpoints

#### Facet endpoints

* [Retrieve facet configurations](https://docs.constructor.com/reference/v2-facets-retrieve-facets)
* [Retrieve facet configuration](https://docs.constructor.com/reference/v2-facets-retrieve-facet)
* [Create facet configuration](https://docs.constructor.com/reference/v2-facets-create-facet)
* [Create or replace facet configurations](https://docs.constructor.com/reference/v2-facets-create-or-replace-facets)
* [Update facet configuration](https://docs.constructor.com/reference/v2-facets-update-facet)
* [Update facet configurations](https://docs.constructor.com/reference/v2-facets-update-facets)
* [Replace facet configuration](https://docs.constructor.com/reference/v2-facets-replace-facet)
* [Delete facet configuration](https://docs.constructor.com/reference/v2-facets-delete-facet)

#### Facet option endpoints

* [Retrieve facet option](https://docs.constructor.com/reference/v1-facet-options-retrieve-facet-option)
* [Retrieve facet options](https://docs.constructor.com/reference/v1-facet-options-retrieve-facet-options)
* [Create facet option](https://docs.constructor.com/reference/v1-facet-options-create-facet-option)
* [Create or update facet options](https://docs.constructor.com/reference/v1-facet-options-create-or-update-facet-options)
* [Update facet option](https://docs.constructor.com/reference/v1-facet-options-update-facet-option)
* [Replace facet option](https://docs.constructor.com/reference/v1-facet-options-replace-facet-option)
* [Delete facet option](https://docs.constructor.com/reference/v1-facet-options-delete-facet-option)

## Concepts

Facet configurations are represented with two related concepts: facet groups and facet options. Facet groups represent the facet key and facet options represent the facet value. For example, imagining an item with `Brand: Under Armour`. The brand would be the facet group (or key), while "Under Armour" would represent the facet option (or value).

Each facet configuration includes a `path_in_metadata` field that directly specifies the metadata field path where the facet data lives in your items. For example, if your items have `{"facets": {"brand": "Under Armour"}}`, then `path_in_metadata` would be `facets.brand`.

The facet options API may be used to configure the way facet options are displayed. Using this set of endpoints, it is possible to slot options to specific positions, change their display names, hide them, and more. Facet options are managed separately from facet configurations via the `/v1/facets/{name}/options` endpoints.

## Protected and hidden facets

Product catalogs often include data in the form of facets that shouldn't be displayed to end users. These may contain data that is old, unused, confusing to users or sensitive. Consider a few use cases described below:

### Protected facets

A business team wants to incorporate inventory and margins in the ranking formula and in the merchant tools dashboard. However, this is sensitive data. Not only should inventory and margin data be hidden from end users, it also should be prevented from being displayed for search requests without authentication. Declaring this data as a protected (`protected: true`) can facilitate this.

### Hidden facets

A merchant team wants to use an attribute to define merchandizing goals. It should not be shown to end users, but it's not a problem if it could conceivably be accessed from the API. For instance, a "season" property is set on items that is used to define a Collection. The facet can be set to hidden (`hidden: true`) to facilitate this case.

### Setting hidden state as the default

It is possible to set a default behavior that sets all facets to hidden by default upon creation via the API. This involves creating a facet with `name=__default__` and setting the property of `hidden=true`. This configuration ensures that any new facet added to your catalog without a specific setting will automatically be marked as hidden.

> 🚧 Caution
>
> Before implementing this default hidden state, it's crucial to review your existing facets. This configuration will retrospectively apply to all existing facets that do not have an explicit hidden/non-hidden setting, potentially altering their current visibility to end-users.

## Special facets and preserved values

Every facet you create includes a special value: `*`. This value can be used to filter all items that have the facet. The `*` value is reserved and cannot be used as a facet option.

Additionally, note that each item in the product catalog will automatically receive an `age` facet. This facet is configured like any other, except for two fields:

1. **Type**: always set to `range`.
2. **Name**: always set to `__cnstrc_age`.

The `age` facet value is calculated as the time since `__cnstrc_release_time`. By default, `__cnstrc_release_time` is set to the time of item creation in our system. The release time can be used to [schedule product launches](https://docs.constructor.com/docs/integrating-with-constructor-e-commerce-specific-use-cases-product-launch).

To override the release time and age for a specific item or variation, add the key `__cnstrc_release_time` with a valid ISO 8601 formatted string or Unix timestamp as the value. Examples of valid formats include `2017-10-08T07:10:12.003+03:00` for ISO 8601 or `1507435812` for Unix timestamps. This key should be added to the [item](https://docs.constructor.com/reference/v2-items-create-or-replace-items) or [variation](https://docs.constructor.com/reference/v2-variations-create-or-replace-variations) `data` field.

The key `__cnstrc_release_time` should be included in the `data` field, not in the `facets` field. Items and variations with `__cnstrc_release_time` in the `facets` field will be rejected.

## Examples

The following examples describe facet configuration requests that can be made via the [Create facet configuration](https://docs.constructor.com/reference/v2-facets-create-facet) endpoint to fulfill different use cases:

#### Brand facet with alphabetically sorted options

```json
{
  "name": "brand",
	"path_in_metadata": "facets.brand",
  "display_name": "Brand",
  "sort_order": "value",
  "type": "multiple",
  "data": {}
}
```

To configure display names for facet options, use the [Create or update facet options](https://docs.constructor.com/reference/v1-facet-options-create-or-update-facet-options) endpoint separately:

```json
{
  "options": [
    {
      "value": "under-armour",
      "display_name": "Under Armour"
    },
    {
      "value": "adidas",
      "display_name": "Adidas"
    },
    {
      "value": "puma",
      "display_name": "Puma"
    }
  ]
}
```

#### Price facet configured to be returned as a slider, allowing filtering of products by a price between two values

```json
{
  "name": "price",
	"path_in_metadata": "facets.price",
  "display_name": "Price",
  "type": "range",
  "range_format": "boundaries"
}
```

#### Rating facet with overlapping buckets, for instance if you want to create a rating filter with options

```json
{
  "name": "Rating",
	"path_in_metadata": "facets.rating",
  "type": "range",
  "range_type": "static",
  "range_format": "options",
  "range_inclusive": "above",
  "range_limits": [1, 2, 3, 4]
}
```