Banking

Reclassify a bank transaction

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.

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

Path parameters

transactionIdstring uuid required

Bank transaction UUID

Request body

accountIdstring uuid required
contactIdstring uuid nullable
taxRateIdstring uuid nullable
classIdstring uuid nullable

Class for the category line. Omit to keep the current class; null clears it. Also updates the selected posted journal line.

journalLineIdstring uuid

Required when the linked journal entry has multiple editable non-bank lines.

reasonstring
viaSuggestionboolean

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.

basisstring nullable
confidencenumber nullable
rationalestring nullable

Response

Updated transaction and journal-line status

journalEntryUpdatedboolean
journalLineIdstring uuid nullable
warningstring nullable

Changes

No recorded changes to this operation across all 5 revisions of this API.