Skip to main content
DELETE
Delete a ledger entry

Deleting a ledger entry

Deleting an entry removes it from the ledger completely, just like deleting a booking in the app:
  • The VAT booked alongside the entry is deleted with it.
  • Receipts attached to the entry are not deleted. They return to the document inbox, from where they can be attached to another entry.
  • The balances of the accounts involved are recalculated.
A successful deletion returns 204 No Content with an empty body.

Entries that cannot be deleted

Only entries with the source manual — posted by hand in Infinity or through this API — can be deleted here. Every other entry belongs to a feature that owns it, for example an invoice, a bank transaction or the VAT settlement, and has to be undone there. See ledger entry sources for what each source means. Deletion is refused with 403 Forbidden and one of these error codes:
  • ledger/entry-not-deletable if the source of the entry is not manual. The response also carries the source of the entry, so you know which part of Infinity it has to be undone in.
  • ledger/annulment-deletion if the entry has already been reversed (Storno). Its reversedBy property tells you which entry reversed it.
  • fiscal-year/closed if the entry lies in a closed fiscal year.
  • transactions/from-closed-vat-period if the entry lies in a closed VAT period.
As with the other ledger endpoints, the id must be that of the ledger entry. An unknown id, an id from another organisation, or the id of the VAT transaction booked alongside an entry results in a 404 Not Found response with the error code transactions/not-found.

Authorizations

x-api-token
string
header
required

API token for authentication. Obtain from your Infinity account settings.

Path Parameters

ledgerEntryId
string
required

The id of the ledger entry

Response

The ledger entry was deleted. The response has no body.