> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview Cart Items

> Suggest cart field mappings and create isolated preview scenarios from supplied items.

You can inspect your item fields and test cart layouts without saving an email or changing recipient data. This endpoint requires a valid API key, accepts existing restricted keys, and reads only the data you supply.

<ParamField body="items" type="object[]">
  Up to 50 item objects. Defaults to an empty array. Fetch an event sample
  separately if you want real event data.
</ParamField>

<ParamField body="itemFields" type="object">
  Optional existing mappings for title, variantTitle, quantity, priceCents,
  price, imageUrl, url and currency. Values are dotted paths within one item, up
  to 200 characters. Blank values use default names. Existing mappings are never
  replaced by suggestions. Unsafe prototype paths are rejected.
</ParamField>

<ParamField body="scenario" type="string">
  Defaults to real, which clones supplied items unchanged. Choose one, many (12
  rows), empty, missing-images or long-names. Nonempty sample scenarios create a
  sample product when no items were supplied. Rendered row count still follows
  your block's maxItems setting.
</ParamField>

<ParamField body="priceUnit" type="string">
  minor (default) interprets numeric unit prices as cents; major interprets
  29.99 as 29.99. Choose units explicitly for ambiguous numeric fields. This
  never changes the separate total, which stays in cents.
</ParamField>

```bash theme={null}
curl https://api.sequenzy.com/api/v1/email-blocks/line-items/assist \
  -H 'Authorization: Bearer API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"items":[{"name":"Candle","amount":29.99}],"scenario":"real"}'
```

A successful response includes `success: true`, `suggestions` (field, path, example), `priceCandidates` (path, example, units: unknown), cloned `previewItems`, `scenario`, `isSample`, and three design `presets` (id, label, description, settings). Suggestions require explicit application. Unknown numeric price units are never inferred. `isSample` is true for every scenario except real, including empty.

Use `sequenzy blocks preview-cart --items-file items.json --scenario many --json`, or MCP `preview_cart_items` with the same input fields. CLI uses `--fields` for the `itemFields` JSON object and `--price-unit` for `priceUnit`. Human output also prints mapping suggestions, unit choices, presets and preview items.

To preview HTML, supply the returned items at your block's source in the existing render endpoint's `variables`, and view its HTML at desktop or mobile width. To save, apply chosen mappings, price units and preset settings through the existing campaign, sequence email, template or transactional block update workflow. Read the current block first and preserve unrelated fields. To clear optional configuration, remove those properties from the replacement block; null is not a valid style, mapping or unit value. This assistance endpoint never saves or sends anything, so repeating a request has no persistent side effects. See [Cart and Order Blocks](/concepts/cart-and-order-blocks).

Malformed item arrays, more than 50 items, unsafe mappings, invalid scenarios, null fields or unsupported units return **400** with `success: false`, an `error` and validation `details`. Missing or invalid authentication returns **401**; normal authentication restrictions may return **403**. There is no event lookup or not-found response because all item data is supplied in the request. Transport failures can be retried with the same input.
