Preview quote calculations

POSThttps://app.speybooks.com/api/v1/quotes/preview

Calculates line totals, VAT, and quote total without creating a quote. Use this for real-time UI previews while the user is editing line items.

Request lines carry quantity and unitPrice as exact decimal strings; the response returns per-line net, vat, and total plus aggregate subtotal, vatTotal, and total, all as integers in minor units (pence). The calculation path is identical to create, so what you preview is what you get on submit. Deterministic and stateless; nothing is persisted.

This endpoint is stateless and idempotent. No authentication scope is required beyond a valid API key.

Body parameters

linesarray<object>required
min items: 1 · max items: 100
Show child parameters
quantitystringrequired
Quantity as exact decimal string (e.g. "2.5").
unitPricestringrequired
Unit price as exact decimal pounds string (e.g. "100.00").
vatRateintegerrequired
VAT rate as integer percent (e.g. 20).
min: 0 · max: 100

Response

200Preview result with per-line and aggregate pence totals.
Show response fields
linesarray<object>
Show child attributes
netinteger
totalinteger
vatinteger
subtotalinteger
totalinteger
vatTotalinteger