Reclassify a posted ledger entry
reclassify_entryChanges the ACCOUNT on an already-posted entry (from the general ledger) and nothing else — amount, currency, and date are facts pulled from the bank and cannot be edited here (there is no parameter for them). The entry's journal lines are rebuilt by relabelling the primary leg, preserving every amount and FX home-stamp, so it stays balanced. An audit_trail entry records who changed it from→to, and a ledger sync is re-queued. GUARDS (no bypass): the entry must be posted (not awaiting review — use approve_classification for that); a manual or multi-leg entry cannot be reclassified (correct it by reversal); and an entry in a CLOSED period is refused (reopen or post a prior-period adjustment). Set create_rule:true to ALSO teach a forward-only counterparty rule so future events from this counterparty book to the new account — past entries are NOT retroactively re-classified. actor_id is optional — it defaults to the organisation entity, and if provided must belong to this org.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org_id | No | Optional. Defaults to the organisation the authenticated API key is bound to, so you normally omit it and never need to ask the user for their organisation UUID. If provided, it must match the key’s org or the request is rejected. | 0e91146d-511c-469f-bdee-5c867b26ae0d |
| reason | Yes | Why the new account is correct. Stored verbatim in the audit trail. | |
| actor_id | No | Optional. Defaults to the organisation entity (correct for an org-scoped key). If provided, it must be an entity belonging to this organisation — arbitrary UUIDs are rejected, so the audit trail cannot be attributed to someone else. | |
| create_rule | No | Also upsert a forward-only counterparty rule (this counterparty → the new account) so future events auto-classify. Does NOT re-classify past entries. | |
| new_account_code | Yes | The account to move this entry to: a numeric chart-of-accounts code (4000 SaaS Revenue, 4100 Usage Revenue, 4900 Other Income, 5000 API & Compute Costs, 5100 Payment Processing Fees, 5200 Platform Commission, 6100 Software Subscriptions, 6200 Contractor & Freelancer, 6300 Marketing & Ads, 6400 Banking & Finance Fees, 6500 Payroll, 6600 Taxes, 6700 Foreign Exchange Gain/Loss, 6750 Unrealized FX Gain/Loss, 6800 Office & Equipment, 6810 Travel, 6820 Meals & Entertainment, 6830 Professional Services, 6840 Insurance, 6900 Other Expenses, 2100 Accounts Payable, 3900 Owner Contributions & Transfers, 1100 Cash & Bank, 1150 Stripe Receivable, 1160 App Store / Play Receivable, 1200 Stripe Settlement) or a broad rollup category (revenue → 4000, cost_of_goods → 5000, operating_expense → 6100). | |
| classified_event_id | Yes | The classified_event_id of the posted entry to reclassify. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_account | Yes | ||
| from_account | Yes | ||
| new_category | Yes | ||
| reclassified | Yes | ||
| ledger_sync_queued | Yes | ||
| classified_event_id | Yes | ||
| counterparty_rule_id | No |