Book a statement's reviewed rows as transactions

View as Markdown
Requires `manage:bank_accounts` — this writes accounting data. **Omit `entry_ids` entirely** to book every `pending` row. 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. `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

AuthorizationBearer

JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.

OR
AuthorizationBearer
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

workspace_idlongRequired>=1
bank_statement_idlongRequired>=1

Request

This endpoint expects an object.
entry_idslist of longsOptional

Rows to book. Omit the key to book every pending row; an empty or unparseable value is a 422, not a whole-statement import.

forcebooleanOptional
Book the rows even though the statement does not balance.

Response

OK
createdinteger
updatedinteger
Rows that overwrote an existing manual transaction in place.
skippedinteger
failedinteger
transaction_idslist of longs
entrieslist of objects
balance_checkobject or nullOptional

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error