Get a ledger entry
Scope: accounting:daily-ledger.read https://api.alladdin.com/api/v2/ledger-entries/{ledgerEntryId}
Retrieves a single ledger entry (asiento contable) by its ID, including every debit/credit line that makes up the entry.
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.get(url, headers=headers)
print(response.json())Responses
Response
{
"id": "507f1f77bcf86cd799439011",
"date": "2024-01-15",
"type": "invoice",
"entry_number": 0,
"doc_description": "string",
"notes": "string",
"contact_id": "string",
"lines": [
{
"line": 0,
"account": 43000001,
"description": "string",
"debit": "100.00",
"credit": "0.00",
"tags": [
"string"
]
}
]
}Success responses
200 Ledger entry found application/json object id string
Ledger entry ID
date string<date>
Date of the ledger entry
type string | null
Type of the ledger entry
entry_number integer | null
Sequential number of the ledger entry, once the ledger has been numbered
doc_description string | null
Description of the document that originated this entry
notes string | null
Free-text notes for the ledger entry
contact_id string | null
Contact identifier linked to this entry
lines[] object[]
Debit/credit lines that make up the ledger entry
line integer
Line number within the entry
account integer
Full account number from the chart of accounts
description string | null
Line description
debit string
Debit amount as decimal string
credit string
Credit amount as decimal string
tags[] string[]
List of tags attached to this line
Error responses
401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Ledger entry not found application/json 429 Rate limit exceeded application/json
