Accounting
Endpoints for managing journal entries, chart of accounts, accounting periods, and account determination rules.
Journal entries
List entries
GET /journal-entries| Parameter | Type | Description |
|---|---|---|
page | number | Page (default: 1) |
limit | number | Records per page (default: 50) |
startDate | string | Start date (YYYY-MM-DD) |
endDate | string | End date (YYYY-MM-DD) |
status | string | posted, draft, reversed |
entryType | string | automatic, manual, reversal |
Get entry by ID
GET /journal-entries/:idCreate manual entry
POST /journal-entriesjson
{
"date": "2026-04-16",
"description": "Accounting adjustment",
"lines": [
{
"chartOfAccountId": 1,
"debit": 1000.00,
"credit": 0,
"lineDescription": "Debit to cash"
},
{
"chartOfAccountId": 2,
"debit": 0,
"credit": 1000.00,
"lineDescription": "Credit to revenue"
}
]
}Balance validation
Total debits must equal total credits. Otherwise the API returns a 400 error.
Post draft entry
POST /journal-entries/:id/postReverse entry
POST /journal-entries/:id/reverseCreates a new entry with inverted debits/credits and marks the original as reversed.
Print entry
POST /journal-entries/:id/printReturns a PDF of the journal entry.
General ledger
Query ledger
GET /journal-entries/ledger| Parameter | Type | Description |
|---|---|---|
chartOfAccountId | number | Chart of account ID |
startDate | string | Start date |
endDate | string | End date |
Chart of accounts
List accounts
GET /chart-of-accountsCreate account
POST /chart-of-accountsUpdate account
PUT /chart-of-accounts/:idRemoving chart accounts
Only from the web app; API keys cannot use DELETE on the chart of accounts.
Import default chart
POST /chart-of-accounts/import-defaultAccounting periods
List periods
GET /accounting-periodsCreate period
POST /accounting-periodsClose period
POST /accounting-periods/:id/closeReopen period
POST /accounting-periods/:id/reopenAccount determination rules
List rules
GET /account-determination-rulesCreate / update rule
POST /account-determination-rulesResolve account
POST /account-determination-rules/resolveAutomatic journal entries
Entries are automatically created for these events:
| Event | Entry type |
|---|---|
| Create sales invoice (01, 113) | A/R + Revenue + Tax |
| Create purchase invoice (103, 105, 106) | Expense + Tax + A/P |
| Confirm purchase doc. (auto-capture flow) | Deferred until confirmation |
| Register payment | Bank/Cash + A/R or A/P |
| Cancel document | Reversal of original entry |
| Cancel payment | Reversal of payment entry |