All GST return statement API calls
POST /v1/gstr2a/fetch and POST /v1/gstr2b/fetch
GSTR-2A is a live statement that changes as suppliers file and comes as 12 tables. GSTR-2B is one consolidated statement for a month that the GST network generates once. If you want the input tax credit picture for a period, fetch GSTR-2B. If you want the latest supplier filings, or TDS, TCS or import tables, fetch GSTR-2A.
Cost: 2 credits per GSTR-2A table, 3 credits per GSTR-2B statement. Both only on a real success; an error is never charged.
Every call accepts "test_mode": true and returns a sample in the live shape, free. How the connection works before the first real call.
Behaviour: GSTR-2A updates continuously as your suppliers file. GSTR-2B is generated by the GST network once a month and then stays as it is, unless you ask for it to be regenerated.
Shape: GSTR-2A is split into 12 tables, one call each. GSTR-2B is one consolidated statement in one call.
Price: GSTR-2A costs 2 credits per table. GSTR-2B costs 3 credits per statement, and generating or polling it is free.
For a monthly input tax credit check, GSTR-2B is the one call that gives the whole statement. For a running view of what suppliers have filed so far this month, or for TDS, TCS, imports and ISD credits, use GSTR-2A.
Both need the same one-time OTP connection of the GSTIN, and both accept test_mode for a free sample.
| Field | Type | Required | Meaning |
|---|---|---|---|
| gstin | string | Yes | The GSTIN whose statement you want. It must be connected first. |
| ret_period | string | Yes | Return period as MMYYYY, for example 042026. |
| table | string | No | GSTR-2A only: which of the 12 tables. |
| test_mode | boolean | No | true returns a sample in the live shape: free, never reaches the GST network. |
Send your API key in the x-api-key header. The GSTIN is acted on through its connection, so no GST portal password is sent with the call.
The request below runs in test mode, so it is free and files nothing. Remove test_mode for a real call.
curl -X POST "https://www.gstinapi.in/v1/gstr2b/fetch" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{ "gstin": "27ABCDE1234F1Z5", "ret_period": "042026", "test_mode": true }'Response
{
"success": true,
"data": { "gstin": "27ABCDE1234F1Z5", "...": "invoice-level ITC statement" },
"credits_charged": 3,
"billed_to": "paid",
"credits_remaining": 97
}| Code | Message | What to do |
|---|---|---|
| 409 | NOT_CONNECTED | The GSTIN is not connected, or its six-hour connection expired. Reconnect it in the dashboard with a new OTP. Not charged. |
Not affiliated with the Government of India. Rules are the government network's own and can change; if a page here looks out of date, tell us.