Journals & Accounts
Manual journal-entry creation and Chart-of-Accounts read access. Lines must balance to the penny — debits = credits.
Journals
GET
/journalsList journal entriesAIBooks.journals.READGET
/journals/{journal_id}Get one (with lines)AIBooks.journals.READPOST
/journalsCreate a manual JEAIBooks.journals.CREATEDELETE
/journals/{journal_id}Delete (a plain manual journal only)AIBooks.journals.DELETECreate a balanced JE
POST /journals
Authorization: Bearer aibk_pat_…
{
"date": "2026-05-12T00:00:00",
"memo": "Year-end depreciation adjustment",
"contact_id": null,
"lines": [
{ "account_id": "acc_depreciation_exp", "debit": 25000, "credit": 0, "description": "Apr-Mar FY26" },
{ "account_id": "acc_accum_depn", "debit": 0, "credit": 25000, "description": "Apr-Mar FY26" }
]
}Validation
- At least 2 lines.
- Total debits must equal total credits (within ₹0.01 tolerance).
- Every
account_idmust exist in this org. - Auto-posted JEs from invoice / bill / payment workflows have source
INVOICE/BILL/PAYMENTand can't be deleted directly — void the source document instead.
Delete
DELETE /journals/{journal_id}works onMANUALjournals only. Any other source returns409 validation.invalid_value.- A
MANUALjournal that is the ledger image of a document is refused too, with409 validation.invalid_value: a credit or debit note's own journal, areversal-orvoid-mirror, andtds-postings. Void the document instead. - Every delete writes one audit-log entry that keeps the deleted lines (account, debit, credit), as Rule 56(9) of the CGST Rules requires.
- If the entry's date is in a closed period it returns
409 period.lockedand nothing is deleted. A soft-closed period also refuses tokens. See Errors. - If a bank-statement line was posted to the entry, the line is unlinked and goes back to
PENDINGso it can be posted again. - Success keeps the same body:
codeis0andmessagesays the entry was deleted.
Accounts
GET
/accountsList active accountsAIBooks.accounts.READGET
/accounts/{account_id}Get one accountAIBooks.accounts.READRead-only. Account types include:
- Assets:
BANK,CASH,ACCOUNTS_RECEIVABLE,STOCK,GST_ASSET,TDS_ASSET, … - Liabilities:
ACCOUNTS_PAYABLE,GST_LIABILITY,TDS_LIABILITY, … - Income:
SALES,INCOME,OTHER_INCOME - Expenses:
EXPENSE,COST_OF_GOODS_SOLD,OTHER_EXPENSE - Equity:
EQUITY,RETAINED_EARNINGS