Create an invoice
https://app.speybooks.com/api/v1/invoices/Creates a new invoice with one or more line items. The invoice number is assigned automatically from the organisation's sequence (e.g. INV-0043).
Line quantity and unitPrice are exact decimal strings.
unitPrice is in POUNDS: £850.00 is sent as "850" or
"850.00", and fractional prices ("100.50") are accepted.
Do not send pence; "85000" creates an £85,000 line.
quantity may be fractional ("2.5"). JSON numbers are
rejected. Totals are computed server-side; the
response amounts and all subsequent reads are in pence.
Invoices can be created in draft (default) or sent
status. Draft invoices can be edited and deleted; issuing is
irreversible. The per-line accountId maps the revenue or
expense to a chart of accounts entry, optional while drafting,
REQUIRED to issue: creating directly in sent status with any
unmapped line is rejected, because issue posts the journal
and the journal credits each line's account. Creating as
sent posts the issue journal atomically with the invoice.
Body parameters
contactIdstringrequireddueDatestringrequiredinvoiceTypestringrequiredsalespurchaseissueDatestringrequiredlinesarray<object>requiredShow child parameters
descriptionstringrequiredquantitystringrequiredunitPricestringrequiredvatRateintegerrequiredaccountIdstringoptionalmetadataobjectoptionalnotesstringoptionalreferencestringoptionalstatusstringoptionalDefault: draftdraftsenttermsstringoptionalResponse
Show response fields
idstringinvoiceNumberstring