Update a bank account
PATCH/api/v1/bank_accounts/:id
Configures the account for posting. This is the ONLY write on the resource - there is no create and no delete, because an account arrives from a sync or a statement import. The four accepted fields are exactly the ones readiness.missing can complain about, so a client can drive the account to ready from what a read told it.
Request
Responses
- 200
- 422
The account was updated. It is returned in its new state, readiness included, so one round trip is enough to know whether it can now be posted from.
The request was refused and details names the field. Two stable codes reach this status. validation_failed covers the configuration triggers - accounting_account_code is not a 512 account of the French chart of accounts, or is cleared on an account with origin manual, which requires one because no provider supplies it; suspense_account_code is longer than its published maxLength of 255 characters, refused rather than truncated; ledger names a journal belonging to another company, or one that does not exist, both answering identically under details.ledger so the response never reveals whether an id you cannot reach exists; and a body carrying none of the four configuration attributes is refused under details.base rather than reported as a write that changed nothing. invalid_argument covers exactly one trigger - active sent as anything other than true or false, reported under details.active. Nothing was written in any of these cases.