delete_transaction
Delete one or multiple GnuCash transactions by GUID, with safeguards preventing removal of reconciled splits or invoice postings unless forced. Batch deletion validates all IDs before removing any.
Instructions
Delete one transaction by GUID — or several in one call.
Safeguards prevent deletion if a transaction has reconciled splits (force=true overrides) or is an invoice's posting record (unpost_document first).
Pass a LIST of GUIDs to delete several in one book open /
one save. The batch is all-or-nothing: every guid is
validated before anything is deleted, so a bad guid rejects
the whole call with nothing removed. Response for a list is
{status, count, transactions: [{guid, description}]};
a single guid returns the single-object shape as before.
Args: guid: Transaction GUID (32-char hex or 8+ char prefix), or a list of them. force: Allow deleting transactions with reconciled splits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guid | Yes | ||
| force | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |