Delete a ledger entry
Scope: accounting:daily-ledger.write https://api.alladdin.com/api/v2/ledger-entries/{ledgerEntryId}
Permanently deletes a ledger entry (asiento contable) — the journal entry with all its debit/credit lines. This action cannot be undone.
Use when the user wants to remove or cancel an accounting entry (eliminar asiento, borrar asiento contable). Deletion is blocked if the entry is linked to a non-cancelled approved document, has reconciled (dotted) lines, falls in a locked accounting period, or is a closing/regularization entry of an already-closed fiscal year.
Parameters
Path parameters
ledgerEntryId string required
Ledger entry ID (24-char hex ObjectId)
Request
import requests
url = "https://api.alladdin.com/api/v2/ledger-entries/{ledgerEntryId}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.delete(url, headers=headers)
print(response.json())Responses
Success responses
204 Resource deleted
Error responses
401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Ledger entry not found application/json 422 Validation error application/json 429 Rate limit exceeded application/json
