Book opening balances (EB values)
Books opening balances from a trial-balance list as opening balance values into the ledger. Each opening balance is booked against account 9000 (opening balances, general accounts). Only balance-sheet accounts (assets, liabilities, equity) are allowed — no P&L accounts (expense/income). The sum of all debit balances must equal the sum of all credit balances. All entries are booked under a shared intent ID and can be reversed together. Only one set of opening balances can exist per date; correction requires a prior reversal.
POST
/v1/bookings/opening-balances Authorization
Authorization string header required API key in the format
ll_.... Pass as a Bearer token. Request Body
booking_date string required Booking date of the opening balances (YYYY-MM-DD), typically the first day of the new fiscal year
balances array required Opening balances. Each entry has exactly one amount > 0 (either debit or credit). Entries with debit = credit = 0 are ignored.
Opening balance (`balances`)
account_number string required SKR04 account number
account_name string required Account label
debit number required Debit balance. 0 when it is a credit balance.
credit number required Credit balance. 0 when it is a debit balance.
Responses
200
Success
400
BALANCE_MISMATCH
400
INVALID_BALANCE_ENTRY
400
ACCOUNT_TYPE_NOT_ALLOWED
400
ACCOUNTS_NOT_FOUND
400
ACCOUNT_9000_MISSING
409
OPENING_BALANCES_EXIST
400
PERIOD_LOCKED The affected period is locked and will not accept new bookings.
400
INVALID_INPUT Required fields are missing or values do not match the expected format.
POST
cURL /v1/bookings/opening-balances -cmd">curl --request -method">POST -punct">\
--url 'https://api.ledgerlou.de/v1/bookings/opening-balances' -punct">\
--header 'Authorization: Bearer ll_your_key' -punct">\
--header 'Content-Type: application/json' -punct">\
--data '{
"booking_date": "2025-01-01",
"balances": [
{
"account_number": "0400",
"account_name": "Technische Anlagen und Maschinen",
"debit": 50000,
"credit": 0
},
{
"account_number": "1200",
"account_name": "Forderungen aus Lieferungen und Leistungen",
"debit": 10000,
"credit": 0
},
{
"account_number": "2000",
"account_name": "Gezeichnetes Kapital",
"debit": 0,
"credit": 25000
},
{
"account_number": "2900",
"account_name": "Jahresüberschuss/-fehlbetrag",
"debit": 0,
"credit": 35000
}
]
}' 200 Response
JSON {
"intent_id": "<string>",
"event_count": 1,
"total_debit": 1,
"total_credit": 1
}