---
title: "Exclude many unposted bank transactions"
method: POST
path: "/bank-transactions/exclude-batch"
tags: ["Banking"]
---

# Exclude many unposted bank transactions

`POST /bank-transactions/exclude-batch`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/bank-transactions/exclude-batch`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Excludes up to 500 person-chosen unposted rows (for example the 'may be in register' filter) in one commit with one audit entry per row. Each row stays restorable. Posted and reconciled rows are refused per row. With possibleDuplicate=true instead of transactionIds it excludes every waiting row whose possible-duplicate partner is already posted (optionally on one bankAccountId) and reports undecidedPairs, the pairs where neither side is posted yet. Excluding a row clears its partner's possible-duplicate pill. Requires bank_transactions:read_write and manage:banking.

## Request body

- object
  - `transactionIds` string[]: Unposted bank transactions to exclude. Omit when possibleDuplicate is true.
  - `possibleDuplicate` true: Exclude the leftover side of each possible-duplicate pair whose other side is posted
  - `bankAccountId` string, uuid: With possibleDuplicate, limit to this account's feed
  - `reason` string: Optional audit reason

## Response `200`

Per-row result; HTTP 200 does not imply every row was excluded.

- object
  - `requested` integer, required
  - `excluded` integer, required
  - `alreadyExcluded` integer, required
  - `failed` integer, required
  - `possibleDuplicate` boolean
  - `undecidedPairs` integer: Possible-duplicate pairs where neither side is posted yet (possibleDuplicate mode only)
  - `results` object[], required
    - `transactionId` string, uuid, required
    - `status` 'excluded' | 'already_excluded' | 'blocked' | 'not_found', required
    - `reason` string

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
