Exclude a company from a bank rule
POST/api/v1/bank_rules/:bank_rule_id/exclusions
Opts one company out of this workspace rule: from the next classification on, the rule stops being a candidate for that company's operations. It rewrites nothing already posted. An Idempotency-Key is accepted and optional.
Request
Responses
- 201
- 401
- 403
- 404
- 409
- 422
The company is now excluded.
The request carries no bearer token, or one that is invalid or expired. doorkeeper_authorize! is the first gate of the chain, so this is answered before the workspace, the company, the feature flag and the record are ever resolved - and before any Idempotency-Key is claimed.
The token does not hold the write scope this POST requires.
No rule with this id is reachable by the token's grants.
You sent the optional Idempotency-Key and a call bearing it is still in flight - idempotency_request_in_progress. Nothing was written by THIS call. Once the first completes, the same key replays its stored response rather than conflicting.
The exclusion was refused. code is validation_failed when the rule is company-scoped and so cannot be excluded, or when this company is already excluded from it, and invalid_argument when company_id is not a company of the rule's workspace.