Skip to main content

Exclude a statement from its upload's commit

POST 

/api/v1/bank_statements/:id/exclude

Takes the file out of the commit of the upload it arrived in. The 200 returns the statement with excluded true and excluded_at set.

When you need it. An upload is committed whole or not at all. A file that can never be posted - an extraction that failed - blocks its whole upload: a commit naming another file answers batch_unresolved, and a commit naming the failed file itself answers statement_not_reviewable. A valid file you do not want in the books is the opposite case: it is posted with the rest of the upload unless you exclude it first. Either way, excluding it is the explicit act: the next commit naming another file of the upload posts the rest and leaves this one untouched.

What it moves. Nothing but the exclusion. The file's state and its lines are kept as they are, and POST /bank_statements/{id}/include puts it back exactly as it was. A commit naming an excluded file is refused with statement_excluded.

No Idempotency-Key is required: excluding an excluded file changes nothing and keeps the first excluded_at.

Request​

Responses​

The file is excluded from its upload's commit.