Authentication
All requests must include an API key via thex-api-key header.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/facets/config | List all facet configurations |
| POST | /api/v1/facets/config | Create a facet configuration |
| PUT | /api/v1/facets/config/ | Update a facet configuration |
| DELETE | /api/v1/facets/config/ | Delete a facet configuration |
FacetConfig Object
| Field | Type | Description |
|---|---|---|
| id | uuid | Configuration ID |
| workspace_id | uuid | Owning workspace |
| attribute_key | string | Product attribute key (e.g., brand, color) |
| display_name | string | Human-readable label shown in filter UI |
| facet_type | enum | One of: value, range, hierarchical |
| sort_order | integer | Display order (lower = first) |
| enabled | boolean | Whether this facet is active in search responses |
| created_at | string | ISO 8601 creation timestamp |
facet_type Values
| Value | Description |
|---|---|
| value | Exact match counts (e.g., brand: Nike=42, Adidas=18) |
| range | Numeric buckets (e.g., price: 0-50=5, 50-100=12) |
| hierarchical | Category tree counts using category_path array |
GET /api/v1/facets/config
List all facet configurations for the authenticated workspace.POST /api/v1/facets/config
Create a new facet configuration.201 Created with the new FacetConfig object.
PUT /api/v1/facets/config/
Update an existing facet configuration.DELETE /api/v1/facets/config/
Delete a facet configuration. Returns204 No Content.
Using Facets in Search
Once configured, request facet counts inPOST /api/v1/search:
brand:Nike still shows all brands in the facets.brand response, allowing users to switch filters without losing context.