---
title: "Split a posted bank transaction across categories"
method: POST
path: "/bank-transactions/{bankTransactionId}/split-posted"
tags: ["Banking"]
---

# Split a posted bank transaction across categories

`POST /bank-transactions/{bankTransactionId}/split-posted`

## Request

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

Replaces the category lines of a posted bank row's journal entry with lines that sum to the bank amount (one line collapses a split). The entry keeps its id, date, and bank line, so a reconciled row stays reconciled. A/R, A/P, bank, and cash lines, invoice and bill payments, transactions waiting on Ask Client, and locked periods are refused. Recorded in the audit history.

## Path parameters

- `bankTransactionId` string, uuid, required

## Request body

- object
  - `splits` object[], required: Category lines that sum to the absolute transaction amount. One line puts a split entry back on a single account.
    - `accountId` string, uuid, required
    - `amountCents` integer, required: Integer cents. Example: 1250 means $12.50.
    - `classId` string, uuid, nullable

## Response `200`

Split saved

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