Skip to main content

Commit a reviewed bank statement

POST 

/api/v1/bank_statements/:id/commit

Posts the statement's extracted lines to the general ledger and closes its review. The 200 returns the statement at posted, with committed true.

Your POST is the confirmation, for the whole upload. The platform will not post figures nobody has taken responsibility for, so this call carries that assertion: you have read the lines (GET /bank_statements/{id}/lines), corrected what needed it (PATCH /bank_statements/{id}/lines), and you are committing them. There is no separate 'confirm review' call to make first - and because the commit posts the whole upload, the confirmation this POST carries covers every file of it, not only the one in the path.

THE UNIT IS THE UPLOAD, NOT THE FILE. Every statement created by one multipart POST belongs to one batch, and a batch is posted whole or not at all. So committing any file of an upload commits ALL of them - and a single sibling still owing work refuses the whole call with batch_unresolved, having written nothing. Commit once per upload, not once per file; a second call naming a sibling finds the work already done.

Nothing is partially written. The whole commit runs in one transaction, so every 422 below leaves the ledger exactly as it was and the same Idempotency-Key may be resent once you have fixed what was refused.

One 4xx is NOT a rollback, and it is the reason to send the header. If this platform fails while building the response, the commit has already landed and you may receive a 4xx over accounting that IS in the ledger. The key is what closes that: retrying it answers 409 idempotency_key_consumed, telling you the first call finished and posted. Read GET /bank_statements/{id} - state: posted and committed: true mean the work is done. Re-committing is safe in any case: a posted file is answered 200 and posts nothing again.

Request​

Responses​

The upload was posted. The statement comes back at posted, with committed true.