Choose what you allow. Your choice applies on every tracken.ee address and you can change it any time with “Cookie settings” in the footer.

Remember your cookie choice, language and theme. Without them the site doesn't work the way you chose.

A cookie with your choice (6 months); language and theme in browser storage.


The services below learn that you visited this site, whether you came from their ad and whether you then created a Tracken account. That shows us which ads work, and these companies may show you Tracken ads later. They may link the data to your account with them. For Meta, Tracken ID's server reports the new account and also sends a hash of your e-mail address, your IP address and browser details.

ServiceCookiesKept for up to
Meta (Facebook, Instagram)_fbp, _fbc90 days

Tracken's own visit counter uses no cookies, stores no IP addresses and shares nothing with anyone. Privacy policy

Skip to content
Beta
BetaThe Tracken Accounts API is in beta: it may still change before v1, and every change is announced in the changelog.

SalesInvoice

Response

An 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

43
exchange_ratestring · nullablerequireddecimal stringpattern ^([1-9][0-9]{0,14}(\.[0-9]{1,10})?|0\.([1-9][0-9]{0,9}|0[1-9][0-9]{0,8}|00[1-9][0-9]{0,7}|000[1-9][0-9]{0,6}|0000[1-9][0-9]{0,5}|00000[1-9][0-9]{0,4}|000000[1-9][0-9]{0,3}|0000000[1-9][0-9]{0,2}|00000000[1-9][0-9]?|000000000[1-9]))$

The rate the document is booked at: document-currency units per 1 book-currency unit. Frozen when the document is issued.

book_currencystringrequired

The organization's book currency (ISO 4217), always EUR; the book_ figures are in it.

book_net_totalstring · nullablerequireddecimal string

net_total in the book currency: the sum of the lines' book_net_amount.

book_tax_totalstring · nullablerequireddecimal string

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.

book_totalstring · nullablerequireddecimal string

The document's total in the book currency, book_net_total plus book_tax_total: the figure the receivable or payable is booked at.

idstring (uuid)required

Unique id of the record. Stable for its lifetime.

numberstring · nullablerequired

Document number, assigned on issue; null while a draft.

datestring (date)required

Document date.

posting_datestring (date)required

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.

due_datestring (date)required

Payment due date.

currencystringrequired

Document currency.

exchange_rate_sourceExchangeRateSource · nullablerequired

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

contact_idstring (uuid) · nullablerequired

The customer; null for a one-off party with no contact.

partyInvoicePartyrequired

The customer as printed on the document, snapshotted when it is saved.

5 attributes of party
namestringrequired

Name.

registry_codestring · nullablerequired

Register code (a company), or a person's personal code.

vat_numberstring · nullablerequired

VAT number, with country prefix.

addressstring · nullablerequired

Address as one printed line.

emailstring · nullablerequired

E-mail the document is sent to.

net_totalstringrequireddecimal string

Total net of VAT.

tax_totalstringrequireddecimal string

Total VAT.

totalstringrequireddecimal string

Total to pay, VAT and rounding_amount included.

rounding_amountstringrequireddecimal string

Rounding added to the total, 0 when none.

notesstring · nullablerequired

The note to the customer printed above the rows.

email_delivery_statusstring · nullablerequired

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

is_archivedbooleanrequired

Archived documents are hidden from the default list.

originstringrequiredread-only

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.

external_refstring · nullablerequired

Your own id for the document, unique per organization.

created_atstring (date-time)required

When the record was created.

updated_atstring (date-time)required

When the record or one of its lines last changed; the version an If-Match names.

kindstringrequired

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

statusstringrequired

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

amount_paidstringrequireddecimal string

Payments and credits applied so far.

amount_duestringrequireddecimal string

Outstanding after payments and issued linked credit notes. A credit note uses the magnitude of its own total.

transaction_idstring (uuid) · nullablerequired

The ledger entry the document posted, once issued.

supply_datestring (date) · nullablerequired

Date of supply for VAT, when it differs from date.

payment_referencestring · nullablerequired

Structured payment reference (viitenumber), once issued.

issued_atstring (date-time) · nullablerequired

When the document was issued and numbered; null while a draft.

credits_invoice_idstring (uuid) · nullablerequired

For a credit note, the issued invoice it credits.

from_quote_idstring (uuid) · nullablerequired

The quote this invoice was made from.

object_idsarray of string (uuid)required

The objects the invoice bills (an apartment, parking spaces); empty for an invoice that bills no object.

billing_run_idstring (uuid) · nullablerequired

The billing run that made the invoice; null for one made by hand.

billing_periodInvoiceBillingPeriod · nullablerequired

The period a billing run invoiced; null for any other invoice.

2 attributes of billing_period
date_fromstring (date)required

First day billed.

date_tostring (date)required

Last day billed, inclusive.

co_recipientsarray of InvoiceCoRecipientrequired

The invoice's other recipients besides the payer (co-owners), in print order, as snapshotted on the invoice. The receivable stays on contact_id.

4 attributes of each item
contact_idstring (uuid)required

The co-recipient.

namestringrequired

Their name as printed.

addressstring · nullable

Their address as printed.

emailstring · nullable

The e-mail the invoice is sent to them at.

paymentsarray of Paymentrequired

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
idstring (uuid)required

Unique id of the record. Stable for its lifetime.

datestring (date)required

Payment date; it sets the accounting period of the posting.

directionPaymentDirectionrequired

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

amountstringrequireddecimal string

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.

currencystringrequired

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.

book_amountstring · nullablerequireddecimal string

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.

methodPaymentMethodCoderequired

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.

bank_account_idstring (uuid) · nullablerequired

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.

contact_idstring (uuid) · nullablerequired

Who paid or was paid, the contact of the document settled.

allocationsarray of PaymentAllocationrequiredat most 1 items

The document this payment settles, with the amount applied.

6 attributes of each item
document_typestringrequired

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

document_idstring (uuid)required

The document settled.

amountstringrequireddecimal string

Amount applied to the document, positive, in the document's currency (not necessarily the currency of the money that moved, the payment's currency).

exchange_ratestring · nullablerequireddecimal stringpattern ^([1-9][0-9]{0,14}(\.[0-9]{1,10})?|0\.([1-9][0-9]{0,9}|0[1-9][0-9]{0,8}|00[1-9][0-9]{0,7}|000[1-9][0-9]{0,6}|0000[1-9][0-9]{0,5}|00000[1-9][0-9]{0,4}|000000[1-9][0-9]{0,3}|0000000[1-9][0-9]{0,2}|00000000[1-9][0-9]?|000000000[1-9]))$

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.

book_amountstring · nullablerequireddecimal string

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.

exchange_differencestring · nullablerequireddecimal string

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.

referencestring · nullablerequired

Bank reference or receipt number.

notesstring · nullablerequired

Free text.

transaction_idstring (uuid) · nullablerequired

The ledger transaction that books the payment: the entry it posted, or the imported transaction it was linked to.

bank_line_idstring (uuid) · nullablerequired

The bank statement line this payment reconciles, when it came from one.

originPaymentOriginrequired

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

external_refstring · nullablerequired

Your own id for this record (from the system you migrate from or sync with), unique per organization and resource.

created_atstring (date-time)required

When the record was created.

updated_atstring (date-time)required

When the record last changed. Also the basis of the ETag.

linesarray of SalesInvoiceLineItem

The lines, in order. In lists only with expand=lines.

19 attributes of each item
book_net_amountstring · nullablerequireddecimal string

net_amount in the book currency.

book_tax_amountstring · nullablerequireddecimal string

tax_amount in the book currency; the figure the VAT return reads.

idstring (uuid)required

Line id, stable for the line's lifetime, including edits of the document.

positionintegerrequiredat least 1

1-based place of the line in the document.

namestringrequired

Line text as printed.

quantitystringrequireddecimal string

Quantity, up to 10 fraction digits; a negative quantity is a return.

unitstringrequired

Unit of measure.

unit_pricestringrequireddecimal string

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.

discount_percentstringrequireddecimal string

Discount on the line in percent, 0-100.

tax_code_idstring (uuid) · nullablerequired

The tax code of the line, frozen when the document is issued.

account_idstring (uuid)required

Revenue account of the line.

net_amountstringrequireddecimal string

The line net of VAT, after its discount.

tax_amountstringrequireddecimal string

The VAT of the line.

gross_amountstringrequireddecimal string

net_amount plus the VAT billed on the line; a reverse-charge line bills none.

item_idstring (uuid) · nullable

The item the line was made from, if any.

descriptionstring · nullable

Longer text under the name.

tax_ratestring · nullabledecimal string

VAT rate in percent frozen on the line (24.00); null when the code has no rate.

dimensionsarray of InvoiceLineDimension

Dimension values on this line.

2 attributes of each item
dimension_idstring (uuid)required

The dimension.

value_idstring (uuid)required

Its value on this line.

credited_invoice_idstring (uuid) · nullable

The issued invoice this row corrects (a return, or a price cut of an earlier sale); null on an ordinary row.

omittedarray of string

What this answer leaves out and why, when anything: payments: needs payments:read for a token without that scope.

Used by