delete_transaction
Delete one or more GnuCash transactions by GUID in a single all-or-nothing batch. Safeguards block reconciled-split and invoice-posting deletions unless explicitly overridden.
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_invoice 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 |