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.

OpeningInvoice

Request and response

An invoice still open at the opening date. It carries what is still owed, not its history: its money is already in the receivable or payable balance, so it is never posted again. Created as an issued sales invoice or a posted purchase invoice with origin opening.

Used in requests and responses. In a request only the listed values are accepted; in a response, tolerate values not listed here.

Attributes

11
document_typestringrequired

A receivable (sales invoice) or a payable (purchase invoice).

Values (closed in requests, open in responses) sales_invoice, purchase_invoice

contact_idstring (uuid)required

Customer or supplier.

numberstringrequired1–255 characters

The invoice's original number.

datestring (date)required

Invoice date, on or before the opening date.

due_datestring (date)required

Due date.

currencystringrequiredpattern ^[A-Z]{3}$

Currency (ISO 4217): the book currency or another currency the company has activated (CURRENCY_NOT_ACTIVE). What is still open of a foreign invoice ties to the receivable or payable balance in the book currency, at its rate: the ECB rate of the balances date (EXCHANGE_RATE_MISSING when the bank has none), or the rate sent as exchange_rate.

totalstringrequireddecimal string

The invoice's original gross total.

amount_paidstringrequireddecimal string

Paid before the opening date.

external_refstring · nullable1–200 characters

Your own id for the invoice, unique among the organization's sales (or purchase) invoices; the created invoice carries it.

exchange_ratestring · nullabledecimal 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 invoice was booked at in the source system, in ExchangeRate's direction; what is still open of it ties to the receivable or payable balance at this rate.

Details

Omitted or null: the ECB rate of the balances date (the opening state's date, the end of that day: the previous year-end closing rate, RTJ 1 p 94), the newest rate at or before it, at most 7 days back; never the invoice's own date nor the day before the balances date. On an invoice in the book currency only 1 is accepted (EXCHANGE_RATE_OVERRIDE_INVALID); on a foreign invoice 1 is refused (OPENING_STATE_FOREIGN_RATE_OF_ONE: it would book the amounts unconverted). Read back as the invoice's stored rate, 1 in the book currency, null on a foreign invoice that has none yet.

book_outstandingstring · nullabledecimal string

What is still open of it in the book currency, the figure that ties to the receivable or payable balance. Omitted or null: total less amount_paid, each converted at exchange_rate.

Details

Stated on an invoice in another currency: the source books' own figure, stored as it is, so later payments release exactly it (a cut-over of books where each payment released its own part can be a cent away from converting the open amount once). On an invoice in the book currency only total less amount_paid is accepted (EXCHANGE_RATE_OVERRIDE_INVALID); negative is refused (OPENING_STATE_NEGATIVE_AMOUNT). Read back as stored; with as_of, what the ledger holds open on that day (the book total less what each payment and credit note released), so the document ties to the cent. Null on an invoice in another currency that has no rate yet.

Used by