Accounting API
Post and reverse journal entries and read the journal, ledger, trial balance, profit and loss and balance sheet.
Accounting keeps a double-entry ledger. This API posts journal entries, reverses them, and reads the journal, ledger, trial balance and reports. Your chart of accounts is ordinary records of the accounts type, so you create and edit accounts with the Records API.
If the Accounting app is switched off in Settings › Apps, these routes answer 404 NOT_FOUND.
Endpoints
| Method | Path | Permission | What it does |
|---|---|---|---|
POST |
/orgs/{orgId}/accounting/entries |
accounting:post |
Post a journal entry |
GET |
/orgs/{orgId}/accounting/entries |
accounting:read |
List entries |
GET |
/orgs/{orgId}/accounting/entries/{entryId} |
accounting:read |
Get one entry |
POST |
/orgs/{orgId}/accounting/entries/{entryId}/reverse |
accounting:post |
Post a reversing entry |
GET |
/orgs/{orgId}/accounting/trial-balance |
accounting:read |
Totals per account |
GET |
/orgs/{orgId}/accounting/ledger |
accounting:read |
One account's lines with a running balance |
GET |
/orgs/{orgId}/accounting/overview |
accounting:read |
Headline figures for a period |
GET |
/orgs/{orgId}/accounting/reports/profit-loss |
accounting:read |
Profit and loss |
GET |
/orgs/{orgId}/accounting/reports/balance-sheet |
accounting:read |
Balance sheet |
GET |
/orgs/{orgId}/accounting/lock |
accounting:read |
The period lock |
PUT |
/orgs/{orgId}/accounting/lock |
accounting:lock |
Set or clear the period lock |
GET |
/orgs/{orgId}/accounting/year-end-close |
accounting:lock |
Preview a year-end close |
POST |
/orgs/{orgId}/accounting/year-end-close |
accounting:lock |
Close a financial year |
POST |
/orgs/{orgId}/accounting/year-end-close/reopen |
accounting:lock |
Reopen a closed year |
GET |
/orgs/{orgId}/accounting/gst/gstr1 |
accounting:read |
GSTR-1 for a month |
GET |
/orgs/{orgId}/accounting/gst/gstr3b |
accounting:read |
GSTR-3B for a month |
GET |
/orgs/{orgId}/accounting/tds |
accounting:read |
TDS registers |
Reading the chart of accounts, invoices and payments uses records:read, not these permissions.
Rules to know
Important: A posted entry can never be edited or deleted. To correct a mistake, reverse the entry and post a new one.
- An entry has at least 2 and at most 200 lines.
- Each line has either a
debitor acredit, never both and never zero. Amounts are not negative. - Total debits must equal total credits, and the total must be above zero.
- Amounts are exact decimals. Send them as strings, such as
"12500.00". - The largest amount per line is 9,223,372,036,854.
- Reports and the ledger read one currency at a time.
- No entry can be dated on or before the period lock. Such a post is
400 VALIDATION_ERROR("the books are locked through …"). Reversing an entry in a locked period dates the reversal today.
Bank reconciliation is done in the app (Bank reconciliation); entries it posts are ordinary entries.
POST /orgs/{orgId}/accounting/entries
| Field | Type | Required | Notes |
|---|---|---|---|
date |
string | No | YYYY-MM-DD. Today (UTC) if omitted |
memo |
string | No | Up to 500 characters |
source_type |
string | No | Where the entry came from, for example manual (default), invoice or payment |
source_id |
string | No | The id of the invoice or payment record it relates to |
currency |
string | No | An ISO 4217 code. The workspace's default currency if omitted. See below |
lines |
array | Yes | Each line has account_id (an accounts record id), debit or credit, and an optional memo (up to 500 characters) |
curl -s -X POST https://axisiq.co/api/v1/orgs/$ORG/accounting/entries \
-H "Authorization: Bearer $AXIS_KEY" -H "Content-Type: application/json" \
-d '{
"date": "2026-10-04",
"memo": "Invoice INV-1001",
"source_type": "invoice",
"source_id": "0190f0aa-…",
"lines": [
{ "account_id": "0190f001-…", "debit": "12500.00" },
{ "account_id": "0190f002-…", "credit": "12500.00" }
]
}'
Response 201
{
"data": {
"id": "0190f200-…",
"date": "2026-10-04",
"memo": "Invoice INV-1001",
"source_type": "invoice",
"source_id": "0190f0aa-…",
"total": "12500",
"currency": "INR",
"created_at": "2026-10-04T09:30:00Z",
"lines": [
{ "id": "…", "account_id": "0190f001-…", "debit": "12500", "credit": "0", "memo": "" },
{ "id": "…", "account_id": "0190f002-…", "debit": "0", "credit": "12500", "memo": "" }
]
}
}
Errors
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR |
Fewer than 2 lines, unbalanced, a line with both or neither of debit and credit, bad date, bad account id. The message says which, for example entry is unbalanced: debits 100 ≠ credits 90 |
| 403 | FORBIDDEN |
The role lacks accounting:post |
Currencies. A workspace that has not been upgraded for multi-currency keeps its books in its default currency only, and posting a different currency is a 400 VALIDATION_ERROR that says so. After the upgrade (the workspace owner does this in Settings), each entry has its own currency.
GET /orgs/{orgId}/accounting/entries
| Parameter | Notes |
|---|---|
from, to |
YYYY-MM-DD, both inclusive. Either may be left out |
account |
Only entries that touch this account id |
status |
active, reversed (has been reversed) or reversal (is itself a reversing entry) |
currency |
One currency code |
limit |
Default 50, maximum 200 |
offset |
Start position |
Returns { "entries": [ … ], "total": 312 }, newest first. Entries in a list also carry reversed_by when they have been reversed.
POST /orgs/{orgId}/accounting/entries/{entryId}/reverse
Posts a new entry with every debit and credit swapped, with the original's date and currency and a memo starting "Reversal of", linked to the original through reverses. No body. Response 201 with the new entry. An entry can be reversed once: reversing it again is 400 VALIDATION_ERROR ("entry has already been reversed").
GET /orgs/{orgId}/accounting/trial-balance
Optional currency.
{
"data": {
"rows": [ { "account_id": "0190f001-…", "debit": "12500", "credit": "0", "balance": "12500" } ],
"currency": "INR",
"currencies": ["INR"]
}
}
GET /orgs/{orgId}/accounting/ledger
account (required, an account id), optional from, to, currency.
{
"data": {
"rows": [ { "entry_id": "…", "date": "2026-10-04", "memo": "Invoice INV-1001", "debit": "12500", "credit": "0", "balance": "12500" } ],
"opening": "0",
"closing": "12500",
"currency": "INR",
"currencies": ["INR"]
}
}
opening is the balance before from. balance is running.
GET /orgs/{orgId}/accounting/overview
Optional from and to (default: this month to today), cash_accounts (comma-separated account ids to count as cash) and currency. Returns revenue, expense, net, cash, unclassified, entry_count, the 10 latest entries as recent, a 12-month months series, and idle_accounts.
GET /orgs/{orgId}/accounting/reports/profit-loss
Optional from, to (default: this year to date) and currency. Returns revenue, expense and unclassified sections, each { kind, rows: [{ account_id, code, name, amount }], total }, and net.
GET /orgs/{orgId}/accounting/reports/balance-sheet
Optional as_of (default today) and currency. Returns assets, liabilities, equity and unclassified sections, earnings, and balanced (true when assets equal liabilities plus equity).
The period lock
GET …/accounting/lock returns:
{ "data": { "available": true, "locked_through": "2026-09-30", "set_by": "0190f0…", "set_at": "2026-10-11T06:12:00Z" } }
locked_through is null when the books are open. available is false when the workspace has not taken the update that adds the lock.
PUT …/accounting/lock with { "locked_through": "2026-09-30" } sets it, and { "locked_through": null } clears it. The date cannot be in the future. Response 200 with the same object. Every change is audited.
Year-end close
GET …/accounting/year-end-close?fiscal_year_end=2026-03-31previews the close: per currency the income, expenses and net that would move to Retained Earnings, and the closes already made.POST …/accounting/year-end-closewith{ "fiscal_year_end": "2026-03-31" }posts one closing entry per currency dated that day (every income and expense account to zero, the net to Retained Earnings) and locks the books through it. Refused when the year is already closed, when the books are already locked through that day, or when there is nothing to close.POST …/accounting/year-end-close/reopenwith the same body reverses the closing entries and restores the earlier lock. Refused while a later lock exists.
Profit and loss reports leave closing entries out, so a closed year still shows its result.
GST returns
GET …/accounting/gst/gstr1?period=2026-09 and GET …/accounting/gst/gstr3b?period=2026-09 build the return from issued documents of GST document types dated in that month. Optional seller picks the GSTIN when you have several; the response lists them in sellers.
format |
Returns |
|---|---|
| (none) | The report as JSON |
portal |
GSTR-1 only: the offline-tool JSON (B2B, B2CL, B2CS, CDNR, CDNUR, EXP, documents issued) |
xlsx |
Every table as an Excel workbook |
csv |
One table as CSV; pick it with section |
TDS registers
GET …/accounting/tds?side=deducted&from=2026-04-01&to=2026-09-30 lists TDS deducted on issued supplier bills (side=deducted) or deducted by customers on your invoices (side=received), with a summary by month and section. Add format=csv for a CSV file.
Related
- Records: the chart of accounts, invoices and payments are records
- Payments
- In the product: Accounting