Skip to content

Money and dates

{ "amount": "1250.00", "currency": "LKR" }

Never send JSON floating-point money. In this LKR/SGD pilot, amounts are positive fixed-scale strings with exactly two decimal places, from 0.01 to 999999999999999.99. Zero, signs, exponents, commas, leading zeros and unsupported precision are rejected. The API does not silently round.

Every line uses the selected company’s base currency. There is no FX conversion. Use exact decimal arithmetic; debit and credit totals must balance and each side total must fit the same maximum. The journal has 2–200 lines using active, ordinary, non-group, draft-eligible accounts. Private and party/control accounts are excluded.

The two-decimal restriction belongs to this pilot. Future currencies must declare their own scales. POS signed minor-unit strings are a different, future encoding; do not reinterpret them as this money format.

Use YYYY-MM-DD for posting and other business dates. A journal posting date must identify an ordinary OPEN company period. Period 13 may be listed but cannot be used by this POST. Creation does not prove eligibility for a later submission.

Use RFC 3339 UTC instants ending in Z for snapshots, events and audit. Keep the effective IANA time zone separate. Synthetic ACME-LK uses Asia/Colombo; ACME-SG uses Asia/Singapore. Company configuration is authoritative, not browser locale or IP.

Period start/end dates and period query bounds are inclusive. General instant ranges follow [from,to) when published. Posting date, tax date, business date and device time are distinct concepts; an offline timestamp cannot extend a permission or reopen a closed period.