Skip to main content

Post Journal Entry

Posts a manual journal entry with multiple debit and credit entries. The system validates that debits equal credits before posting.

Command Name​

PostJournalEntryCommand

Endpoint​

POST /api/core/cmd

Request Parameters​

ParameterTypeRequiredDescription
transactionReferencestringNoCustom reference (auto-generated if omitted)
entriesarrayYesArray of journal entry items (see below)
notesstringNoAdditional notes for the transaction
bookingDatedatetimeYesBooking date for the entries
currencyCodestringYesCurrency code (e.g., "NGN")

Entry Object Structure​

ParameterTypeRequiredDescription
glAccountIdlongYesGeneral ledger account ID
amountdecimalYesAmount for this entry
journalEntryTypeintegerYes1 = Debit, 2 = Credit
branchIdlongNoBranch ID (defaults to user's branch)
referencestringNoEntry-specific reference

Request Example​

{
"Cmd": "PostJournalEntryCommand",
"Data": {
"transactionReference": "ACCRUAL/2024/001",
"bookingDate": "2024-01-31",
"currencyCode": "NGN",
"notes": "Month-end interest accrual",
"entries": [
{
"glAccountId": 150,
"amount": 25000.00,
"journalEntryType": 1,
"branchId": 1,
"reference": "Interest receivable"
},
{
"glAccountId": 420,
"amount": 25000.00,
"journalEntryType": 2,
"reference": "Interest income"
}
]
}
}

Validation Rules​

  1. Balanced Entry: Total debits must equal total credits
  2. Valid GL Accounts: All glAccountId values must exist and be active
  3. Currency Consistency: All entries must use the same currency
  4. Authorization: User must have permission to post journal entries
  5. Date Validation: Booking date cannot be in a closed accounting period

Response Structure​

{
"IsSuccessful": true,
"StatusCode": "00",
"Message": "Journal entry posted successfully.",
"Data": {
"TransactionId": "JT/2024/000790",
"JournalTransactionId": 790,
"BookingDate": "2024-01-31T00:00:00",
"TotalDebits": 25000.00,
"TotalCredits": 25000.00,
"EntriesPosted": 2
}
}

Error Responses​

Unbalanced Entry

{
"IsSuccessful": false,
"StatusCode": "01",
"Message": "Total debits (30000.00) must equal total credits (25000.00)",
"Data": null
}

Invalid GL Account

{
"IsSuccessful": false,
"StatusCode": "02",
"Message": "GL Account with ID 999 not found or inactive",
"Data": null
}

Use Case Example​

Manual expense accrual:

{
"Cmd": "PostJournalEntryCommand",
"Data": {
"transactionReference": "ACCR-UTIL-202401",
"bookingDate": "2024-01-31",
"currencyCode": "NGN",
"notes": "Utilities expense accrual for January",
"entries": [
{
"glAccountId": 510,
"amount": 150000.00,
"journalEntryType": 1,
"reference": "Utilities expense"
},
{
"glAccountId": 220,
"amount": 150000.00,
"journalEntryType": 2,
"reference": "Accrued liabilities"
}
]
}
}