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.

BillingRun

Response

One period billed by a plan. Starting a run answers 202: the run is its own job. With dry_run=true it is computed and returned without storing anything, with a fingerprint to start the real run with, so it bills exactly what was previewed.

Returned in responses. Its enums are open: tolerate values not listed here, which later versions may add.

Attributes

25
idstring (uuid)required

Unique id of the run. A dry run's id is fresh and names nothing stored.

plan_idstring (uuid)required

The plan billed, by its id for life; plan_revision names the revision.

periodstring (date)required

The period billed, the first day of its month.

finishstringrequired

Leave draft invoices, issue them, or issue and email them. 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, issue, issue_send

invoice_datestring (date)required

Invoice date. A run made before the dates were stored answers the day it was made, the day its invoices were dated.

plan_revisionintegerrequired

The plan revision billed (1 for the first).

generationintegerrequired

1 for the first run of the plan and period; each re-run adds one.

statusBillingRunStatusrequired

Where a run is. completed_with_errors: some recipients failed validation. superseded: a later run of the same plan and period replaced it (its issued invoices are kept). failed: it created nothing (failed_reason says why).

Known values (open: expect new ones) queued, running, completed, completed_with_errors, failed, superseded

countsBillingRunCountsrequired

The run's recipients and invoices by what happened to them.

7 attributes of counts
recipientsintegerrequired

Recipients considered.

draftedintegerrequired

Invoices made.

issuedintegerrequired

Invoices issued (numbered and posted).

sentintegerrequired

Invoices e-mailed.

skippedintegerrequired

Recipients with nothing to bill.

failedintegerrequired

Recipients that failed validation.

without_emailintegerrequired

Issued but not e-mailed — the recipient has no address (L28).

currencystringrequired

The currency (ISO 4217) of the run's invoices and its totals: the plan's when the run was made (a plan's currency may change for later periods).

created_atstring (date-time)required

When the run was started.

updated_atstring (date-time)required

The run's last change, its progress included.

posting_datestring (date) · nullable

Posting date, when not the invoice date.

due_datestring (date) · nullable

The invoices' due date.

variable_valuesarray of BillingRunVariableValue

Every variable value the run used, the plan's own included.

6 attributes of each item
keystringrequired1–63 characters

The variable's key in the plan.

valuestring · nullabledecimal string

The value, as a decimal string with at most 6 decimal places (a 7th is refused); it is stored and read back as sent, never rounded to fewer. Null with purchase_invoice_id: the variable's invoice formula over the chosen lines (invoice_formula on the plan variable; the lines' sum when it has none), computed by the server and kept to 6 places, half-even.

Details

A value sent with purchase_invoice_id must equal that result exactly.

purchase_invoice_idstring (uuid) · nullable

Or take it from lines of this purchase invoice.

purchase_invoice_line_idsarray of string (uuid)

The purchase invoice lines summed.

vatstring · nullable

Whether the purchase invoice lines are read with their VAT (included, the default) or without it: the line.amount of the invoice formula.

Known values (open: expect new ones) included, excluded

invoice_formulastring · nullableread-only

Read-only, on a run's values: the invoice formula a value taken from a purchase invoice was computed with, as the plan stood then. Null: the chosen lines' sum, or not taken from an invoice. Refused when sent.

phasestring · nullable

Where a running run is. New values may be added: treat a value you do not know as valid, not as an error.

Known values (open: expect new ones) compute, drafts, issue, send

progressinteger · nullable0–100

Percent complete; null for a dry run.

failed_reasonstring · nullable

Why a failed run failed; a failed run created nothing. New values may be added: treat a value you do not know as valid, not as an error.

Known values (open: expect new ones) blocked, plan_not_ready, result_changed, stale, worker_failed, unexpected_error

Sums over the invoices the run made (a credit invoice counts negative), each computed as the invoice computes it.

4 attributes of totals
net_totalstringrequireddecimal string

Net total.

tax_totalstringrequireddecimal string

VAT total.

totalstringrequireddecimal string

Gross total.

roundingstringrequireddecimal string

Allocation remainders not billed (the shares rounded each on its own).

blockersarray of BillingRunBlocker

What stops the run; a dry run lists them all.

12 attributes of each item
codestringrequired

What stops the run. New values may be added: treat a value you do not know as valid, not as an error.

Known values (open: expect new ones) missing_allocation_basis, missing_recipient, missing_reading_blocks_run, missing_asked_variable, missing_timed_variable, unresolved_account, unresolved_tax_code, external_source_unpublished, line_unresolved, invalid_boolean_formula, currency_not_active, currency_changed

object_idstring (uuid) · nullablerequired

The object it concerns, when it is one object's.

object_namestring · nullablerequired

That object's name.

object_type_idstring (uuid) · nullablerequired

That object's type.

property_keysarray of stringrequired

The empty fields to focus (area_m2; payer, owner).

property_namesarray of stringrequired

Their display names as defined on the type (Pindala; Maksja, Omanik).

variable_keystring · nullablerequired

The plan variable it concerns, when it is one.

lines_not_computablearray of stringrequired

Labels of the lines that cannot be computed for this object.

lines_misallocatedarray of stringrequired

Labels of the allocation lines whose split over everyone would be wrong.

messagestringrequired

English fallback; the client localises by code.

currencystring

currency_not_active: the plan's currency, no longer on the company's list. currency_changed: the currency of the period's issued invoices, which a re-run in the plan's currency would bill beside.

line_idstring (uuid)

The exact plan line whose account or tax code needs fixing.

fingerprintstring · nullable

Hash of the computed result; send it as expected_fingerprint.

recipientsarray of BillingRunRecipient

Per object or contact. On a list only with expand=recipients.

20 attributes of each item
idstring (uuid) · nullablerequired

The recipient row; null in a dry run, which stores none.

object_idstring (uuid) · nullablerequired

Null in partners-mode plans (recipients come from billing_plan_recipient, not billing_object).

object_labelstring · nullablerequired

The object's name.

partner_idstring (uuid) · nullablerequired

The payer billed; null for a dry-run row whose payer is not resolved.

partner_labelstring · nullablerequired

The payer's name.

outcomestringrequired

What the run did: made an invoice, had nothing to bill, failed validation (error_code), or kept an issued invoice of an earlier run of the period (issued_untouched). New values may be added: treat a value you do not know as valid, not as an error.

Known values (open: expect new ones) generated, skipped, validation_failed, issued_untouched

invoice_idstring (uuid) · nullablerequired

Null for skipped/validation_failed outcomes.

invoice_numberstring · nullablerequired

The invoice's number, once issued.

errorstring · nullablerequired

English detail for support; the client localises by error_code.

error_codestring · nullablerequired

DA-139: the failure's machine-readable identity, registered in util/warning_codes.py under the billing_recipient_failure family and obliged warnings.billing_recipient_failure.<code> copy in both locales.

Details

Null for a non-failed outcome, and for a row generated before DA-139 shipped — in which case error (the server's English sentence) is the only text available.

error_paramsobject · nullablerequired

The figures the localised sentence interpolates (e.g. line_label, amount), lifted out of error because a translated sentence places its values differently. Null when the code takes no parameters.

estimated_linesarray of objectrequired

Lines billed on an estimate, settled by a later run.

2 attributes of each item
line_idstring (uuid)required

The plan line.

quantitystringrequireddecimal string

The estimated quantity billed.

flagsarray of object · nullable

Phase 241 (D-03): review-worthy flags on this recipient (e.g. missing_reading_policy=flag_recipient markers) — separate from outcome, whose enum is frozen (D-03). Null when the recipient carries no flags. Free-form per- entry shape; populated by the run-generation path (Phase 241-03/04).

co_partner_idsarray of string (uuid)

KÜ part 1 (owner Q25): the co-recipients this row was billed with (the other owners), printed and e-mailed beside the primary partner_id. Empty for a one-partner bill.

co_partner_labelsarray of string

The co-recipients' names, in billing order ("Mari Tamm + Jaan Tamm").

contact_idstring (uuid) · nullable

The payer billed (the primary recipient).

totalstring · nullabledecimal string

The invoice's total; a consolidated invoice's whole total on each member.

currencystring · nullable

The invoice's currency (ISO 4217); null without an invoice.

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 invoice's rate: 1 in the book currency; for a foreign invoice the European Central Bank rate of its posting date (a draft's until issuing fixes it). Null without an invoice.

book_totalstring · nullabledecimal string

The invoice's total in the book currency. Null without an invoice, or for a foreign invoice with no rate yet.

completed_atstring (date-time) · nullable

When it finished.

external_refstring · nullable

Your own id for the run, when one was given.

omittedarray of string

Parts of recipients left out (null, or an empty list) because the token's scopes do not read them: contacts (the payers, by contacts:read), invoices (invoice ids, numbers and totals, by invoices:read), objects (the objects, by objects:read). Each recipient's English error is left out with them.

Known values (open: expect new ones) contacts, invoices, objects

Used by