Returns a preview of documents that would be returned by a stream with a given query configuration, without requiring a saved stream. Used during stream creation and editing to test query conditions before saving.
Requires the stream:preview:read or streams.read permission.
Request
POST /stream/documents/preview/{language}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
language | string | Yes | The language code to preview documents for (e.g. de, en). |
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
config | object | Yes | Stream configuration object with a query field containing and / or condition arrays. |
variant_count | integer | No | Maximum number of variants to include per product. |
Example Request
{
"config": {
"query": {
"and": [
{
"field": "active",
"type": "boolean",
"operator": "isTrue"
},
{
"field": "price",
"type": "range",
"operator": "lt",
"value": 100
}
],
"or": []
}
}
}Response
Returns the same structure as the Get stream documents endpoint.
Example Response
{
"total": 5,
"items": [
{
"id": "prod-001",
"title": "Budget Sneakers",
"price": 49.99
}
]
}
