/api/ocr-structured-v4. This schema is designed for the Indian GST ecosystem with support for CGST/SGST/IGST tax splits, HSN codes, and reconciliation.
V4Doc Type
The top-level document structure returned by the v4 endpoint.Document-level metadata
Array of line items extracted from the invoice. See V4Item schema below.
Document-level discounts applied before line-item totals
Additional charges like shipping, handling, packing
Tax Collected at Source information
Round-off adjustment to arrive at final grand total
Computed totals after reconciliation
Anchor values printed on the invoice for reconciliation
Reconciliation results and diagnostics
Metadata about the extraction process
V4Item Type
Represents a single line item on the invoice.Item name or description
HSN code (Harmonized System of Nomenclature)
Quantity
Unit of measurement (e.g., “PCS”, “KGS”, “BOX”)
Unit rate excluding tax (best source determined by reconciliation)
Line-level discount information
GST information for this line item
Computed line totals
Raw extraction data before reconciliation
Display hints for UI rendering (structure varies)
Confidence score for this line item (0-1)
Example Response
Related
OCR Structured V4 Endpoint
Use this schema with the v4 API endpoint
Understanding Reconciliation
Learn how reconciliation works
Reconciliation Engine
Deep dive into the reconciliation algorithm
MyBillBook Schema
Alternative compact schema format
