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.

BillingPlanVariableInput

Request

A plan variable (KÜ2 D65/D70), referenced from the plan's formulas as var.<key> and from line conditions. kind=timed holds dated segments; kind=asked has none and is asked at every billing run; kind=formula computes from earlier variables and system values. The key (^[a-z][a-z0-9_]*$, unique per plan) is locked once any line uses it or a billing run has recorded a value for it (BILLING_PLAN_VARIABLE_KEY_LOCKED). Variables are sent as a whole list, in display order: id keeps a variable, a variable left out is removed unless a line uses it (BILLING_PLAN_VARIABLE_IN_USE).

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

Attributes

11
keystringrequired1–63 characters

Machine name formulas use as var.<key>.

namestringrequired1–200 characters

Name shown to people.

value_typestringrequired

number (with a unit) or boolean (reads as 1/0 in formulas).

One of number, boolean

kindstringrequired

timed: values by period, set on the plan. asked: given at every run. formula: computed from its formula at every run.

One of timed, asked, formula

idstring (uuid) · nullable

An existing variable of this plan to keep; omit for a new one.

unitstring · nullableat most 32 characters

Unit of a number, e.g. EUR/m3; null for a boolean.

formulastring · nullableat most 2000 characters

Required for kind=formula; null otherwise. Uses system values and variables earlier in the submitted variable list; self and forward references are refused. Evaluated after system values, before lines, using Decimal precision 28.

invoice_formulastring · nullableat most 2000 characters

For an asked number only: how a billing run computes the value it takes from a purchase invoice's chosen lines, a formula in the invoice context (see parseBillingFormula), e.g. sum_lines(line.amount / line.quantity) for a price per unit.

Details

Null: the chosen lines' sum, sum_lines(line.amount). Stored normalised; the default written out is stored as null.

guidancestring · nullableat most 500 characters

For asked variables, the hint shown at the run.

needs_reviewbooleandefault false

Set by a copy on its shifted values; send false to clear it.

segmentsarray of BillingPlanVariableSegmentdefault []

For timed variables (may be empty while drafting); empty for asked.

3 attributes of each item
start_periodstring (date)required

First period the value applies to (a first of month).

end_periodstring (date) · nullablerequired

Last period, inclusive; null means onwards.

valuestringrequireddecimal string

The value, a decimal string with at most 4 fraction digits; "1"/"0" for a boolean variable.

Used by