---
title: "Apply one category to many bank transactions"
method: POST
path: "/bank-transactions/categorize-batch"
tags: ["Banking"]
---

# Apply one category to many bank transactions

`POST /bank-transactions/categorize-batch`

## Request

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

Applies one account (and optional contact, tax rate, and class) to up to 200 ready or posted bank transactions. Each row uses the single-row reclassify rules: ready rows are coded but not posted, posted rows update their category line, and rows in a completed reconciliation are refused. Posted invoice or bill payments and posted rows whose other line is Accounts Receivable, Accounts Payable, or another bank or cash account are skipped (skipped: true on the result) because their category cannot change without an Undo. An omitted taxRateId, contactId, or classId keeps the row's current value; null clears it. Failures are reported per row and never stop the batch. Rule learning follows each change.

## Request body

- object
  - `transactionIds` string[], required
  - `accountId` string, uuid, required
  - `contactId` string, uuid, nullable
  - `taxRateId` string, uuid, nullable
  - `classId` string, uuid, nullable
  - `reason` string

## Response `200`

Per-transaction results

- object
  - `data` object
    - `requested` integer
    - `succeeded` integer
    - `skipped` integer: Rows refused because their posted category cannot change here
    - `failed` integer
    - `results` object[]

## 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)
