CorebanqCorebanq Developer Docs
Ledgersv1Ledger Entries

Create ledger entry with balance update

Create a new ledger entry and update the ledger balance in a single transaction, with cascading updates to parent ledgers. The ledger can be identified using one of three methods: by UUID (ledger_id), by code (ledger_code), or by numeric ID (ledger_num_id). At least one of these identifiers must be provided.

POST/v1/ledgers/entries

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/ledgers/entries" \  -H "Content-Type: application/json" \  -d '{    "amount": 0,    "type": "credit"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "ledger_id": "baa10cc3-8899-4531-a9c5-63cd06cd8d2c",
  "code": "string",
  "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",
  "amount": {
    "amount": "123456",
    "currency": "EUR",
    "precision": 2
  },
  "amount_lcy": {
    "amount": "123456",
    "currency": "EUR",
    "precision": 2
  },
  "type": "credit",
  "event": "string",
  "description": "string",
  "balance": {
    "amount": "123456",
    "currency": "EUR",
    "precision": 2
  },
  "timestamp": "2019-08-24T14:15:22Z",
  "metadata": {},
  "created_at": "2019-08-24T14:15:22Z",
  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4"
}
Empty
Empty
Empty
Empty