Merge a duplicate bank account into the account being kept
Moves the duplicate chart account's journal lines, bank transactions, statements, and check evidence to the target account and its register, adds the duplicate register's cached balance (integer cents) to the target register, clears the duplicate's statement-request settings, and soft-deletes the duplicate account and register in one transaction with an audit record. Both accounts need one active register with the same type and currency. Refuses reconciliations, a bank feed on the duplicate, other linked records, and activity in a closed fiscal year. dryRun=true validates and returns the same counts without saving.
Request
- Base URL: https://ledgerhq.pro/api/v1
- URL: https://ledgerhq.pro/api/v1/accounts/{accountId}/merge
- 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
Chart account UUID of the duplicate to remove
Request body
Response
data: source, target (priorBalanceCents, sourceBalanceCents, balanceCents), counts, dryRun
Changes
No recorded changes to this operation across all 5 revisions of this API.