Withdraw a bank allocation
DELETE/api/v1/bank_allocations/:id
Deletes nothing. An allocation is an audit record, so this writes status: "rejected" and returns the row as it now stands - which is why the response carries a body at all.
A CONFIRMED allocation is refused here: the payment and the ledger line have to come back first, through DELETE /api/v1/bank_operations/{id}/reconciliation. A rejected one is refused too - that state is terminal.
Idempotency-Key is accepted and optional.
Request
Responses
- 200
- 401
- 403
- 404
- 422
The withdrawn allocation, now rejected.
The request carries no bearer token, or one that is invalid or expired.
The token holds neither destroy nor write, or the bank_reconciliation feature is off for the allocation's workspace.
No allocation with this id is reachable by the token's grants.
The allocation's current state cannot be withdrawn here: confirmed money has to come back through the reconciliation resource first, and rejected is terminal.