Skip to main content

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

/api/v1/journal-entries
All endpoints require authentication with a valid session token.

Entry Workflow

Journal entries follow a structured workflow:
  1. Draft - Initial creation, can be edited or deleted
  2. Pending Approval - Submitted for review (optional)
  3. Approved - Ready for posting
  4. Posted - Locked, affects account balances
  5. 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"
organizationId
string
required
Organization UUID
companyId
string
required
Company UUID
status
enum
Filter by status: Draft, PendingApproval, Approved, Posted, Reversed
entryType
enum
Filter by type: Standard, Adjusting, Closing, Reversing, Recurring
sourceModule
enum
Filter by source: GeneralLedger, AccountsPayable, AccountsReceivable, Payroll, Inventory, FixedAssets
fiscalYear
integer
Filter by fiscal year (e.g., 2025)
fiscalPeriod
integer
Filter by fiscal period (1-13)
fromDate
string
Filter by transaction date start (ISO 8601: YYYY-MM-DD)
toDate
string
Filter by transaction date end (ISO 8601: YYYY-MM-DD)
limit
integer
default:"50"
Maximum items per page
offset
integer
default:"0"
Number of items to skip
{
  "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"
id
string
required
Journal entry UUID
organizationId
string
required
Organization UUID
{
  "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
      }
    ]
  }'
organizationId
string
required
Organization UUID
companyId
string
required
Company UUID
description
string
required
Entry description
transactionDate
string
required
Transaction date (ISO 8601: YYYY-MM-DD)
documentDate
string
Document date if different from transaction date
fiscalPeriod
object
Fiscal period reference (auto-computed from transactionDate if null)
  • year: integer
  • period: integer (1-13)
entryType
enum
required
Entry type: Standard, Adjusting, Closing, Reversing, Recurring
sourceModule
enum
required
Source module: GeneralLedger, AccountsPayable, AccountsReceivable, Payroll, Inventory, FixedAssets
referenceNumber
string
Optional reference number
sourceDocumentRef
string
Optional source document reference
lines
array
required
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"
  }'
id
string
required
Journal entry UUID
organizationId
string
required
Organization UUID
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"
  }'
reason
string
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"
  }'
organizationId
string
required
Organization UUID
postedBy
string
required
User UUID who is posting the entry
postingDate
string
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"
  }'
organizationId
string
required
Organization UUID
reversalDate
string
required
Date for the reversal entry (ISO 8601: YYYY-MM-DD)
reversalDescription
string
Optional description for the reversal entry
reversedBy
string
required
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"
}
{
  "_tag": "JournalEntryStatusError",
  "currentStatus": "Posted",
  "attemptedAction": "Update",
  "message": "Cannot update a Posted journal entry"
}
{
  "_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"
}

Build docs developers (and LLMs) love