GET
Get a ledger entry
Scope:
accounting:daily-ledger.readhttps://api.holded.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
stringrequiredLedger entry ID (24-char hex ObjectId)
Request
python
import requests
url = "https://api.holded.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
json
{
"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
200Ledger entry foundapplication/jsonobject
idstring
Ledger entry ID
datestring<date>
Date of the ledger entry
typestring | null
Type of the ledger entry
entry_numberinteger | null
Sequential number of the ledger entry, once the ledger has been numbered
doc_descriptionstring | null
Description of the document that originated this entry
notesstring | null
Free-text notes for the ledger entry
contact_idstring | null
Contact identifier linked to this entry
lines[]object[]
Debit/credit lines that make up the ledger entry
lineinteger
Line number within the entry
accountinteger
Full account number from the chart of accounts
descriptionstring | null
Line description
debitstring
Debit amount as decimal string
creditstring
Credit amount as decimal string
tags[]string[]
List of tags attached to this line
Error responses
401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Ledger entry not foundapplication/json429Rate limit exceededapplication/json