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.

PurchaseInvoice

Response

An 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

34
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.

kindstringrequired

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

statusstringrequired

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

datestring (date)required

Document date, as printed.

posting_datestring (date)required

The date the invoice is booked at: its ledger entry, period and VAT return. Equal to date unless set apart.

due_datestring (date)required

Payment due date.

currencystringrequired

Document currency (ISO 4217).

The supplier as the invoice names it.

5 attributes of party
namestringrequired

Name.

registry_codestring · nullable

Register code.

vat_numberstring · nullable

VAT number.

addressstring · nullable

Address as one line of text.

emailstring · nullable

Email.

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

rounding_amountstringrequireddecimal string

The invoice's own VAT-free rounding, included in total.

net_totalstringrequireddecimal string

Sum of the lines' net_amount.

tax_totalstringrequireddecimal string

Sum of the lines' tax_amount, or the VAT the document states.

totalstringrequireddecimal string

Gross amount payable: net_total + tax_total + rounding_amount. Never negative; a credit note's figures are positive too.

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.

is_archivedbooleanrequired

Hidden from the default lists (:archive); changes no figure.

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.

created_atstring (date-time)required

When the record was created (UTC).

updated_atstring (date-time)required

When the record or one of its lines last changed (UTC).

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.

supplier_invoice_numberstring · nullable

The number printed on the supplier's invoice; required to post.

contact_idstring (uuid) · nullable

The supplier.

notesstring · nullable

Free-text notes.

payment_referencestring · nullable

The supplier's reference to pay with (an Estonian 7-3-1 viitenumber or an RF reference, stored without spaces).

linesarray of PurchaseInvoiceLine

The invoice's lines, in order. Always on GET /{id}; in lists only with expand=lines.

17 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; send it back in lines to keep the line.

positionintegerrequiredat least 1

1-based place of the line in the invoice.

namestringrequired

Line text, as printed.

quantitystringrequireddecimal string

Quantity; negative on a supplier's return row.

unitstringrequired

Unit of measure.

unit_pricestringrequireddecimal string

Net price per unit, exactly as stored (up to 10 places, e.g. a milk price component of -0.011276).

tax_code_idstring (uuid)required

The line's VAT code.

account_idstring (uuid)required

The expense or asset account.

dimensionsarray of DimensionAssignmentrequired

Dimension values on the line.

2 attributes of each item
dimension_idstring (uuid)required

The dimension.

value_idstring (uuid)required

The value within that dimension.

net_amountstringrequireddecimal string

Net amount of the line, including its own rounding.

tax_amountstringrequireddecimal string

VAT of the line.

gross_amountstringrequireddecimal string

net_amount + tax_amount.

item_idstring (uuid) · nullable

The item the line is for, if any.

descriptionstring · nullable

Longer text under the name.

tax_ratestring · nullabledecimal string

The VAT rate in percent, frozen on the line.

transaction_idstring (uuid) · nullable

The ledger transaction the invoice posted; null while a draft.

credits_invoice_idstring (uuid) · nullable

For a credit note, the invoice it credits.

external_refstring · nullable

Your id for this invoice, unique among the organization's purchase invoices.

omittedarray of string

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

Used by