Poll Job
curl --request GET \
--url https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/{year}/{month}/purchases \
--header 'authorization: <authorization>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/{year}/{month}/purchases"
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/{year}/{month}/purchases', 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/{year}/{month}/purchases",
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/{year}/{month}/purchases"
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/{year}/{month}/purchases")
.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/{year}/{month}/purchases")
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": {
"@entity": "in.co.sandbox.gst.compliance.e-invoice.list.job",
"created_at": 1763446641000,
"e-invoice_list_url": "https://in-co-sandbox-gst-compliance-e-invoice-list-test.s3.ap-south-1.amazonaws.com/29AAACQ3770E000/2024/10/a12ba94e-800e-4fde-a984-1c598196e7eb/e-invoice_list.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241114T130428Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86399&X-Amz-Credential=EXAMPLEACCESSKEY%2F20241114%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Signature=EXAMPLE_SIGNATURE",
"job_id": "412a22ee-2096-4ead-b06b-55143f560903",
"month": "10",
"recipient_gstin": "29AAACQ3770E000",
"status": "succeeded",
"supply_type": "B2B",
"updated_at": 1763446641000,
"year": "2024"
},
"timestamp": 1763446641000,
"transaction_id": "e7512543-c7c8-40b3-a5c6-10a779490ec6"
}List Purchase E-Invoices Job Status
Poll with job id to get a signed url to list of purchase e-Invoice details for the specified return period.
GET
/
gst
/
compliance
/
tax-payer
/
e-invoices
/
{year}
/
{month}
/
purchases
Poll Job
curl --request GET \
--url https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/{year}/{month}/purchases \
--header 'authorization: <authorization>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.sandbox.co.in/gst/compliance/tax-payer/e-invoices/{year}/{month}/purchases"
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/{year}/{month}/purchases', 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/{year}/{month}/purchases",
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/{year}/{month}/purchases"
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/{year}/{month}/purchases")
.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/{year}/{month}/purchases")
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": {
"@entity": "in.co.sandbox.gst.compliance.e-invoice.list.job",
"created_at": 1763446641000,
"e-invoice_list_url": "https://in-co-sandbox-gst-compliance-e-invoice-list-test.s3.ap-south-1.amazonaws.com/29AAACQ3770E000/2024/10/a12ba94e-800e-4fde-a984-1c598196e7eb/e-invoice_list.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241114T130428Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86399&X-Amz-Credential=EXAMPLEACCESSKEY%2F20241114%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Signature=EXAMPLE_SIGNATURE",
"job_id": "412a22ee-2096-4ead-b06b-55143f560903",
"month": "10",
"recipient_gstin": "29AAACQ3770E000",
"status": "succeeded",
"supply_type": "B2B",
"updated_at": 1763446641000,
"year": "2024"
},
"timestamp": 1763446641000,
"transaction_id": "e7512543-c7c8-40b3-a5c6-10a779490ec6"
}Headers
GST taxpayer access token. For token-generation steps, refer to the Generate Taxpayer Session recipe, then pass the token in the authorization header.
API version
API key for identification
Query Parameters
Job id
Example:
"{{job_id}}"
Was this page helpful?
āI