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.

BillingPlanLineInput

Request

A line of a billing plan. Lines are sent as a whole list, in invoice order: a line with an id keeps that line (fields it leaves out keep their values), one without is new, one left out is removed. Formulas are TEXT in the billing-formula grammar (see parseBillingFormula); the server parses and stores the tree. quantity/unit/unit_price are for fixed lines only, the formulas for formula and allocation lines only.

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

Attributes

22
line_kindstringrequired

fixed: a quantity and price. formula: quantity formula × price formula per recipient. allocation: a total formula split across recipients by a weight formula.

One of fixed, formula, allocation

labelstringrequired

Line text on the invoice.

idstring (uuid) · nullable

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

sort_orderinteger

Ignored; the line's place is its place in the list.

tax_code_idstring (uuid) · nullable

Tax code of the invoice line.

account_idstring (uuid) · nullable

Revenue account of the invoice line.

item_idstring (uuid) · nullable

The item the line bills; with price_source article its price is read at every run.

price_sourcestringdefault "manual"

fixed lines: the price from this line (manual) or from the item (article), read at every run.

One of manual, article

quantitystring · nullabledecimal string

fixed lines: quantity per recipient.

unitstring · nullable

Unit of measure.

unit_pricestring · nullabledecimal string

fixed lines with price_source manual: net price per unit; null with article.

qty_formulastring · nullableat most 2000 characters

formula lines: the quantity per recipient, e.g. consumption.kulm_vesi.

price_formulastring · nullableat most 2000 characters

formula lines: the price per unit, e.g. var.water_rate.

total_formulastring · nullableat most 2000 characters

allocation lines: the amount to split, evaluated once for the plan; may use sum_objects.

weight_formulastring · nullableat most 2000 characters

allocation lines: each recipient's weight, e.g. prop.area_m2.

is_activebooleandefault true

An inactive line stays on the plan and bills nothing.

recipient_filterBillingPlanLineRecipientFilterInput · nullable

Who the line bills; null (or omitted) = every recipient of the plan.

2 attributes of recipient_filter
modestringrequired

Every recipient of the plan, or only the listed ones.

One of all, selected

recipient_idsarray of string (uuid)default []

Required (non-empty) when mode=selected; must be empty when mode=all.

missing_reading_policystringdefault "block"

When a consumption the line uses has no reading: stop the run (block), leave the line off that recipient's invoice (skip_line), or bill the last 3 periods' average, marked as an estimate (estimate).

One of block, skip_line, estimate

negative_consumptionstringdefault "zero"

Bill a negative period consumption as 0, or with a negative amount.

One of zero, negative

condition_propertyBillingPlanLinePropertyCondition · nullable

Bill only objects whose boolean property has this value.

2 attributes of condition_property
property_keystringrequired

A boolean property of the plan's object type.

equalsbooleanrequired

The value that bills the line.

condition_variableBillingPlanLineVariableCondition · nullable

Bill only in periods where the plan's boolean variable has this value.

2 attributes of condition_variable
variable_keystringrequired

A boolean variable of the plan.

equalsbooleanrequired

The value that bills the line.

dimensionsarray of BillingPlanLineDimensiondefault []

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

2 attributes of each item
dimension_idstring (uuid)required

The dimension.

dimension_value_idstring (uuid) · nullablerequired

Its value on the line; null only for the object type's own dimension (each recipient's object).

Used by