Journal Entries API
The Journal Entries API provides comprehensive endpoints for creating and managing journal entries with support for multi-level approval workflows, posting, and reversal.
Base Path
All endpoints require authentication with a valid session token.
Entry Workflow
Journal entries follow a structured workflow:
Draft - Initial creation, can be edited or deleted
Pending Approval - Submitted for review (optional)
Approved - Ready for posting
Posted - Locked, affects account balances
Reversed - Posted entry that has been reversed
List Journal Entries
Retrieve a paginated list of journal entries with comprehensive filtering.
GET /api/v1/journal-entries
curl -X GET "https://your-instance.accountability.app/api/v1/journal-entries?organizationId={orgId}&companyId={companyId}&status=Posted&limit=50" \
-H "Authorization: Bearer your-session-token"
Filter by status: Draft, PendingApproval, Approved, Posted, Reversed
Filter by type: Standard, Adjusting, Closing, Reversing, Recurring
Filter by source: GeneralLedger, AccountsPayable, AccountsReceivable, Payroll, Inventory, FixedAssets
Filter by fiscal year (e.g., 2025)
Filter by fiscal period (1-13)
Filter by transaction date start (ISO 8601: YYYY-MM-DD)
Filter by transaction date end (ISO 8601: YYYY-MM-DD)
{
"entries" : [
{
"id" : "je_123e4567-e89b-12d3-a456-426614174000" ,
"organizationId" : "org_123e4567-e89b-12d3-a456-426614174000" ,
"companyId" : "comp_123e4567-e89b-12d3-a456-426614174000" ,
"description" : "Monthly rent payment" ,
"transactionDate" : "2025-03-01" ,
"documentDate" : "2025-03-01" ,
"fiscalPeriod" : { "year" : 2025 , "period" : 3 },
"entryType" : "Standard" ,
"sourceModule" : "AccountsPayable" ,
"referenceNumber" : "AP-2025-0315" ,
"sourceDocumentRef" : "INV-98765" ,
"status" : "Posted" ,
"createdBy" : "user_123e4567-e89b-12d3-a456-426614174000" ,
"postedBy" : "user_123e4567-e89b-12d3-a456-426614174000" ,
"postedAt" : "2025-03-01T15:30:00Z" ,
"createdAt" : "2025-03-01T14:00:00Z" ,
"updatedAt" : "2025-03-01T15:30:00Z"
}
],
"total" : 1247 ,
"limit" : 50 ,
"offset" : 0
}
Get Journal Entry
Retrieve a single journal entry with all its line items.
GET /api/v1/journal-entries/{id}
curl -X GET "https://your-instance.accountability.app/api/v1/journal-entries/{entryId}?organizationId={orgId}" \
-H "Authorization: Bearer your-session-token"
{
"entry" : {
"id" : "je_123e4567-e89b-12d3-a456-426614174000" ,
"organizationId" : "org_123e4567-e89b-12d3-a456-426614174000" ,
"companyId" : "comp_123e4567-e89b-12d3-a456-426614174000" ,
"description" : "Monthly rent payment" ,
"transactionDate" : "2025-03-01" ,
"documentDate" : "2025-03-01" ,
"fiscalPeriod" : { "year" : 2025 , "period" : 3 },
"entryType" : "Standard" ,
"sourceModule" : "AccountsPayable" ,
"referenceNumber" : "AP-2025-0315" ,
"sourceDocumentRef" : "INV-98765" ,
"status" : "Posted" ,
"createdBy" : "user_123e4567-e89b-12d3-a456-426614174000" ,
"postedBy" : "user_123e4567-e89b-12d3-a456-426614174000" ,
"postedAt" : "2025-03-01T15:30:00Z" ,
"createdAt" : "2025-03-01T14:00:00Z" ,
"updatedAt" : "2025-03-01T15:30:00Z"
},
"lines" : [
{
"id" : "jel_123e4567-e89b-12d3-a456-426614174000" ,
"journalEntryId" : "je_123e4567-e89b-12d3-a456-426614174000" ,
"lineNumber" : 1 ,
"accountId" : "acc_5010" ,
"debitAmount" : { "value" : "5000.00" , "currency" : "USD" },
"creditAmount" : null ,
"memo" : "Office rent - March 2025" ,
"dimensions" : null ,
"intercompanyPartnerId" : null
},
{
"id" : "jel_987e6543-e21b-12d3-a456-426614174000" ,
"journalEntryId" : "je_123e4567-e89b-12d3-a456-426614174000" ,
"lineNumber" : 2 ,
"accountId" : "acc_1010" ,
"debitAmount" : null ,
"creditAmount" : { "value" : "5000.00" , "currency" : "USD" },
"memo" : "Cash payment" ,
"dimensions" : null ,
"intercompanyPartnerId" : null
}
]
}
Create Journal Entry
Create a new journal entry in draft status. Entries must have at least 2 lines and debits must equal credits.
POST /api/v1/journal-entries
curl -X POST "https://your-instance.accountability.app/api/v1/journal-entries" \
-H "Authorization: Bearer your-session-token" \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_123e4567-e89b-12d3-a456-426614174000",
"companyId": "comp_123e4567-e89b-12d3-a456-426614174000",
"description": "Monthly rent payment",
"transactionDate": "2025-03-01",
"documentDate": "2025-03-01",
"fiscalPeriod": null,
"entryType": "Standard",
"sourceModule": "GeneralLedger",
"referenceNumber": "JE-2025-0001",
"sourceDocumentRef": null,
"lines": [
{
"accountId": "acc_5010",
"debitAmount": { "value": "5000.00", "currency": "USD" },
"creditAmount": null,
"memo": "Office rent - March 2025",
"dimensions": null,
"intercompanyPartnerId": null
},
{
"accountId": "acc_1010",
"debitAmount": null,
"creditAmount": { "value": "5000.00", "currency": "USD" },
"memo": "Cash payment",
"dimensions": null,
"intercompanyPartnerId": null
}
]
}'
Transaction date (ISO 8601: YYYY-MM-DD)
Document date if different from transaction date
Fiscal period reference (auto-computed from transactionDate if null)
year: integer
period: integer (1-13)
Entry type: Standard, Adjusting, Closing, Reversing, Recurring
Source module: GeneralLedger, AccountsPayable, AccountsReceivable, Payroll, Inventory, FixedAssets
Optional reference number
Optional source document reference
Array of journal entry lines (minimum 2) Each line must have:
accountId (string, required): Account UUID
debitAmount (MonetaryAmount | null): Debit amount
creditAmount (MonetaryAmount | null): Credit amount
memo (string): Optional line memo
dimensions (object): Optional key-value pairs for dimensions
intercompanyPartnerId (string): Optional related company UUID
Either debitAmount or creditAmount must be provided for each line, but not both. Total debits must equal total credits.
Update Journal Entry
Update a draft journal entry. Only entries in Draft status can be updated.
PUT /api/v1/journal-entries/{id}
curl -X PUT "https://your-instance.accountability.app/api/v1/journal-entries/{entryId}" \
-H "Authorization: Bearer your-session-token" \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_123e4567-e89b-12d3-a456-426614174000",
"description": "Updated description",
"transactionDate": "2025-03-02"
}'
All fields are optional - only provided fields will be updated.
Delete Journal Entry
Delete a draft journal entry. Only entries in Draft status can be deleted.
DELETE /api/v1/journal-entries/{id}
curl -X DELETE "https://your-instance.accountability.app/api/v1/journal-entries/{entryId}?organizationId={orgId}" \
-H "Authorization: Bearer your-session-token"
Submit for Approval
Submit a draft entry for approval (changes status from Draft to PendingApproval).
POST /api/v1/journal-entries/{id}/submit
curl -X POST "https://your-instance.accountability.app/api/v1/journal-entries/{entryId}/submit?organizationId={orgId}" \
-H "Authorization: Bearer your-session-token"
Approve Journal Entry
Approve a pending entry (changes status from PendingApproval to Approved).
POST /api/v1/journal-entries/{id}/approve
curl -X POST "https://your-instance.accountability.app/api/v1/journal-entries/{entryId}/approve?organizationId={orgId}" \
-H "Authorization: Bearer your-session-token"
Reject Journal Entry
Reject a pending entry and return to draft for corrections.
POST /api/v1/journal-entries/{id}/reject
curl -X POST "https://your-instance.accountability.app/api/v1/journal-entries/{entryId}/reject?organizationId={orgId}" \
-H "Authorization: Bearer your-session-token" \
-H "Content-Type: application/json" \
-d '{
"reason": "Missing supporting documentation"
}'
Optional reason for rejection
Post Journal Entry
Post an approved entry to the general ledger. This updates account balances and locks the entry.
POST /api/v1/journal-entries/{id}/post
curl -X POST "https://your-instance.accountability.app/api/v1/journal-entries/{entryId}/post" \
-H "Authorization: Bearer your-session-token" \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_123e4567-e89b-12d3-a456-426614174000",
"postedBy": "user_123e4567-e89b-12d3-a456-426614174000",
"postingDate": "2025-03-15"
}'
User UUID who is posting the entry
Optional posting date (defaults to current date)
Posting is irreversible (entries can only be reversed, not deleted). Posting updates all affected account balances.
Reverse Journal Entry
Reverse a posted entry by creating a new entry with opposite debits and credits.
POST /api/v1/journal-entries/{id}/reverse
curl -X POST "https://your-instance.accountability.app/api/v1/journal-entries/{entryId}/reverse" \
-H "Authorization: Bearer your-session-token" \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_123e4567-e89b-12d3-a456-426614174000",
"reversalDate": "2025-03-20",
"reversalDescription": "Reversal of incorrect entry",
"reversedBy": "user_123e4567-e89b-12d3-a456-426614174000"
}'
Date for the reversal entry (ISO 8601: YYYY-MM-DD)
Optional description for the reversal entry
User UUID who is reversing the entry
Error Responses
{
"_tag" : "JournalEntryNotFoundError" ,
"journalEntryId" : "je_123e4567-e89b-12d3-a456-426614174000" ,
"message" : "Journal entry not found"
}
{
"_tag" : "UnbalancedJournalEntryError" ,
"totalDebits" : "5000.00" ,
"totalCredits" : "4500.00" ,
"difference" : "500.00" ,
"message" : "Journal entry is unbalanced: debits must equal credits"
}
Invalid Status Transition (400)
{
"_tag" : "JournalEntryStatusError" ,
"currentStatus" : "Posted" ,
"attemptedAction" : "Update" ,
"message" : "Cannot update a Posted journal entry"
}
Fiscal Period Closed (400)
{
"_tag" : "FiscalPeriodClosedError" ,
"fiscalYear" : 2025 ,
"fiscalPeriod" : 2 ,
"message" : "Fiscal period 2025-02 is closed and does not allow journal entries"
}
{
"_tag" : "JournalEntryAlreadyReversedError" ,
"journalEntryId" : "je_123e4567-e89b-12d3-a456-426614174000" ,
"reversedAt" : "2025-03-15T10:30:00Z" ,
"message" : "Journal entry has already been reversed"
}