Ledger Entries
Create ledger entry
Changed onCreates a new ledger entry (debit or credit line) and atomically updates the parent LedgerAccount balance.
- credit entry → balance += amount
- debit entry → balance -= amount (returns 422 if balance would go negative — overdraft protection)
Currency must match the parent LedgerAccount (which inherits from the parent Ledger).
post/api/ledger-entries
Request
- Base URL: http://localhost:4100
- URL: http://localhost:4100/api/ledger-entries
- Auth: none required
Request body
Example request
{
"account_holder_id": "02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6",
"amount": 0,
"currency": "",
"entry_date": "2020-04-20",
"entry_type": "credit",
"external_entry_id": "",
"ledger_account_id": "02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6",
"limits_at_entry": [
null
],
"status": "pending",
"tenant_id": "02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6"
}Changes
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- info
added the new optional request property
- warning