PurchaseInvoice
ResponseAn invoice or credit note received from a supplier.
Returned in responses. Its enums are open: tolerate values not listed here, which later versions may add.
Attributes
34The 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.
Document kind. prepayment_invoice is a supplier's prepayment invoice, made when a prepayment is recorded in the app. 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
Lifecycle. draft until :post books it as issued; partial and paid follow its payments; credited when credit notes cover all of it; cancelled once voided. 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, partial, paid, credited, cancelled
The date the invoice is booked at: its ledger entry, period and VAT return. Equal to date unless set apart.
The supplier as the invoice names it.
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
Gross amount payable: net_total + tax_total + rounding_amount. Never negative; a credit note's figures are positive too.
Outstanding after payments and issued linked credit notes. A credit note uses the magnitude of its own total.
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.
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 number printed on the supplier's invoice; required to post.
The supplier's reference to pay with (an Estonian 7-3-1 viitenumber or an RF reference, stored without spaces).
The invoice's lines, in order. Always on GET /{id}; in lists only with expand=lines.
17 attributes of each item
tax_amount in the book currency; the figure the VAT return reads.
Net price per unit, exactly as stored (up to 10 places, e.g. a milk price component of -0.011276).
Dimension values on the line.
The ledger transaction the invoice posted; null while a draft.
Your id for this invoice, unique among the organization's purchase invoices.
Used by
- GETList purchase invoiceslistPurchaseInvoices
- POSTCreate a purchase invoicecreatePurchaseInvoice
- GETGet a purchase invoicegetPurchaseInvoice
- PATCHUpdate a purchase invoiceupdatePurchaseInvoice
- POSTArchive a purchase invoicearchivePurchaseInvoice
- POSTPost a purchase invoicepostPurchaseInvoice
- POSTUnarchive a purchase invoiceunarchivePurchaseInvoice
- POSTVoid a purchase invoicevoidPurchaseInvoice