Skip to main content

Confirm a bank operation's reconciliation

POST 

/api/v1/bank_operations/:bank_operation_id/reconciliation

Settles the operation against the invoices you name - writing one Invoice::Payment per allocation and recomputing the accounting entry from the confirmed set.

The body carries the COMPLETE intended allocation set, and a partial body is not a partial update. The set you send is the set that ends up confirmed: an allocation confirmed today and absent from this body is withdrawn, one present at a different amount is re-confirmed at the new one, and one that already matches is left untouched - so re-sending an identical body writes nothing. It is ALL-OR-NOTHING: if any member is refused, none of them lands.

The response is the recomputed operation. Ask for ?include=allocations,bank_accounting_entry and you read the confirmed set and its balanced lines back in the same round trip - a 300.00 movement split 200/100 comes back as TWO allocations and three lines, never as one mutated line.

Two tokens do two different jobs, and this endpoint requires both. Idempotency-Key protects against a DUPLICATED request; expected_version protects against a STALE one - a call computed from a picture of the allocation set that has since moved. Read version on the operation, send it back here.

Request​

Responses​

The recomputed bank operation.