Book a statement's reviewed rows as transactions
Requires manage:bank_accounts — this writes accounting data.
Omit entry_ids entirely to book every pending row — on a
compare-mode statement, every pending row whose comparison.rows
state is missing or before_sync. Sending the
key with nothing usable in it — [], or values that are not integers —
is refused with 422, never treated as “book everything”. Rows flagged
duplicate are left alone unless you name their ids: the flag means a
transaction like this already exists, and booking it anyway is a
decision, not a default.
Refused with 422 when the statement does not balance. Resend with
force: true if you have checked the rows yourself.
On a compare-mode statement (the account is fed by the bank) only
rows whose comparison.rows state is missing or before_sync can be
booked. matched, awaiting_bank and fetchable rows are refused:
naming any of them in entry_ids refuses the whole call with 422, and
nothing is booked. Everything is refused while the account is
unconfirmed.
updated counts rows that overwrote an existing hand-entered
transaction in place rather than creating a new one — that transaction
keeps its id and whatever it already settles.
entries carries every row you named that belongs to this statement,
including ones that were skipped as already imported or failed, each
with its resulting status — so a retry after a partial failure reports
what happened to every id.
Authentication
JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.
Lucanto API key. Two prefixes:
lct_pat_<random><checksum>— personal access token (owner: User)lct_live_<random><checksum>— workspace token, live data
Issue keys at /settings/api_keys (personal) or
/:workspace_id/settings/api_keys (workspace). Plaintext token is
shown once and never again.
Path parameters
Bank statement ID. Either the numeric id or the public_id (bst_…).
Headers
Client-supplied unique key (recommended: UUID v4) for safe
retries. Within 24 hours, repeating the same key with the same
request (method, path, query, body) replays the original
response instead of re-executing the action — once the action
has run, a 5xx included; a request stopped before it ran is not
stored. Reusing
a key with a different request returns
422 idempotency_key_conflict (IETF draft §2.7).
Request
Rows to book. Omit the key to book every pending row (on a compare-mode statement, every pending missing / before_sync row); an empty or unparseable value is a 422, not a whole-statement import.
