Regenerate ledger for an existing entity
Deletes existing transactions and ledger accounts, then creates a new ledger for the entity
Headers
Authorization
Bearer authentication of the form Bearer <token>, where token is your auth token.
Query parameters
entityId
ID of the entity to regenerate ledger for
createDefaultAccounts
Whether to create default ledger accounts (based on account types from enums). If false, only creates an empty ledger.
Response
Ledger regenerated successfully
entityId
The ID of the entity
oldLedgerId
The ID of the old ledger that was deleted
newLedger
The new ledger that was created
deletedAccountsCount
Number of ledger accounts that were deleted
deletedTransactionsCount
Number of transactions that were deleted