Skip to main content
GET
/
gst
/
compliance
/
tax-payer
/
gstrs
/
gstr-2a
/
ecoma
/
{year}
/
{month}
Get GSTR-2A ECOMA
curl --request GET \
  --url https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-2a/ecoma/{year}/{month} \
  --header 'authorization: <authorization>' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-api-version: <x-api-version>'
import requests

url = "https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-2a/ecoma/{year}/{month}"

headers = {
"x-api-key": "<x-api-key>",
"x-api-version": "<x-api-version>",
"authorization": "<authorization>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {
'x-api-key': '<x-api-key>',
'x-api-version': '<x-api-version>',
authorization: '<authorization>'
}
};

fetch('https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-2a/ecoma/{year}/{month}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-2a/ecoma/{year}/{month}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>",
"x-api-key: <x-api-key>",
"x-api-version: <x-api-version>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-2a/ecoma/{year}/{month}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-version", "<x-api-version>")
req.Header.Add("authorization", "<authorization>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-2a/ecoma/{year}/{month}")
.header("x-api-key", "<x-api-key>")
.header("x-api-version", "<x-api-version>")
.header("authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-2a/ecoma/{year}/{month}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-version"] = '<x-api-version>'
request["authorization"] = '<authorization>'

response = http.request(request)
puts response.read_body
{
  "code": 200,
  "timestamp": 1769775699280,
  "data": {
    "status_cd": "0",
    "error": {
      "message": "No document found for the provided Inputs",
      "error_cd": "RET13509"
    }
  },
  "transaction_id": "800bae5a-0c3b-4dda-b235-9aa20c6f7f31"
}

Response body schema

View response body schema

Headers

x-api-key
string
required
x-api-version
string
required
authorization
string
required

Path Parameters

year
string
required

Year e.g. 2020

month
string
required

Month e.g. 01

Query Parameters

counterparty_gstin
string

optional Counter party GSTIN

from
string

Filter to fetch data from specified date. E.g., 28/01/2025

Response

200 - application/json
code
integer
required
timestamp
integer
required
data
object
required
transaction_id
string
required