origin says where each account comes from: ponto
(bank connection), coda (CODA statements) or manual. Balances are only known
for the accounts Fidly synchronizes; on the others they are null.
Manual accounts
The API only createsmanual accounts: ponto and coda accounts are born from
their own flows, so origin is not an input. For the same reason, bic and
reference are only editable on a manual account — on a synchronized one they
belong to the bank and are refused as soon as they are present in the body, even
with their current value (422 field_not_editable). Send only the fields you
change, never the whole document you read.
A manual account can also stop being one on its own: if a Ponto connection or a
CODA import detects an existing account with the same IBAN, that account is reused
rather than duplicated, and its origin switches to ponto/coda. bic and
reference then become read-only on it.
reference is the IBAN: it must be valid, it is normalized (uppercase, no spaces)
and it is unique within the company (409 duplicate_bank_account).
Default account
A company always has exactly one default account, the one printed on its documents. The rules follow from that:- if there is none, the first account created becomes it, whatever the body says;
default: truepromotes an account and demotes the previous default;default: falseon the current default is refused (422 default_account_required) — promote another account instead.