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

  1. Join the beta. You get the sync agent, a pairing code and an API key that starts with acc_.
  2. Install the agent on the Tally PC and connect a company (guide).
  3. Send the key in the x-api-key header.
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);
Keep your key on a server or in Apps Script properties. Never put it in a web page or app that other people can open: it reads your books.

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:

Ledger, group and item names are matched exactly, ignoring case.

Response format

200 OK
{
  "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:

404 Not Found
{
  "title": "no ledger named 'Csh'",
  "status": 404,
  "detail": "no ledger named 'Csh'",
  "instance": "/api/tally/v1/companies/-/ledger"
}
StatusMeaning
400- used with a key that reads several companies.
401Missing, invalid or revoked key, or a finance key.
404Unknown company (or one your key may not read), ledger, group or item.
422A parameter is malformed, for example a date that does not exist.
429Rate limit or monthly quota reached. The message says which.

Limits

List companies

GET/api/tally/v1/companieskey

The companies your key can read.

data
[
  { "id": 12, "name": "Acme & Sons", "status": "connected", "syncedAt": 1794480000,
    "booksFrom": "2025-04-01", "state": "Rajasthan", "gstin": null }
]

One company

GET/api/tally/v1/companies/{company}key

The same fields plus counts of ledgers, groups and vouchers and the dates of the first and last voucher.

Groups

GET/api/tally/v1/companies/{company}/groupskey

Every group with parent, primaryGroup and nature (Assets, Liabilities, Income, Expenses).

Ledgers

GET/api/tally/v1/companies/{company}/ledgers?group=&q=&date=key

group keeps ledgers under that group and its sub-groups. q is a text match on the name. date sets the balance date.

Ledger object
{
  "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

GET/api/tally/v1/companies/{company}/ledger?name=&date=key

A ledger object for one ledger, its balance on date.

Many balances in one call

POST/api/tally/v1/companies/{company}/balanceskey

Body {"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

GET/api/tally/v1/companies/{company}/statement?ledger=&from=&to=key

to defaults to today and from to the start of that financial year (1 April).

data
{
  "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

GET/api/tally/v1/companies/{company}/trial-balance?date=&level=ledger|groupkey

Rows 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

GET/api/tally/v1/companies/{company}/group-total?group=&from=&to=key

For 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

GET/api/tally/v1/companies/{company}/daybook?from=&to=&type=&party=&limit=100&offset=0key

Vouchers 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

GET/api/tally/v1/companies/{company}/outstanding?side=receivable|payable|auto&party=&date=key

Open 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.

data
{
  "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

GET/api/tally/v1/companies/{company}/stock-items?q=key

Every item with group, unit, hsn, taxability, openingQuantity and closingQuantityAtSync (Tally's closing quantity at the last sync).

Stock movement

GET/api/tally/v1/companies/{company}/stock-movement?item=&from=&to=key

inwardQuantity, 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.