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.

SalesInvoiceUpdateRequest

Request

Sent in requests. Its values are closed: anything not listed is refused.

Attributes

1
dataSalesInvoicePatchrequired

Fields to change. A draft takes any of them. An issued invoice takes the changes its period allows (an issued edit rebuilds its entry); its customer, co-recipients and prepayment deductions are fixed. Sending lines replaces the lines: a line with an id keeps that line, one without is new, one left out is removed.

15 attributes of data
datestring (date)

Document date.

posting_datestring (date) · nullable

The date the document is booked at. Null follows date while the two are equal and keeps the stored date once they were set apart.

supply_datestring (date) · nullable

Date of supply for VAT.

due_datestring (date)

Payment due date, on or after date.

currencystringat most 3 characterspattern ^[A-Z]{3}$

Document currency (ISO 4217); changing it on an issued invoice is refused when either currency is foreign (EXCHANGE_RATE_FROZEN).

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]))$

Sent: books the document at this rate (a manual rate). null: back to the European Central Bank's rate of the document's dates. Omitted: the rate stays as it is, a manual one included. An issued invoice's rate is frozen: another value is refused (EXCHANGE_RATE_FROZEN).

contact_idstring (uuid) · nullable

The customer; the printed details follow it unless party is sent.

partyInvoicePartyInput · nullable

The customer as printed.

5 attributes of party
namestringrequired1–255 characters

Name.

registry_codestring · nullableat most 100 characters

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

vat_numberstring · nullableat most 100 characters

VAT number, with country prefix.

addressstring · nullableat most 500 characters

Address as one printed line.

emailstring · nullableat most 255 characters

E-mail the document is sent to.

linesarray of SalesInvoiceLineItemInputat most 500 items

The whole line list, in order.

13 attributes of each item
namestringrequired1–255 characters

Line text as printed.

quantitystringrequireddecimal string

Quantity, up to 10 fraction digits. A negative quantity is a return and must name the invoice it returns against in credited_invoice_id (INVOICE_LINE_REFERENCE_REQUIRED); a price reduction keeps a positive quantity and a negative unit_price.

unitstringrequiredat most 50 characters

Unit of measure.

unit_pricestringrequireddecimal string

Net price per unit, up to 10 fraction digits. May be negative (a discount at the time of sale). A document totalling below zero is refused with INVOICE_TOTAL_NEGATIVE: it is a credit note.

tax_code_idstring (uuid)required

Tax code of the line; its rate is read on the document's date.

account_idstring (uuid)required

Revenue account of the line.

idstring (uuid)

An existing line of this document to keep; omit for a new line (INVOICE_LINE_NOT_FOUND otherwise).

item_idstring (uuid) · nullable

The item the line is made from, if any.

descriptionstring · nullableat most 1000 characters

Longer text under the name.

discount_percentstringdecimal string

Discount on the line in percent, 0-100; omitted means 0.

dimensionsarray of InvoiceLineDimension

Dimension values on the line, at most one per dimension.

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 sales invoice this row corrects -- a return, or a price cut of an earlier sale (KMS § 29 lg 7). Required on a row with a negative quantity (INVOICE_LINE_REFERENCE_REQUIRED); one that names no issued invoice of this organization is CREDITED_INVOICE_INVALID.

tax_amountstring · nullabledecimal string

The line's VAT as the document states it. Kept only on a historical create -- one that links its imported transaction_id, or is dated before the organization's opening date; the document's VAT is then these figures, not the ones its codes derive.

Details

On any other write it may only repeat the VAT the line derives (a read sent back), and is not stored; another figure is 400 VALIDATION_ERROR by pointer. A line with no VAT rate states none; the VAT sits on the line value's side of zero.

notesstring · nullableat most 5000 characters

The note to the customer printed above the rows.

footer_notesstring · nullableat most 5000 characters

The note to the customer printed below the totals.

rounding_amountstring · nullabledecimal string

Whole-cent rounding added to the total; null is 0.

external_refstring · nullable1–200 characters

Your own id for the document, unique per organization.

co_recipientsarray of InvoiceCoRecipientInputat most 50 items

The invoice's other recipients besides the payer (co-owners), in print order: each is printed under the customer, e-mailed the invoice and reached by reminders, and the receivable stays on contact_id.

Details

Each a contact of the organization, listed once, not the customer. Their printed details are taken from the contact. Sent as a whole list; editable on a draft only (409 INVOICE_NOT_DRAFT for a different set on an issued invoice).

1 attribute of each item
contact_idstring (uuid)required

The co-recipient.

object_idsarray of string (uuid)at most 50 items

The objects the invoice bills (an apartment, parking spaces), e.g. a migration carrying a billing system's invoices. The invoice is then found by the objects' object_id filter and their payments. Sent as a whole list ([] removes all); editable on a draft only.

Used by