Tally API reference
Base URL https://acc.ejiapi.com. Every endpoint returns JSON. The books are a copy kept in sync by the agent on your Tally PC, so every answer also says when that copy was last updated.
Quickstart
- Join the beta. You get the sync agent, a pairing code and an API key that starts with
acc_. - Install the agent on the Tally PC and connect a company (guide).
- Send the key in the
x-api-keyheader.
curl -H "x-api-key: YOUR_KEY" \ "https://acc.ejiapi.com/api/tally/v1/companies/-/ledger?name=Cash"
import requests
r = requests.get("https://acc.ejiapi.com/api/tally/v1/companies/-/ledger",
params={"name": "Cash"}, headers={"x-api-key": "YOUR_KEY"}, timeout=30)
print(r.json()["data"]["balance"])
const res = await fetch("https://acc.ejiapi.com/api/tally/v1/companies/-/ledger?name=Cash",
{ headers: { "x-api-key": "YOUR_KEY" } });
console.log((await res.json()).data.balance);
Authentication
Send your key as the x-api-key header. Accounting keys start with acc_ and are separate from EJI finance keys: a finance key is refused here and an accounting key is refused there. A missing, wrong or revoked key gets 401. A key can be limited to some of your companies; a key for Google Sheets should be limited to one.
Naming a company
Endpoints take the company in the path, /companies/{company}/..., as any of:
- its id from List companies, for example
/companies/12/ledgers; - its name as in Tally, any case, URL-encoded:
/companies/Acme%20%26%20Sons/ledgers; -when your key reads exactly one company:/companies/-/ledgers.
Ledger, group and item names are matched exactly, ignoring case.
Response format
{
"status": "success",
"statusCode": 200,
"message": "Ledger fetched successfully",
"data": { ... },
"syncedAt": 1794480000
}syncedAt is when the agent last uploaded changes for this company (Unix seconds). Dates are ISO YYYY-MM-DD; date parameters also accept 31-03-2026. Leaving out a date means today (India time).
Amounts and signs
A debit balance is positive and a credit balance is negative: Cash 5,000 Dr is 5000, Sales 9,000 Cr is -9000. Where it helps, answers also have side ("Dr" or "Cr") or separate debit and credit columns. Outstanding amounts are the exception: they are positive when the party owes you (receivable) or you owe the party (payable).
Balances are opening balance plus vouchers. Cancelled and optional vouchers are left out. The closing balances of Profit & Loss A/c and of stock ledgers are calculated inside Tally from stock valuation, so they are not computed here; those ledgers are marked computedByTally: true.
Errors
Errors use application/problem+json:
{
"title": "no ledger named 'Csh'",
"status": 404,
"detail": "no ledger named 'Csh'",
"instance": "/api/tally/v1/companies/-/ledger"
}| Status | Meaning |
|---|---|
400 | - used with a key that reads several companies. |
401 | Missing, invalid or revoked key, or a finance key. |
404 | Unknown company (or one your key may not read), ledger, group or item. |
422 | A parameter is malformed, for example a date that does not exist. |
429 | Rate limit or monthly quota reached. The message says which. |
Limits
- Rate limit: 120 requests a minute per key.
- Monthly quota: set per key during the beta. Ask if you need more.
- Freshness: the copy is as fresh as the last sync. The agent syncs every few minutes while Tally is open on your PC.
List companies
/api/tally/v1/companieskeyThe companies your key can read.
[
{ "id": 12, "name": "Acme & Sons", "status": "connected", "syncedAt": 1794480000,
"booksFrom": "2025-04-01", "state": "Rajasthan", "gstin": null }
]One company
/api/tally/v1/companies/{company}keyThe same fields plus counts of ledgers, groups and vouchers and the dates of the first and last voucher.
Groups
/api/tally/v1/companies/{company}/groupskeyEvery group with parent, primaryGroup and nature (Assets, Liabilities, Income, Expenses).
Ledgers
/api/tally/v1/companies/{company}/ledgers?group=&q=&date=keygroup keeps ledgers under that group and its sub-groups. q is a text match on the name. date sets the balance date.
{
"name": "Ravi Traders", "group": "Sundry Debtors", "primaryGroup": "Current Assets", "nature": "Assets",
"opening": 0.0, "closingAtSync": 18400.0, "balance": 18400.0, "side": "Dr",
"gstin": "08ABCDE1234F1Z5", "pan": null, "state": "Rajasthan", "mailingName": "Ravi Traders",
"billWise": true, "creditDays": 30, "computedByTally": false
}closingAtSync is Tally's own closing balance at the last sync; balance is computed on date.
One ledger
/api/tally/v1/companies/{company}/ledger?name=&date=keyA ledger object for one ledger, its balance on date.
Many balances in one call
/api/tally/v1/companies/{company}/balanceskeyBody {"ledgers": ["Cash", "Sales", ...], "date": "2026-03-31"}, up to 500 names. The answer is in the same order. An unknown name gives "balance": null and "error": "no such ledger" for that row instead of failing the call.
Ledger statement
/api/tally/v1/companies/{company}/statement?ledger=&from=&to=keyto defaults to today and from to the start of that financial year (1 April).
{
"ledger": "Ravi Traders", "from": "2026-04-01", "to": "2026-04-30",
"opening": 0.0, "openingSide": "",
"rows": [
{ "date": "2026-04-05", "voucherType": "Sales", "number": "118", "against": "Sales",
"narration": null, "debit": 23600.0, "credit": 0.0, "balance": 23600.0, "side": "Dr" },
{ "date": "2026-04-20", "voucherType": "Receipt", "number": "64", "against": "Cash",
"narration": "part payment", "debit": 0.0, "credit": 5200.0, "balance": 18400.0, "side": "Dr" }
],
"totalDebit": 23600.0, "totalCredit": 5200.0, "closing": 18400.0, "closingSide": "Dr"
}Trial balance
/api/tally/v1/companies/{company}/trial-balance?date=&level=ledger|groupkeyRows with name, primaryGroup, debit, credit, then totalDebit, totalCredit and difference. When opening balances do not net to zero, a row Difference in opening balances is added, as in Tally, and openingDifference gives the amount.
Group total
/api/tally/v1/companies/{company}/group-total?group=&from=&to=keyFor every ledger under the group: opening on from, debit and credit in the period, net (debit minus credit) and closing. Sales for a month is -net of Sales Accounts.
Day book
/api/tally/v1/companies/{company}/daybook?from=&to=&type=&party=&limit=100&offset=0keyVouchers in date order with lines (ledger, debit, credit) and items (item, quantity, unit, rate, amount, godown). type is the voucher type name. limit up to 1,000; total tells you how many there are. Cancelled vouchers are listed with "cancelled": true.
Outstanding bills
/api/tally/v1/companies/{company}/outstanding?side=receivable|payable|auto&party=&date=keyOpen bills of parties under Sundry Debtors (receivable) or Sundry Creditors (payable), from bill-wise details. side=auto with a party picks the side from the party's group. A party with bill-wise details turned off shows its balance as one On Account line, as Tally does.
{
"side": "receivable", "date": "2026-06-01", "total": 18400.0,
"bills": [ { "party": "Ravi Traders", "bill": "118", "billDate": "2026-04-05", "dueDate": "2026-05-05",
"overdueDays": 27, "amount": 18400.0, "onAccount": false } ],
"parties": [ { "party": "Ravi Traders", "amount": 18400.0 } ]
}Stock items
/api/tally/v1/companies/{company}/stock-items?q=keyEvery item with group, unit, hsn, taxability, openingQuantity and closingQuantityAtSync (Tally's closing quantity at the last sync).
Stock movement
/api/tally/v1/companies/{company}/stock-movement?item=&from=&to=keyinwardQuantity, outwardQuantity, inwardValue and outwardValue of one item in the period, from voucher inventory lines.
Tally and TallyPrime are trademarks of Tally Solutions Pvt. Ltd. EJI API is an independent product and is not affiliated with or endorsed by Tally Solutions.