Skip to content

Tenant API v1 — Accounting

Base path: /api/tenant/v1

Middleware: auth:tenant-api, tenant.user, not.suspended, verified, module:accounting, plus can:accounting.*.

Accounts

MethodPathPermission
GET/accountsaccounting.view
GET/accounts/statsaccounting.view
POST/accountsaccounting.create
GET/accounts/{account}accounting.view
PUT/accounts/{account}accounting.update
DELETE/accounts/{account}accounting.delete
POST/accounts/{account}/restoreaccounting.restore
DELETE/accounts/{account}/forceaccounting.force.delete

Create body: code, name, type (asset|liability|equity|revenue|expense), optional parent_id, is_active, is_cash_bank (asset only), description.

List query: optional is_cash_bank=1 for deposit/paid-from pickers. List/show include balance (posted journals, signed by account normal balance).

Listing auto-seeds the starter chart when the tenant has no accounts. Starter Cash 1000 has is_cash_bank=true.

Account balance adjustments

Cash/bank Set balance — posts a delta journal; never writes a stored balance column.

MethodPathPermission
GET/account-balance-adjustmentsaccounting.view
GET/account-balance-adjustments/{accountBalanceAdjustment}accounting.view
POST/accounts/{account}/balance-adjustmentsaccounting.create
POST/account-balance-adjustments/{accountBalanceAdjustment}/voidaccounting.void

Create body: target_balance (required), entry_date, optional offset_account_id (default system Owner Equity 3000), memo, currency. Account must be active cash/bank. delta = target − current; |delta| < 0.01 → 422. Increase: Dr account / Cr offset; decrease: Dr offset / Cr account. Numbers ADJ-#####. List query: optional account_id, status, from, to, search. Void body optional void_reason.

Journal entries

MethodPathPermission
GET/journal-entriesaccounting.view
GET/journal-entries/statsaccounting.view
POST/journal-entriesaccounting.create
GET/journal-entries/{journalEntry}accounting.view
PUT/journal-entries/{journalEntry}accounting.update
DELETE/journal-entries/{journalEntry}accounting.delete
POST/journal-entries/{journalEntry}/restoreaccounting.restore
DELETE/journal-entries/{journalEntry}/forceaccounting.force.delete
POST/journal-entries/{journalEntry}/postaccounting.post
POST/journal-entries/{journalEntry}/voidaccounting.void

Create/update body: entry_date, optional memo, lines[] with account_id, debit, credit, optional memo / sort_order. Lines must balance; each line has debit XOR credit. Draft-only edit/delete. Void body optional void_reason.

Account transfers

MethodPathPermission
GET/account-transfersaccounting.view
GET/account-transfers/statsaccounting.view
POST/account-transfersaccounting.create
GET/account-transfers/{accountTransfer}accounting.view
POST/account-transfers/{accountTransfer}/voidaccounting.void

Create body: from_account_id, to_account_id (distinct active cash/bank accounts), amount, transferred_at, optional currency, reference, memo. Creates and posts a journal (Dr to / Cr from). Status starts posted. Void body optional void_reason — voids the linked journal.

General ledger

GET /general-ledger

Permission: accounting.view.

Query: account_id, from, to.

Response includes opening_balance, closing_balance, and lines (posted only; void excluded).

GET /general-ledger/export

Permission: accounting.view.

Same query as the inquiry endpoint. Streams a CSV download of all matching posted lines (no page-size cap).

Official documentation for the EloSync SaaS Platform.