Reverse Journal Transaction
Reverses an existing journal transaction by creating offsetting entries.
Command Name
ReverseJournalTransactionCommand
Endpoint
POST /api/core/cmd
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
transactionId | long | Yes | ID of the transaction to reverse |
reason | string | No | Reason for reversal |
isBackDated | boolean | No | Whether to backdate the reversal |
backDateValueDate | datetime | No | Value date for backdated reversal |
isBookingDate | boolean | No | Use specific booking date |
bookingDate | datetime | No | Custom booking date |
Request Example
{
"Cmd": "ReverseJournalTransactionCommand",
"Data": {
"transactionId": 789,
"reason": "Incorrect salary amount posted",
"isBackDated": false
}
}
Business Rules
- Reversal Validation: Cannot reverse an already-reversed transaction
- Permission Check: User must have reversal authorization
- Period Check: Reversal must be in an open accounting period
- Audit Trail: System tracks reversal reason and user
- 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
}
}