-
Notifications
You must be signed in to change notification settings - Fork 0
Accounting Module
The Accounting module covers chart of accounts, invoicing, payments, wallets, journals, quotes, credit notes, tax rates, fiscal years, currencies, inventory, coupons, insurance, usage-based billing, recurring invoices, and financial reports.
var accounting = essabu.accounting();| Class | Accessor | Description |
|---|---|---|
AccountApi |
accounting.accounts() |
Chart of accounts and balances |
InvoiceApi |
accounting.invoices() |
Invoices, branding, locales |
PaymentApi |
accounting.payments() |
Payments, terms, schedules |
WalletApi |
accounting.wallets() |
Wallets and wallet transactions |
JournalApi |
accounting.journals() |
Journals and journal entries |
QuoteApi |
accounting.quotes() |
Quotes with PDF and conversion |
CreditNoteApi |
accounting.creditNotes() |
Credit notes |
TaxRateApi |
accounting.taxRates() |
Tax rates |
FiscalYearApi |
accounting.fiscalYears() |
Fiscal years and periods |
CurrencyApi |
accounting.currencies() |
Currencies, exchange rates, providers |
InventoryApi |
accounting.inventory() |
Items, suppliers, POs, stock |
CouponApi |
accounting.coupons() |
Discount coupons |
ReportApi |
accounting.reports() |
Financial reports |
ConfigApi |
accounting.config() |
Accounting config and price lists |
InsuranceApi |
accounting.insurance() |
Insurance partners, contracts, claims |
BillingApi |
accounting.billing() |
Usage-based billing |
RecurringInvoiceApi |
accounting.recurringInvoices() |
Recurring invoice templates |
| Method | Endpoint | Description |
|---|---|---|
list(PageRequest) |
GET /api/accounting/accounts |
List chart of accounts |
getById(UUID) |
GET /api/accounting/accounts/{id} |
Get account |
create(Map) |
POST /api/accounting/accounts |
Create account |
update(UUID, Map) |
PUT /api/accounting/accounts/{id} |
Update account |
delete(UUID) |
DELETE /api/accounting/accounts/{id} |
Delete account |
listBalances(PageRequest) |
GET /api/accounting/balances |
List all balances |
getBalance(UUID accountId) |
GET /api/accounting/balances/{accountId} |
Get account balance |
| Method | Endpoint | Description |
|---|---|---|
list(PageRequest) |
GET /api/accounting/invoices |
List invoices |
getById(UUID) |
GET /api/accounting/invoices/{id} |
Get invoice |
create(Map) |
POST /api/accounting/invoices |
Create invoice |
update(UUID, Map) |
PUT /api/accounting/invoices/{id} |
Update invoice |
delete(UUID) |
DELETE /api/accounting/invoices/{id} |
Delete invoice |
finalize(UUID) |
POST /api/accounting/invoices/{id}/finalize |
Finalize invoice |
downloadPdf(UUID) |
GET /api/accounting/invoices/{id}/pdf |
Download PDF |
sendByEmail(UUID, Map) |
POST /api/accounting/invoices/{id}/send |
Send by email |
applyCoupon(UUID, Map) |
POST /api/accounting/invoices/{id}/apply-coupon |
Apply coupon |
getPaymentLink(UUID) |
GET /api/accounting/invoices/{id}/payment-link |
Get payment link |
Map invoice = accounting.invoices().create(Map.of(
"customerId", customerId,
"items", List.of(Map.of("description", "Service", "amount", 100.00))
));
accounting.invoices().finalize(invoiceId);
accounting.invoices().sendByEmail(invoiceId, Map.of("to", "client@example.com"));
byte[] pdf = accounting.invoices().downloadPdf(invoiceId);| Method | Endpoint | Description |
|---|---|---|
list(PageRequest) |
GET /api/accounting/journals |
List journals |
create(Map) |
POST /api/accounting/journals |
Create journal |
listEntries(PageRequest) |
GET /api/accounting/journal-entries |
List entries |
createEntry(Map) |
POST /api/accounting/journal-entries |
Create entry |
Map entry = accounting.journals().createEntry(Map.of(
"journalId", journalId, "date", "2026-03-26",
"lines", List.of(
Map.of("accountId", debitAccountId, "debit", 1000.00),
Map.of("accountId", creditAccountId, "credit", 1000.00)
)
));| Method | Endpoint | Description |
|---|---|---|
list(PageRequest) |
GET /api/accounting/quotes |
List quotes |
create(Map) |
POST /api/accounting/quotes |
Create quote |
convertToInvoice(UUID) |
POST /api/accounting/quotes/{id}/convert-to-invoice |
Convert to invoice |
downloadPdf(UUID) |
GET /api/accounting/quotes/{id}/pdf |
Download PDF |
| Method | Endpoint | Description |
|---|---|---|
getTrialBalance(Map) |
GET /api/accounting/reports/trial-balance |
Trial balance |
getBalanceSheet(Map) |
GET /api/accounting/reports/balance-sheet |
Balance sheet |
getIncomeStatement(Map) |
GET /api/accounting/reports/income-statement |
Income statement |
getCashFlow(Map) |
GET /api/accounting/reports/cash-flow |
Cash flow |
getGeneralLedger(Map) |
GET /api/accounting/reports/general-ledger |
General ledger |
getAgedReceivables(Map) |
GET /api/accounting/reports/aged-receivables |
Aged receivables |
getAgedPayables(Map) |
GET /api/accounting/reports/aged-payables |
Aged payables |
PaymentApi -- Payments, payment terms, payment schedules at /api/accounting/payments, /api/accounting/payment-terms, /api/accounting/payment-schedules.
WalletApi -- Wallets and transactions at /api/accounting/wallets, /api/accounting/wallet-transactions.
FiscalYearApi -- Fiscal years and periods with close operations at /api/accounting/fiscal-years, /api/accounting/periods.
CurrencyApi -- Currencies, exchange rates, and rate providers at /api/accounting/currencies, /api/accounting/exchange-rates, /api/accounting/exchange-rate-providers.
InventoryApi -- Full inventory management: items, suppliers, purchase orders, stock locations, movements, counts, and batches.
InsuranceApi -- Insurance partners, contracts, and claims at /api/accounting/insurance-*.
BillingApi -- Usage-based billing: configs, meters, records, and bill generation at /api/accounting/usage-*.
Standard CRUD: CreditNoteApi, TaxRateApi, CouponApi, RecurringInvoiceApi.
| HTTP Status | Cause |
|---|---|
400 |
Invalid request data |
401 |
Missing or expired authentication token |
403 |
Insufficient permissions |
404 |
Resource not found |
409 |
Conflict (duplicate invoice number) |
422 |
Business rule violation (period already closed) |
Getting Started
Core Concepts
Modules
- HR Module
- Accounting Module
- Identity Module
- Trade Module
- Payment Module
- EInvoice Module
- Project Module
- Asset Module
Resources