Skip to content

Gst Returns Download Lite for GSTR-2a#

This API helps to download the data for all GSTR-2a document types

Route

/basic/gstn/{flynn-version}/taxpayerapi/{gstn-api-version}/returns?gstn_ret_type=gstr2a

  • active ‘flynn-version’: v1.0
  • method: GET

URL Parameters#

Name Description Type
flynn-version version of the API
for example, v1.0
string
gstn-api-version as per the version of the GST API Documentation
for example, v3.0
string

Query Parameters#

  • The Query parameter gstn_ret_type should pass mandatorily with value as ‘gstr2a’.
  • Along with this, one need to pass all the required Parameters specified by GSTN portal.
  • Refer to the GSTN Developer Portal for document type specific query parameters.

Headers#

  • EAS required headers
  • Along with these headers, one need to pass all the mandatory headers required for return type as specified by GSTN Developer Portal.
  • GSTN authentication/common headers like clientid, client-secret, username, state-cd, auth-token, ip-usr, txn will be taken care by EAS.

Response#

200#

Successful response will be the same payload as per the ‘GST API Documentation’

Example

{
  "status": "1",
  "data": {
    "b2b": [
      {
        "ctin": "01AABCE2207R1Z5",
        "cfs": "Y",
        "dtcancel": "27-Aug-19",
        "cfs3b": "Y",
        "fldtr1": "12-May-20",
        "flprdr1": "Apr-18",
        "inv": [
          {
            "chksum": "AflJufPlFStqKBZ",
            "inum": "S008400",
            "idt": "24-11-2016",
            "val": 729248.16,
            "pos": "06",
            "rchrg": "N",
            "inv_typ": "R",
            "diff_percent": 0.65,
            "aspd": "Dec-18",
            "atyp": "R",
            "srctyp": "e-Invoice",
            "irn": "897ADG56RTY78956HYUG90BNHHIJK453GFTD99845672FDHHHSHGFH4567FG56TR",
            "irngendate": "24-12-2019",
            "itms": [
              {
                "num": 1,
                "itm_det": {
                  "rt": 5,
                  "txval": 6210.99,
                  "iamt": 0,
                  "camt": 614.44,
                  "samt": 5.68,
                  "csamt": 621.09
                }
              },
              {
                "num": 2,
                "itm_det": {
                  "rt": 28,
                  "txval": 1000.05,
                  "iamt": 0,
                  "camt": 887.44,
                  "samt": 5.68,
                  "csamt": 50.12
                }
              }
            ]
          }
        ]
      }
    ]
  },
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
}
Errors#

Invalid GSTIN Format

{
  "status": "0",
  "data": null,
  "error": {
    "message": "err-invalid-gstin-format",
    "type": "ClientRequest",
    "args": {
      "parameter-name": "gstin"
    }
  },
  "info": null,
  "additionalInfo": null,
  "alert": null
}

Invalid GSTN API Version

{
  "status": "0",
  "data": null,
  "error": {
    "message": "err-invalid-gst-returns-api-version",
    "type": "ClientRequest",
    "args": {
      "version": "v8.0"
    }
  },
  "info": null,
  "additionalInfo": null,
  "alert": null
} 

GSTN Error

{
  "status": "0",
  "data": null,
  "error": {
    "message": "err-gstn-returned-error",
    "type": "Gstn",
    "args": {
      "gstn-err": {
        "status-code": "0",
        "error-code": "RET11402",
        "message": "Unauthorized User"
      }
    }
  },
  "info": null,
  "additionalInfo": null,
  "alert": null
}
Response Status Description
400 Invalid GSTIN format in the request
400 Invalid GSTN API Version
502 Error at GSTN end

Common Errors

click here for other common errors.