Books by finzkoDevelopers

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.READ
GET/journals/{journal_id}Get one (with lines)AIBooks.journals.READ
POST/journalsCreate a manual JEAIBooks.journals.CREATE
DELETE/journals/{journal_id}Delete (a plain manual journal only)AIBooks.journals.DELETE

Create 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_id must exist in this org.
  • Auto-posted JEs from invoice / bill / payment workflows have source INVOICE / BILL / PAYMENT and can't be deleted directly — void the source document instead.

Delete

  • DELETE /journals/{journal_id} works on MANUAL journals only. Any other source returns 409 validation.invalid_value.
  • A MANUAL journal that is the ledger image of a document is refused too, with 409 validation.invalid_value: a credit or debit note's own journal, a reversal- or void- mirror, and tds- 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.locked and 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 PENDING so it can be posted again.
  • Success keeps the same body: code is 0 and message says the entry was deleted.

Accounts

GET/accountsList active accountsAIBooks.accounts.READ
GET/accounts/{account_id}Get one accountAIBooks.accounts.READ

Read-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