Filter
Represents the Filter entity of your store, specifically designed to handle "range" selections (intervals). These filters allow users to narrow down their search based on numerical values, dates, or prices.
Filter Definition
| Property | Type | Description |
|---|---|---|
| id | string (UUID) | Unique identifier of the filter. |
| name | string | Descriptive name of the filter. |
| operator | string | Applied logical operator (e.g., AND). |
| position | number | Display order in the filter panel. |
| visible | boolean | Defines whether the filter is active and visible on the front-end. |
| type | string | The filter type: price, number, or date. |
| conditionIds | string[] | Array of linked condition IDs. |
| conditions | FilterCondition[] | Array of condition objects defining the range limits. |
FilterCondition
Defines the technical limits and data source for the filter.
| Property | Type | Description |
|---|---|---|
| id | string (UUID) | Identifier of the condition. |
| operator | string | Usually set to range. |
| min | number | string | null | Minimum allowed value. |
| max | number | string | null | Maximum allowed value. |
| type | string | Data source: attribute (if linked to an attribute) or price. |
| attributeId | string | null | Linked attribute ID (if type is attribute). |
| attribute | Object | null | Simplified snapshot of the linked attribute. |
Object Example
{
"id": "a9b1656d-b624-4ddd-8192-b6d2fd4d057f",
"name": "Price range filter",
"operator": "AND",
"position": 0,
"visible": true,
"type": "price",
"conditions": [
{
"id": "d6a5ca50-b33c-439f-8220-9b9e3232ee03",
"operator": "range",
"min": 0,
"max": 1000000,
"type": "price",
"attributeId": null,
"attribute": null
}
]
}
Range Logic
Unlike Tags (which work on discrete values), Range filters require sending a pair of values [min, max] via the search utilities to correctly filter products in the catalog.