SalesInvoice
ResponseAn invoice to a customer, a credit note or a prepayment invoice.
Returned in responses. Its enums are open: tolerate values not listed here, which later versions may add.
Attributes
43The rate the document is booked at: document-currency units per 1 book-currency unit. Frozen when the document is issued.
The organization's book currency (ISO 4217), always EUR; the book_ figures are in it.
net_total in the book currency: the sum of the lines' book_net_amount.
The VAT in the book currency: the VAT the document states in it when it states one, else the sum of the lines' book_tax_amount.
The document's total in the book currency, book_net_total plus book_tax_total: the figure the receivable or payable is booked at.
The date the document is booked at -- its ledger entry, the period checked and the VAT return it falls into. Equal to date unless the two were set apart.
Where exchange_rate came from. Null for a document in the book currency (its rate 1 is not looked up) and for a foreign-currency document with no rate yet.
Known values (open: expect new ones) ecb, manual, derived, import
The customer as printed on the document, snapshotted when it is saved.
5 attributes of party
The worst outcome of the document's e-mails; null when never sent. Precedence, worst first: complained, bounced, failed, delivered, sent, queued. New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) queued, sent, delivered, bounced, complained, failed, held, previewed
How the document came in: live (entered here), opening (an open item of the opening state) or import (brought over from another system, its posting an imported transaction).
Known values (open: expect new ones) live, opening, import
Details
Exporters skip opening documents: they travel in the opening state. New values may be added: treat a value you do not know as valid, not as an error.
When the record or one of its lines last changed; the version an If-Match names.
Document kind. late_fee is a late-payment interest invoice (viivisearve) made for an overdue invoice. A quote is a Quote, listed under /quotes. New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) invoice, credit_note, prepayment_invoice, late_fee
Lifecycle. draft until issued (no number, nothing posted); then issued (or sent once e-mailed), partial while partly paid, paid; credited is an invoice a credit note covers and cancelled a voided one. New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) draft, issued, sent, partial, paid, credited, cancelled
Outstanding after payments and issued linked credit notes. A credit note uses the magnitude of its own total.
When the document was issued and numbered; null while a draft.
The objects the invoice bills (an apartment, parking spaces); empty for an invoice that bills no object.
The billing run that made the invoice; null for one made by hand.
The period a billing run invoiced; null for any other invoice.
The invoice's other recipients besides the payer (co-owners), in print order, as snapshotted on the invoice. The receivable stays on contact_id.
The payments allocated to the invoice, newest first, for a token with payments:read: always on GET /{id}, in lists only with expand=payments (403 INSUFFICIENT_SCOPE without the scope). Without it they are left out and named in omitted. A sync client reads them incrementally with listPayments?updated_since.
18 attributes of each item
Money in (a customer pays a sales invoice, a supplier refunds a purchase) or out (a purchase invoice is paid, a customer is refunded). Named, never implied by a sign.
Known values (open: expect new ones) incoming, outgoing
The money that moved, in currency: always positive, direction says which way it went. For a payment in the document's currency it equals the allocation's amount.
Currency of amount, the money that moved (ISO 4217): that of the bank or cash account. It is the document's currency unless a payment in another currency settled the document.
amount in the organization's book currency, positive: what the ledger moved. Equals amount when currency is the book currency; null for a payment in another currency that has no book value yet.
How it was paid. bank_transfer and cash move money through a bank or cash account. offset is a leg of a settlement that nets documents against each other, no money moving; bank_difference the small difference a bank payment left, written off to an account.
Known values (open: expect new ones) bank_transfer, cash, offset, bank_difference
Details
Only bank_transfer and cash can be recorded with createPayment.
The bank account the money moved on: the account of the bank line it reconciles, or of the ledger account a bank transfer posted to. Null for cash, an offset or a written-off difference.
Who paid or was paid, the contact of the document settled.
The document this payment settles, with the amount applied.
6 attributes of each item
Kind of document settled. New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) sales_invoice, purchase_invoice
Amount applied to the document, positive, in the document's currency (not necessarily the currency of the money that moved, the payment's currency).
The document's own exchange rate, the one its book value was booked at: document-currency units per 1 book-currency unit. 1 for a document in the book currency; null when the document has no rate.
amount in the book currency at the document's rate: the part of the receivable or payable this allocation closes. Equals amount for a document in the book currency; null when the document has no rate.
The exchange gain or loss this allocation realised, in the book currency: the book value of the money that moved minus book_amount. Positive is a gain on a sales invoice and a loss on a purchase invoice, negative the reverse; 0.00 when the money moved at the document's rate or the document is in the book currency; null when the document has no rate.
The ledger transaction that books the payment: the entry it posted, or the imported transaction it was linked to.
The bank statement line this payment reconciles, when it came from one.
import: the payment came in with an import, or was created linked to an imported transaction (transaction_id on create); live: it was recorded and posted here. New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) live, import
Your own id for this record (from the system you migrate from or sync with), unique per organization and resource.
The lines, in order. In lists only with expand=lines.
19 attributes of each item
tax_amount in the book currency; the figure the VAT return reads.
Quantity, up to 10 fraction digits; a negative quantity is a return.
Net price per unit, up to 10 fraction digits (a price component is priced to the tenth of a cent); stored and answered as sent.
The tax code of the line, frozen when the document is issued.
net_amount plus the VAT billed on the line; a reverse-charge line bills none.
VAT rate in percent frozen on the line (24.00); null when the code has no rate.
Dimension values on this line.