Preview quote calculations
POST
https://app.speybooks.com/api/v1/quotes/previewCalculates 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>requiredShow child parameters
quantitystringrequiredQuantity as exact decimal string (e.g. "2.5").
unitPricestringrequiredUnit price as exact decimal pounds string (e.g. "100.00").
vatRateintegerrequiredVAT rate as integer percent (e.g. 20).
Response
200Preview result with per-line and aggregate pence totals.
Show response fields
linesarray<object>Show child attributes
netintegertotalintegervatintegersubtotalintegertotalintegervatTotalinteger