---
title: "Reclassify a bank transaction"
method: POST
path: "/bank-transactions/{transactionId}/reclassify"
tags: ["Banking"]
---

# Reclassify a bank transaction

`POST /bank-transactions/{transactionId}/reclassify`

## Request

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

Updates bank transaction classification and, when linked to an editable journal entry, updates the selected non-bank journal line. Locked periods return 422. Posted invoice or bill payments and posted rows whose other line is Accounts Receivable, Accounts Payable, or another bank or cash account return 422 with code posted_line_not_recategorizable; Undo the posting to change them. An omitted taxRateId keeps the current tax rate; null clears it.

## Path parameters

- `transactionId` string, uuid, required

## Request body

- ReclassifyRequest
  - `accountId` string, uuid, required
  - `contactId` string, uuid, nullable
  - `taxRateId` string, uuid, nullable
  - `classId` string, uuid, nullable: Class for the category line. Omit to keep the current class; null clears it. Also updates the selected posted journal line.
  - `journalLineId` string, uuid: Required when the linked journal entry has multiple editable non-bank lines.
  - `reason` string
  - `viaSuggestion` boolean: Set true only when applying a returned category suggestion. Manual reclassification clears prior suggestion attribution.
  - `source` 'phonebook' | 'taxonomy' | 'history' | 'ai' | 'null', nullable: Suggestion source. When supplied, basis, confidence, and rationale are required and viaSuggestion must be true.
  - `basis` string, nullable
  - `confidence` number, nullable
  - `rationale` string, nullable

## Response `200`

Updated transaction and journal-line status

- object
  - `transaction` BankTransaction
    - `id` string, uuid
    - `bankAccountId` string, uuid
    - `date` string, date
    - `postedDate` string, date, nullable
    - `description` string
    - `reference` string, nullable
    - `amount` integer: Integer cents. Example: 1250 means $12.50.
    - `balance` integer, nullable
    - `status` 'unreconciled' | 'reconciled' | 'excluded'
    - `sourceType` string: Plaid imports use plaid_bank_feed.
    - `externalTransactionId` string, nullable
    - `accountId` string, uuid, nullable
    - `suggestionCoded` boolean
    - `suggestionSource` 'phonebook' | 'taxonomy' | 'history' | 'ai' | 'null', nullable
    - `suggestionBasis` string, nullable
    - `suggestionConfidence` number, nullable
    - `suggestionRationale` string, nullable
    - `contactId` string, uuid, nullable
    - `taxRateId` string, uuid, nullable
    - `journalEntryId` string, uuid, nullable
  - `journalEntryUpdated` boolean
  - `journalLineId` string, uuid, nullable
  - `warning` string, nullable

## Other responses

- `422`: Error response
- `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)
