Regenerate ledger for an existing entity

Deletes existing transactions and ledger accounts, then creates a new ledger for the entity

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

entityIdstringRequired
ID of the entity to regenerate ledger for
createDefaultAccountsbooleanOptionalDefaults to false

Whether to create default ledger accounts (based on account types from enums). If false, only creates an empty ledger.

Response

Ledger regenerated successfully
entityIdstring or null
The ID of the entity
oldLedgerIdstring or null
The ID of the old ledger that was deleted
newLedgerobject or null
The new ledger that was created
deletedAccountsCountinteger or null
Number of ledger accounts that were deleted
deletedTransactionsCountinteger or null
Number of transactions that were deleted