Skip to main content

Reverse Journal Transaction

Reverses an existing journal transaction by creating offsetting entries.

Command Name​

ReverseJournalTransactionCommand

Endpoint​

POST /api/core/cmd

Request Parameters​

ParameterTypeRequiredDescription
transactionIdlongYesID of the transaction to reverse
reasonstringNoReason for reversal
isBackDatedbooleanNoWhether to backdate the reversal
backDateValueDatedatetimeNoValue date for backdated reversal
isBookingDatebooleanNoUse specific booking date
bookingDatedatetimeNoCustom booking date

Request Example​

{
"Cmd": "ReverseJournalTransactionCommand",
"Data": {
"transactionId": 789,
"reason": "Incorrect salary amount posted",
"isBackDated": false
}
}

Business Rules​

  1. Reversal Validation: Cannot reverse an already-reversed transaction
  2. Permission Check: User must have reversal authorization
  3. Period Check: Reversal must be in an open accounting period
  4. Audit Trail: System tracks reversal reason and user
  5. Reference Linking: Reversal transaction is linked to original

Response Structure​

{
"IsSuccessful": true,
"StatusCode": "00",
"Message": "Journal transaction reversed successfully.",
"Data": {
"ReversalTransactionId": "JT/2024/000791",
"ReversalJournalTransactionId": 791,
"OriginalTransactionId": "JT/2024/000789",
"ReversalDate": "2024-01-16T14:20:00",
"Reason": "Incorrect salary amount posted",
"EntriesReversed": 4
}
}

Error Responses​

Already Reversed

{
"IsSuccessful": false,
"StatusCode": "03",
"Message": "Transaction JT/2024/000789 has already been reversed",
"Data": null
}

Transaction Not Found

{
"IsSuccessful": false,
"StatusCode": "02",
"Message": "Journal transaction with ID 999 not found",
"Data": null
}

Use Case Example​

Error correction workflow:

// Step 1: Find the transaction
{
"Cmd": "RetrieveJournalEntriesQuery",
"Data": {
"searchText": "SAL/2024/001",
"pageSize": 10
}
}

// Step 2: Reverse it
{
"Cmd": "ReverseJournalTransactionCommand",
"Data": {
"transactionId": 789,
"reason": "Wrong GL account used - should be 5002 not 5001"
}
}

// Step 3: Post correct entry
{
"Cmd": "PostJournalEntryCommand",
"Data": {
// ... correct entry details
}
}