IntegrationsAccounting & ERP Live

Tally API Gateway

Integration platform for TallyPrime

A modern front door for TallyPrime, so stores, apps, spreadsheets and AI assistants can post entries and pull reports.

Tally API Gateway200 OK · 412 ms
POST /api/v1/sales
{
"party": "Sunrise Distributors",
"date": "2026-10-27",
"items": [{
"name": "Engine Oil 15W40 5L",
"qty": 120, "rate": 1450
}],
"gst": "IGST 18%"
}
Sales · No. 24527-Oct-26
Party: Sunrise DistributorsDr
Engine Oil 15W40 5L × 1201,74,000.00
IGST @ 18%31,320.00
Total₹2,05,320.00
✓ Names matchedIdempotent
86API endpoints
14voucher types
9AI tools for Claude

Overview

Tally only speaks an old XML dialect over a port that freezes when two programs talk to it at once. This gateway puts a clean, secure API in front of it. Other systems send ordinary data, the gateway checks and translates it, and Tally receives exactly what it expects. It also reads reports back out and lets an AI assistant work with Tally in plain English.

Before and after

Before
  • Sales, purchases and payments from other systems were retyped into Tally by hand.
  • Tally rejects entries silently when a ledger name or debit/credit sign is slightly wrong.
  • Tally freezes when two programs call it at the same time.
  • CAs ran GST, ageing and compliance reports one by one, then rebuilt them in Excel.
What I built
  • A REST API with 86 endpoints covering 14 Tally voucher types, masters and reports.
  • Name checks with “did you mean…” suggestions before anything is posted.
  • Bulk import from Excel and CSV, validated as a whole file before the first entry posts.
  • An AI agent and a Claude integration that query and post to Tally through the same safe tools.

How it works

  1. 1

    Request

    An app, sheet or AI assistant sends a sales invoice as plain JSON.

  2. 2

    Check

    Ledger and item names are matched against Tally, with suggestions for typos.

  3. 3

    Translate

    The entry is converted to Tally’s XML with the right debit and credit signs.

  4. 4

    Queue

    Requests go to Tally one at a time, so it never freezes.

  5. 5

    Confirm

    Tally’s reply is verified and returned in plain language.

What it does

Enter once, post automatically

Import and export for 14 voucher types, from sales and purchases to stock journals.

Safe to retry

A retried request returns the original result instead of posting a duplicate voucher.

Reports without clicking through Tally

Trial balance, P&L, balance sheet, ageing and GSTR-1 summary as clean data.

Risky cash transactions flagged

Income-tax cash checks for sections 269SS, 269T, 269ST and 40A(3).

Plain-English assistant

Ask a question or post an entry by typing it; the assistant uses Tally tools, not memory.

Keeps other systems in step

Change tracking, webhooks and Telegram alerts when data in Tally changes.

Under the hood

PythonFastAPIPydanticTallyPrime XMLClaude MCPOpenAI-compatible agentsDockerGitHub Actions
  • Per-instance queues with a bounded wait, returning a clear “busy, retry” instead of hanging.
  • One central place for Tally’s debit/credit rules, so callers just send positive or negative amounts.
  • Raw XML kept for every call, and rejections returned with a list of likely causes.
  • Security hardening: enforced API keys, URL allowlists and injection guards on filters.

Outcome

Entries flow into Tally from other systems without retyping.
Reports CAs need arrive as data, ready for Excel or a dashboard.
AI assistants can work with the books safely, through checked tools.

Want this for your business?

Tell me how your team works today. I’ll tell you how much of it a system like Tally API Gateway could take over.

Chat on WhatsApp