POST
Create a ledger entry
Scope:
accounting:daily-ledger.writehttps://api.holded.com/api/v2/ledger-entriesCreates a new ledger entry (journal entry) in your accounting books. Each entry records a debit and credit for double-entry bookkeeping. Ledger entries are the foundation of your accounting — every financial transaction ultimately maps to one or more entries. The response returns the new entry identifier.
Request body
object
datestring<date>required
Ledger entry date in ISO 8601 format
notesstring | nulloptional
Free-text notes for the ledger entry
contact_idstring | nulloptional
Contact identifier linked to this entry
lines[]object[]required
accountintegerrequired
Full account number from the chart of accounts — the number field, not the prefix
descriptionstring | nulloptional
Line description
debitstringrequired
Debit amount as decimal string
creditstringrequired
Credit amount as decimal string
tags[]string[]optional
List of tags to categorize this line
Request
python
import requests
url = "https://api.holded.com/api/v2/ledger-entries"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"date": "2024-01-15",
"notes": "string",
"contact_id": "string",
"lines": [
{
"account": 43000001,
"description": "string",
"debit": "100.00",
"credit": "0.00",
"tags": [
"string"
]
}
]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Responses
Response
json
{
"id": "507f1f77bcf86cd799439011"
}Success responses
201Ledger entry createdapplication/jsonobject
idstring
Error responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json422Validation errorapplication/json429Rate limit exceededapplication/json