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.

BillingRunCreateRequest

Request

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

Attributes

3
dataBillingRunInputrequired

Bill one period of a plan.

9 attributes of data
plan_idstring (uuid)required

The plan; the run bills the revision in force for period.

periodstring (date)required

The period billed, the first day of its month.

finishstringdefault "draft"

Leave draft invoices, issue them, or issue and email them. Issuing also needs permission to write sales invoices (invoices:write).

One of draft, issue, issue_send

invoice_datestring (date) · nullable

Invoice date; today when absent.

posting_datestring (date) · nullable

Posting date, when not the invoice date.

due_datestring (date) · nullable

Override the plan's due-date rule.

variable_valuesarray of BillingRunVariableValue

Values for the plan's asked variables, and overrides of timed ones.

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.

One of 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.

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

For a plan in a currency the European Central Bank publishes no rate for: the rate every draft of the run is booked at, in ExchangeRate's direction, recorded as a manual rate and kept when the draft is issued.

Details

Used only when no ECB rate exists for the day the drafts convert on (the run's posting date); where one does, or for a plan in the book currency, the run is refused (EXCHANGE_RATE_OVERRIDE_INVALID). Omitted: the ECB's rate of that day.

external_refstring · nullable1–200 characters

Your own id for the run, unique per organization; on_conflict resolves a create against it.

on_conflictOnConflictdefault "error"

What a create does when a record of the same resource already holds the sent external_ref. error: 409 EXTERNAL_REF_EXISTS with existing_id. return: 200 with the existing record, unchanged.

One of error, return, update

Details

update: apply the sent fields to it as a PATCH would and answer 200; refused like a PATCH when the record is no longer editable.

expected_fingerprintstring · nullable

The fingerprint of the dry run you reviewed. If the result would differ now, the run is refused with BILLING_RUN_RESULT_CHANGED and creates nothing. Optional: a run sent without it is computed and started as the period stands.

Used by