Skip to main content
GET
/
gst
/
compliance
/
tax-payer
/
invoices
Get Invoices
curl --request GET \
  --url https://api.sandbox.co.in/gst/compliance/tax-payer/invoices \
  --header 'authorization: <authorization>' \
  --header 'x-api-key: <x-api-key>'
import requests

url = "https://api.sandbox.co.in/gst/compliance/tax-payer/invoices"

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/invoices', 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/invoices",
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/invoices"

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/invoices")
.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/invoices")

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": {
      "b2b": [
        {
          "action": "A",
          "camt": 10883.91,
          "cess": 0,
          "hash": "dbd0f1c65631f9fdbfd3ab8d56c2949c3354b688ea53dee44e42768c07b676e2",
          "iamt": 0,
          "idt": "05-11-2024",
          "inum": "AO2SA2425002517",
          "inv_typ": "R",
          "ispendactblocked": "N",
          "pos": "24",
          "rtnprd": "112024",
          "samt": 10883.91,
          "srcfilstatus": "Not Filed",
          "srcform": "R1",
          "stin": "24ABCCU0123M1YZ",
          "txval": 120932.18,
          "val": 142700
        }
      ]
    },
    "status_cd": "1"
  },
  "timestamp": 1763446641000,
  "transaction_id": "fd976f56-b9a9-4012-9504-a351b1f2b7fa"
}

Response body schema

View response body schema

Headers

authorization
string
required

GST taxpayer access token. For token-generation steps, refer to the Generate Taxpayer Session recipe, then pass the token in the authorization header.

x-api-key
string
required

API key for identification

x-api-version
string
default:1.0.0

API version

Query Parameters

section
string
default:b2b
required

Section of the transaction. Possible values: B2B, B2BA, CN, CNA, DN, DNA, ECOM, ECOMA

Example:

"{{section}}"

status
string

Optional filter to fetch invoices of specific status. Possible values: accepted, rejected, pending, no_action_taken

Example:

"no_action_taken"

Response

200 - application/json

200 B2B Invoices / 200 B2B Accepted Invoices

code
number
Example:

200

data
object
timestamp
number
Example:

1763446641000

transaction_id
string
Example:

"661cc68b-0e48-4d39-a744-9afd56895340"