Extract GST invoice fields and line items to JSON using AI

Dynamite Docs
Source → result
GST INVOICE DATA: Header fields, nested itemsGSTIN (supplier): 29AABCC3456C1ZD. Item & quantity: Rotary hammer x 6. Invoice total (incl. tax): ₹2,19,480.00. Illustrative example, not extracted customer data.SOURCE DOCUMENTGST INVOICE DATAGSTIN (supplier)29AABCC3456C1ZDItem & quantityRotary hammer x 6Invoice total (incl. tax)₹2,19,480.00Header fields, nested itemsGSTIN (supplier)29AABCC3456C1ZDItem & quantityRotary hammer x 6Invoice total (incl. tax)₹2,19,480.00Keep line items nested
GSTIN (supplier)
29AABCC3456C1ZD
Item & quantity
Rotary hammer x 6
Keep line items nested Illustrative example.

By Dynamite Docs. Published . Updated .

Turn GST invoices into clean, reviewed data for Excel and Tally.

GST invoice to JSON conversion is a mapping job, not a text dump. Dynamite Docs proposes document fields and repeating line items from digital PDFs, scans or photos, then lets a reviewer check GSTIN roles, references, tax values and totals before export. The product JSON preserves columns, rows and document metadata so developers can map the reviewed result into their own contract. Use the workspace for manual review, or connect paid-plan API and webhook features when an application needs a repeatable handoff.

Try a GST invoice or compare its storage, processing, and export limits.

Dynamite Docs
The handoff
GST INVOICE DATA: Header fields, nested itemsSend invoices via UI or API. Standardized field extraction. Automated webhook delivery. Illustrative example, not extracted customer data.FROM SOURCE FILE TO A RESULT YOU CAN USEGST INVOICEDATAReview workspaceHeaderfields,nested…1Send invoices viaUI or API2Standardizedfield extraction3Automated webhookdelivery
  1. 01Send invoices via UI or API
  2. 02Standardized field extraction
  3. 03Automated webhook delivery
Keep line items nested Illustrative example.

Software needs structured JSON, not PDF documents

  • Accounting platforms and custom software need a versioned contract, while an extracted invoice can introduce fields or labels that vary by layout.
  • Different suppliers format invoices differently, making traditional custom scrapers fragile and hard to maintain.
  • Invoices arrive as a mix of clean digital PDFs and scanned images, requiring intelligent routing between text extraction and vision OCR.
  • Automated workflows need webhooks that trigger actions as soon as a document is processed without manual exporting.

Document types this workflow handles

  • Digital GST invoice PDFs: e-invoices and billing software exports
  • Scanned invoices & photos: visual character recognition for images
  • Bulk billing exports: batch processing of text-layer invoices
  • Credit & debit notes: structured adjustment records

What comes out as JSON keys

Dynamite Docs
Inside the output
GST INVOICE DATA: Header fields, nested itemsGSTIN (supplier): 29AABCC3456C1ZD. Item & quantity: Rotary hammer x 6. Invoice total (incl. tax): ₹2,19,480.00. Illustrative example, not extracted customer data.document.json1{2"gstin_supplier_":3"29AABCC3456C1ZD",4"item_quantity":5"Rotary hammer x 6",6"invoice_total_incl_tax_":7"₹2,19,480.00"8}Check values and reading…
GSTIN (supplier)
29AABCC3456C1ZD
Item & quantity
Rotary hammer x 6
Invoice total (incl. tax)
₹2,19,480.00
Keep line items nested Illustrative example.

The product export provides reviewed columns, rows, and document metadata. Map these invoice values into the stable property names your application owns:

  • GSTIN (supplier): 29AABCC3456C1ZD
  • Invoice number: KT-5512
  • Invoice date: 2026-08-07
  • Vendor / customer: Ganesh Industries
  • Place of supply: Karnataka (29)
  • HSN / SAC code: 8467
  • Item & quantity: Rotary hammer x 6
  • Taxable value: ₹1,86,000.00
  • IGST (rate · amount): 18% · ₹33,480.00
  • Invoice total (incl. tax): ₹2,19,480.00

Reliable API integration and predictable data structures

Dynamite Docs
The review
GST INVOICE DATA: Header fields, nested itemsCheck property names. Keep line items nested. Validate values and types. Illustrative example, not extracted customer data.SOURCE DOCUMENTGST INVOICE DATAGSTIN (supplier)29AABCC3456C1ZDItem & quantityRotary hammer x 6Invoice total (incl. tax)₹2,19,480.00Review before exportGSTIN (supplier)29AABCC3456C1ZDCompare with the source on the leftAccept after reviewKeep line items nestedOriginal stays…
GSTIN (supplier)
29AABCC3456C1ZD
Item & quantity
Rotary hammer x 6
Invoice total (incl. tax)
₹2,19,480.00
Keep line items nested Illustrative example.

Keep document fields and line items separate. Supplier GSTIN, recipient GSTIN, invoice number, invoice date, place of supply, currency and invoice total describe the document. HSN or SAC, description, quantity, unit, rate, taxable value and tax components repeat by line. Flattening both levels without a stable invoice key can duplicate totals and corrupt later aggregation.

Treat identifiers as strings. GSTINs, invoice numbers, IRNs, HSN or SAC codes and purchase-order references may contain letters, slashes or leading zeros. Dates need a declared format, and decimal money values need an agreed representation. Your application should validate those types after extraction rather than relying on JavaScript coercion.

Define null and absence deliberately. A missing IGST value is different from a printed zero, and a field that is not applicable is different from one OCR could not read. Map these states into the application contract so reviewers and downstream rules can tell them apart.

Validate arithmetic before delivery. Compare line taxable values with the document subtotal, then account for discounts, freight, tax, cess and rounding. Keep the source amount when the calculation differs and record an exception. Do not silently replace a printed value with a computed one.

API and webhook consumers also need operational controls. Authenticate requests, verify the webhook signature, reject stale or duplicated deliveries, and store the extraction or file identifier used for idempotency. A completion event should start validation or review, not create an accounting voucher without checks.

Use confidence as a review signal, not an approval rule. GSTIN roles, tax treatment and totals deserve explicit checks even when OCR is confident. Route unresolved fields to a person and preserve their corrections before the application maps the JSON into its own schema.

Test the integration with a normal invoice, a credit or debit note, a multi-rate document and a scan. Version your mapper when required keys or nesting changes. Dynamite Docs supplies reviewed extraction data; your software remains responsible for schema validation, posting rules, duplicate control and GST compliance. Use the free invoice-to-JSON tool when you want to inspect one non-GST or prototype payload before building the API path.

Developer-friendly APIs with complete data control

The export uses a consistent product result shape for document metadata, columns and rows. Downstream code should map and validate that result against its own versioned schema.

A digital PDF may provide machine-readable text, while scans need visual OCR. Source quality can still change the proposed values, so both formats need review.

All data and webhook configurations remain under your control, with full support for CSV and Excel exports whenever needed.

Questions, answered

Is there a REST API for uploading invoices and retrieving JSON?

Yes. Our REST API allows you to upload documents securely using API tokens and receive structured JSON responses with confidence scores for each field.

Do webhooks fire when invoice extraction is complete?

Yes. You can configure signed webhooks that post extraction completion events directly to your server endpoints, enabling fully automated workflows.

Are JSON key names consistent across all suppliers?

The product export uses a consistent result structure for fields, columns and rows. Your application should map those labels into its own schema and validate required keys, types, nulls and version changes.

Does the API support both digital PDFs and scanned images?

Yes. Digital PDFs parse directly from text, while scans and photos are routed through visual OCR, with both paths returning the same structured JSON format.

Related extraction articles

Open the document extraction workspace, no credit card required.

Loading Dynamite Docs… This page is taking longer than expected. Reload page.