Returns the distinct values available in the index for a given aggregation definition, grouped by language. Useful for previewing and configuring value-sorting in filters.
Requires the aggregation:values:read or search.read permission.
Request
POST /aggregation/values
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Request Body
Provide an aggregation definition object. The key fields used to fetch values are:
| Field | Type | Required | Description |
|---|---|---|---|
field | string | Yes | The index field name to aggregate on (e.g. "manufacturer"). |
type | string | Yes | The aggregation type (e.g. "list", "range"). |
active | boolean | No | Whether to treat this as an active aggregation. Defaults to false. |
sorting | string | No | Value sorting strategy (e.g. "count", "alphabetical"). Defaults to "count". |
Example Request
{
"field": "manufacturer",
"type": "list",
"sorting": "count"
}Response
Returns an object keyed by language code, each containing an array of value/position pairs.
Response Body
{
"de": [
{ "value": "Nike", "position": 1 },
{ "value": "Adidas", "position": 2 }
],
"en": [
{ "value": "Nike", "position": 1 },
{ "value": "Adidas", "position": 2 }
]
}
