JSON Formatter for Indian GST APIs

Developers integrating with India's GST (Goods and Services Tax) systems — including the e-invoice IRP (Invoice Registration Portal), e-way bill APIs, and GSTR filing APIs — constantly deal with dense, deeply nested JSON payloads. This guide covers the common field structures you will encounter and how to format and debug them efficiently.

Why GST API responses are hard to read

GST-related APIs return minified JSON with no line breaks or indentation, to keep payload size small over the network. When you log this raw response, it appears as one long unreadable line. Running it through a JSON formatter adds indentation and makes nested arrays like invoice line items readable at a glance.

Typical e-invoice (IRP) response structure

After successfully generating an e-invoice, the IRP (Invoice Registration Portal) API returns a response similar to this, once formatted:

{
  "Success": true,
  "Irn": "35054cbb3d5a4f9b8e5f1a6c9d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e",
  "AckNo": "112010036481625",
  "AckDt": "2026-07-11 12:45:00",
  "SignedQRCode": "eyJkYXRhIjoiZW5jb2RlZC1xci1zdHJpbmcifQ==",
  "SignedInvoice": "eyJhbGciOiJSUzI1NiJ9.encoded-jwt-payload",
  "Status": "ACT"
}

Key fields to know:

  • Irn — Invoice Reference Number, a unique 64-character hash for the e-invoice.
  • AckNo / AckDt — acknowledgement number and timestamp from the IRP.
  • SignedQRCode — base64 data used to generate the QR code printed on the invoice.
  • Status — ACT means active; CNL means the e-invoice was cancelled.

Invoice line items structure

When submitting or receiving invoice data, GST payloads nest each line item under an ItemList array, with tax fields per item:

{
  "SellerGstin": "27AAAPL1234C1ZV",
  "BuyerGstin": "29AATPX5678K1ZP",
  "ItemList": [
    {
      "SlNo": "1",
      "PrdDesc": "Wireless Mouse",
      "HsnCd": "84716070",
      "Qty": 10,
      "Unit": "NOS",
      "UnitPrice": 500.00,
      "TotAmt": 5000.00,
      "GstRt": 18,
      "IgstAmt": 900.00
    }
  ]
}

Here, HsnCd is the HSN (Harmonized System of Nomenclature) product code, GstRt is the GST rate percentage applied, and IgstAmt is the Integrated GST amount charged for an inter-state transaction.

Debugging tips for GST API integrations

  • Always format the raw response before inspecting it manually — minified JSON hides structural bugs.
  • Validate that GSTIN fields are exactly 15 characters — a common source of rejected e-invoices.
  • Cross-check the HsnCd against the official HSN code list if the API returns a validation error.
  • Log both the request payload and response side by side when an e-invoice generation fails, since GST error codes reference specific field names.

Frequently Asked Questions

What format does the GST e-invoice API return data in?

The GST e-invoice system (IRP) returns JSON responses containing fields like Irn, AckNo, AckDt, SignedInvoice, and QRCode data after successfully generating an e-invoice.

Why is my GST API JSON response hard to read?

GST API responses are typically returned as minified, single-line JSON to reduce payload size. Running the response through a JSON formatter adds indentation and line breaks, making nested fields like invoice items easy to read.

What does GSTIN mean in a GST API JSON payload?

GSTIN stands for Goods and Services Tax Identification Number, a 15-character alphanumeric code assigned to every GST-registered business in India, typically found in fields like Gstin, SellerGstin, or BuyerGstin.

Try the Free JSON Formatter

Paste a minified GST API response and instantly get readable, indented JSON with syntax validation.

Related articles