Get E-Invoice HSN Summary
curl --request GET \
--url https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/hsn/{year}/{month} \
--header 'authorization: <authorization>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/hsn/{year}/{month}"
headers = {
"authorization": "<authorization>",
"x-api-key": "<x-api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {authorization: '<authorization>', 'x-api-key': '<x-api-key>'}
};
fetch('https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/hsn/{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/e-invoices/hsn/{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>"
],
]);
$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/e-invoices/hsn/{year}/{month}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("x-api-key", "<x-api-key>")
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/e-invoices/hsn/{year}/{month}")
.header("authorization", "<authorization>")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/hsn/{year}/{month}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"data": {
"gstin": "01AABCE2207R1Z5",
"fp": "052020",
"hsn": {
"hsn_b2b": [
{
"num": 1,
"hsn_sc": "2101",
"desc": "MISCELLANEOUS EDIBLE PREPARATIONS~Extracts, essences and concentrates, of coffee, tea or mate and preparations with a basis of these products or with a basis of coffee, tea or mate; roasted chicory and other roasted coffee substitutes, and extracts, essences and concentrates thereof",
"user_desc": "Taxpayer Description",
"uqc": "BDL",
"qty": 12,
"rt": 0.1,
"txval": 1212,
"iamt": 3342,
"camt": 343,
"samt": 24,
"csamt": 423,
"chksum": "fasdflkjwhrkfjshdfua"
}
],
"hsn_b2c": [
{
"num": 1,
"hsn_sc": "1102",
"desc": "CEREAL FLOURS OTHER THAN THAT OF WHEAT OR MESLIN",
"user_desc": "Taxpayer Description",
"uqc": "BDL",
"qty": 10,
"rt": 0.1,
"txval": 4312,
"iamt": 242,
"camt": 643,
"samt": 24,
"csamt": 423,
"chksum": "bnsfsfskfsifi"
}
]
}
},
"status_cd": "1"
},
"timestamp": 1763446641000,
"transaction_id": "5fc1acb2-1fd0-49e8-b6f3-19b60e67009d"
}Get E-Invoice HSN Summary
Get E-Invoice HSN summary for a return period for an authenticated taxpayer.
GET
/
gst
/
compliance
/
tax-payer
/
e-invoices
/
hsn
/
{year}
/
{month}
Get E-Invoice HSN Summary
curl --request GET \
--url https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/hsn/{year}/{month} \
--header 'authorization: <authorization>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/hsn/{year}/{month}"
headers = {
"authorization": "<authorization>",
"x-api-key": "<x-api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {authorization: '<authorization>', 'x-api-key': '<x-api-key>'}
};
fetch('https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/hsn/{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/e-invoices/hsn/{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>"
],
]);
$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/e-invoices/hsn/{year}/{month}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("x-api-key", "<x-api-key>")
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/e-invoices/hsn/{year}/{month}")
.header("authorization", "<authorization>")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/hsn/{year}/{month}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"data": {
"gstin": "01AABCE2207R1Z5",
"fp": "052020",
"hsn": {
"hsn_b2b": [
{
"num": 1,
"hsn_sc": "2101",
"desc": "MISCELLANEOUS EDIBLE PREPARATIONS~Extracts, essences and concentrates, of coffee, tea or mate and preparations with a basis of these products or with a basis of coffee, tea or mate; roasted chicory and other roasted coffee substitutes, and extracts, essences and concentrates thereof",
"user_desc": "Taxpayer Description",
"uqc": "BDL",
"qty": 12,
"rt": 0.1,
"txval": 1212,
"iamt": 3342,
"camt": 343,
"samt": 24,
"csamt": 423,
"chksum": "fasdflkjwhrkfjshdfua"
}
],
"hsn_b2c": [
{
"num": 1,
"hsn_sc": "1102",
"desc": "CEREAL FLOURS OTHER THAN THAT OF WHEAT OR MESLIN",
"user_desc": "Taxpayer Description",
"uqc": "BDL",
"qty": 10,
"rt": 0.1,
"txval": 4312,
"iamt": 242,
"camt": 643,
"samt": 24,
"csamt": 423,
"chksum": "bnsfsfskfsifi"
}
]
}
},
"status_cd": "1"
},
"timestamp": 1763446641000,
"transaction_id": "5fc1acb2-1fd0-49e8-b6f3-19b60e67009d"
}Response body schema
View response body schema
Headers
GST taxpayer access token.
API version.
API key for identification.
Path Parameters
Return period year.
Example:
"2024"
Return period month.
Example:
"05"
Response
200 - application/json
200 Success. The GST portal marks this source API as unencrypted, but the sandbox response is still wrapped in the standard code/data/timestamp/transaction_id envelope.
The response is of type object.
Was this page helpful?
āI