Ledger Entries

Create ledger entry

Changed on

Creates 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

account_holder_idstring uuid required
amountinteger required

Amount in minor currency units (e.g. cents for USD). Must be >= 0.

currencystring required

ISO 4217 three-letter currency code — inherited from LedgerAccount → Ledger.

entry_datestring date nullable

ISO 20022 ValDt — value/settlement date

entry_type'credit' | 'debit' required
external_entry_idstring nullable

Opaque external SoE identifier (upsert identity)

ledger_account_idstring uuid required
status'pending' | 'posted' | 'reversed' | 'voided' nullable
tenant_idstring uuid

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