Invoice
A bill you send to a client for work on one project, with its line items.
- clientType: string | null
_email requiredEmail address the invoice is addressed to, captured from the client contact when the invoice was created.
- clientType: string | null
_name requiredName the invoice is addressed to.
- companyType: integer | null
_id requiredId of the company being invoiced, or
nullwhen the invoice is addressed to a client that is not a company record. - createdType: stringFormat: date-time
_at requiredWhen the invoice was created.
- currencyType: stringrequired
Three-letter ISO 4217 currency code every amount on the invoice is expressed in.
- discountType: string | null
_amount requiredDiscount taken off the subtotal, as a decimal string, or
nullwhen there is none. - dueType: string | nullFormat: date
_date requiredDate payment is due, or
nullwhen the invoice is payable on receipt. - dueType: string | nullenum
_date _option requiredHow
due_datewas arrived at:upon_receipt,after_x_days(a fixed number of days after the issue date) orcustom(an explicit date).valuesupon_receiptafter_x_dayscustomnull - idType: integerrequired
Unique identifier for the invoice.
- invoiceType:
_items requiredProperties: 7The invoice's line items, in the order they appear on it.
- invoiceType: string | null
_number requiredHuman-readable invoice reference, unique within your account. The list endpoint accepts it as
filter[invoice_number]. - issuedType: string | nullFormat: date
_date requiredIssue date printed on the invoice. Set when the invoice is created, so a draft has one too;
sent_datesays whether the client has received it. - kindType: stringenumrequired
How the invoice repeats:
-
single— a one-off invoice. Scheduling one to send later does not make it recurring;statusreports that asscheduled. recurring— reissued onrepeat_intervaluntil you stop it orrepeat_finish_datearrives.subscription— recurring, and charged automatically to the card the client has on file.bundled— one of several invoices grouped to be sent and paid together.
bundledis read-only: bundles are assembled in the Bonsai app from invoices that already exist, so it cannot be passed when creating one.valuessinglerecurringsubscriptionbundled -
- projectType: integer | null
_id requiredId of the project the invoice bills.
- publicType: string | null
_url _token requiredToken in the invoice's client-facing URL. Anyone holding that link can view and pay the invoice, so treat this value as a secret.
- recurrenceType: boolean
_active requiredWhether the series this invoice belongs to still reissues. Unlike
kindandrepeat_interval, which describe the invoice, this describes the series, so every invoice in it reports the same answer and an already-issued one turnsfalseonce the series is stopped. It istrueexactly whenDELETE /invoices/{invoice_id}/recurrencehas something to stop. - repeatType: string | nullFormat: date
_finish _date requiredDate the series stops reissuing, or
nullfor a one-off or a series that runs until you stop it. Only the newest invoice of a series carries it: each repeat hands the date on to the invoice it creates, so earlier invoices readnulleven when the series has an end. When the date falls a whole number ofrepeat_intervals after the issue date, the final invoice is issued on it; otherwise the series ends with the last repeat before it. Stopping a series keeps the date so the series can be started again. - repeatType: string | nullenum
_interval requiredHow often a
recurringorsubscriptioninvoice is reissued, ornullfor a one-off. It records the cadence an invoice was issued under rather than whether its series still runs: stopping a series keeps the interval on every invoice so the series can be started again, including one stopped before it repeated, which then readskindsingle. Only the last invoice a series issues onrepeat_finish_datecomes backnull. Userecurrence_activeto tell a running series from a stopped or finished one.valuesweeklyevery two weeksevery four weeksmonthlyevery two monthsquarterlyevery six monthsannuallynull - sentType: string | nullFormat: date-time
_date requiredWhen the invoice was sent to the client, by email or as a shared link, or
nullwhile it has not been sent. Adraftedorscheduledinvoice has none. - seriesType: integer | null
_id requiredId of the first invoice of the series this one belongs to, the same for every invoice in it, so you can group them.
nullfor an invoice that is not part of a series. - statusType: stringenumrequired
Where the invoice is in its lifecycle:
new,drafted— not sent to the client yet.scheduled— queued to send automatically on a future date.outstanding— sent and awaiting payment.overdue— sent, unpaid and pastdue_date.pending— a payment has started but has not settled.paid— paid in full.deleted— the invoice has been deleted.
An invoice that is
paidorpendingcan no longer be edited, and neither can its line items.valuesnewdraftedscheduledoutstandingoverduependingpaiddeleted - subtotalType: string | nullrequired
Sum of every line item, before discount and tax, as a decimal string.
- taxType: string | null
_amount requiredTax added to the invoice, as a decimal string.
- titleType: string | nullrequired
Invoice title shown to the client.
- totalType: string
_amount requiredWhat the client owes, as a decimal string, after any discount and tax.
- urlType: stringrequired
Absolute link to the invoice in the Bonsai app. This is the contractor-facing view, not the client payment page — for that, use
public_url_token.