Skip to main content

Route a statement to a bank account

POST 

/api/v1/bank_statements/:id/route_account

Resolves an AMBIGUOUS routing by naming the account the file belongs to, and records that a human chose it: account_detection becomes manual.

When you need it. The extractor reads the IBAN off the document and matches it against the company's accounts. When it matches none, or several, the file is published account_detection: ambiguous - and every commit refuses it until this call settles the question. Read account_detection after the extraction rather than discovering the refusal at commit time.

What it moves. The statement and all of its lines are re-pointed at the account you name, and any accounting already projected against the former account is removed - the commit re-posts against the new one. The extracted FIGURES are untouched, so a review already confirmed stays confirmed and no second confirmation is needed between this call and the commit.

No Idempotency-Key is required: routing to the same account twice is the same file in the same place. Naming a DIFFERENT account a second time is a second routing and will be performed - the header does not protect you from that, reading the response does.

Request​

Responses​

The file was routed. It comes back on the chosen account, with account_detection now manual.