GSTN GET Call
URL#
Refer to API Ecosystem and NIC API document to form the correct URL.
The below example is provided for version: v2.2
The HTTP method required is: GET
The endpoint you shall be accessing is: <base_url>/gus/taxpayerapi/v2.2/returns/gstr1
Headers#
The headers will look somewhat like follows.
Name | Value |
---|---|
clientid | <your-client-id> |
client-secret | <your-client-secret> |
state-cd | <first-two-digits-of-your-gstin> |
ip-usr | XXX.XXX.XXX.XXX |
txn | <random-transaction-id> |
Content-Type | application/json |
X-Asp-Auth-Token | <your-X-Asp-Auth-Token> |
X-Asp-Auth-Signature | <your-X-Asp-Auth-Signature> |
Note that the details of how to construct the X-Asp-Auth-Token is covered in greater details in building-a-vayana-gsp-auth-token
Response payload#
To Understand how Response payloads should be, refer to GST Developer Portal
{
"b2b": [
{
"ctin": "01AABCE2207R1Z5",
"cfs": "Y",
"inv": [
{
"chksum": "BBUIBUIUIJKKBJKGUYFTFGUY",
"updby": "S",
"inum": "S008400",
"idt": "24-11-2016",
"val": 729248.16,
"pos": "06",
"rchrg": "N",
"etin": "01AABCE5507R1Z4",
"inv_typ": "R",
"cflag": "N",
"diff_percent": 0.65,
"opd": "2016-12",
"itms": [
{
"num": 1,
"itm_det": {
"rt": 5,
"txval": 10000,
"iamt": 325,
"camt": 0,
"samt": 0,
"csamt": 10
}
}
]
}
]
}
]
}
Note#
In case of any error desired result will not be accepted as above .Here are some few error codes in case of any such error found =>
RET11400 Header Value Missing
RET11403 Invalid API Request
RET11402 Unauthorized User
RET11404 State Code is not valid
RET11409 Username is not Valid
Also to view the full list of error codes , Please visit GST Developer Portal