Get GSTR-1 ECOM
curl --request GET \
--url https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-1/ecom/{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-1/ecom/{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-1/ecom/{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-1/ecom/{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-1/ecom/{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-1/ecom/{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-1/ecom/{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{
"transaction_id": "41bb8041-fb83-4654-8d75-85a19f329158",
"code": 200,
"data": {
"status_cd": "0",
"error": {
"message": "No document found in selected financial year. Either this document exists in a different financial year or the document number might have been amended earlier. Search with latest amended document.",
"error_cd": "RET11417"
}
},
"timestamp": 1776921876217
}GSTR-1 ECOM
Get e-commerce details for a return period for authenticated taxpayer
GET
/
gst
/
compliance
/
tax-payer
/
gstrs
/
gstr-1
/
ecom
/
{year}
/
{month}
Get GSTR-1 ECOM
curl --request GET \
--url https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-1/ecom/{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-1/ecom/{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-1/ecom/{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-1/ecom/{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-1/ecom/{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-1/ecom/{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-1/ecom/{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{
"transaction_id": "41bb8041-fb83-4654-8d75-85a19f329158",
"code": 200,
"data": {
"status_cd": "0",
"error": {
"message": "No document found in selected financial year. Either this document exists in a different financial year or the document number might have been amended earlier. Search with latest amended document.",
"error_cd": "RET11417"
}
},
"timestamp": 1776921876217
}Response schema
For successful responses, these resources describe the GSTN payload atdata.data.
View JSON schema
View Excel field reference
Headers
Public key required to authorize API access.
Was this page helpful?
āI