All GST return statement API calls

GSTR-2A TDS and TCS API

POST /v1/gstr2a/fetch

Short answer

TDS and TCS are two of the 12 GSTR-2A tables, not separate endpoints. Call the GSTR-2A fetch with table set to tds or tcs, and you get the tax deducted or collected at source that others reported against your GSTIN for the period.

Cost: 2 credits per successful call, the same for every one of the 12 tables. A table that is legitimately empty for the period is still charged, because the lookup was made; 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.

Connect the GSTIN once

These calls act on a GSTIN through a connection you make once in the dashboard, under GST Return Filing. You enter the GSTIN and the GST portal username that is registered as its API user, and the GST portal sends an OTP to the registered mobile number or email.

The connection lasts about six hours. After that the API answers 409 NOT_CONNECTED and you reconnect with a new OTP. One connection covers GSTR-2B, GSTR-2A and the other return calls.

tds and tcs

tds is tax deducted at source: amounts that deductors reported against your GSTIN. tcs is tax collected at source: amounts that e-commerce operators and others reported collecting from you. Send table as tds or tcs; everything else is the same as any other GSTR-2A table.

Expect empty answers

Most GSTINs have no TDS or TCS entries in a given month. The GST network then answers "No document found for the provided Inputs", which this API returns as a successful, empty result. It is still charged 2 credits because the lookup was made.

Request fields

FieldTypeRequiredMeaning
tablestringYestds or tcs.
gstinstringYesThe GSTIN whose statement you want. It must be connected first.
ret_periodstringYesReturn period as MMYYYY, for example 042026.
ctinstringNoOnly entries reported by this GSTIN.
test_modebooleanNotrue 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.

Example

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/gstr2a/fetch" \
  -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{ "table": "tds", "gstin": "27ABCDE1234F1Z5", "ret_period": "042026", "test_mode": true }'

Response

{
  "success": true,
  "table": "tds",
  "data": { "...": "empty when no document was found for the period" },
  "credits_charged": 2,
  "billed_to": "paid",
  "credits_remaining": 93
}

Errors you can expect

CodeMessageWhat to do
409NOT_CONNECTEDThe GSTIN is not connected, or its six-hour connection expired. Reconnect it in the dashboard with a new OTP. Not charged.
RET2B1013 / RET01203GSTIN in request doesnt match with sessionThe GST portal username you connected is not the API user of this GSTIN. It is a username/GSTIN pairing problem, not a missing feature. Reconnect with the right pair.

Questions

Is there a separate TDS/TCS endpoint?
No. They are two values of the table field on the GSTR-2A fetch.
Why did I pay for an empty result?
Because the call reached the GST network and got a real answer: nothing was reported for that period. An error is never charged, an empty answer is.

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.