Preview stream documents

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

ParameterTypeRequiredDescription
languagestringYesThe language code to preview documents for (e.g. de, en).

Headers

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
configobjectYesStream configuration object with a query field containing and / or condition arrays.
variant_countintegerNoMaximum 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
    }
  ]
}