GST Data Reader

Extract GST-related information from uploaded invoices, PDFs, images, and structured files. Review extracted records, source evidence, and warnings before submitting the data for GST reconciliation.

API Details

Method: POST

Endpoint: /gst-recon/read

Base URL: https://uatapi.wowpe.in/api/api-module

Full URL: https://uatapi.wowpe.in/api/api-module/gst-recon/read

Authentication

Include the following headers in your request.

HeaderTypeMandatoryDescription
X-Client-IdStringYesClient ID provided by WowPe. Must be exactly 36 characters.
X-Client-SecretStringYesClient secret provided by WowPe. Must be exactly 36 characters.

Content-Type: multipart/form-data

Request Parameters

ParameterTypeMandatoryDescription
filesFileYesDocument(s) to process. Repeat this field to upload multiple files (1–10 files per request).
optionsJsonString (JSON)NoJSON string containing RegisterOptions. Required for structured files such as CSV, XLSX, JSON, and XML.

Accepted File Types

ExtensionProcessing MethodLimits
.pdfOCR or embedded text extractionMaximum 20 MB, 1–20 pages
.png, .jpg, .jpegLocal OCRMaximum 20 MB, up to 10,000 px per side and 36 MP
.txtPlain UTF-8 textMaximum 5 MB, 2 million characters
.csv, .xlsx, .json, .xmlStructured file readerMaximum 5 MB; requires optionsJson

Unsupported file types return errorCode: "InvalidFile".

optionsJson Parameters

The optionsJson field accepts a JSON string containing the following RegisterOptions fields.

FieldTypeMandatoryDefaultDescription
headerRowNumberNo1One-based physical row containing headers. Valid range: 1–30.
columnsObjectNo{}Maps canonical field names to exact source headers. Matching is case-sensitive.
absentTaxIsZeroBooleanNofalseConfirms that a blank tax component represents zero rather than an unknown value.

For structured files, BeneficiaryName and UniqueRefNo are required. They must be available in the source headers or supplied through the column mapping.

Blank tax amounts are not treated as zero unless absentTaxIsZero is set to true. For this reader, the setting applies to CGST, SGST, IGST, and GSTAmount. TaxableValue is always required.

Canonical Field Names

Use these canonical names when mapping source columns through the columns object.

Canonical FieldDescription
BeneficiaryNameSupplier or beneficiary name
UniqueRefNoInvoice or reference number
TaxableValueTaxable amount
CGSTCentral GST amount
SGSTState GST amount
IGSTIntegrated GST amount
GSTAmountReported total GST amount
GstinGST identification number
DocumentDateDocument date
DocumentTypeDocument type

If BeneficiaryName and UniqueRefNo cannot be identified from the source headers or supplied mapping, the file fails with the message:

Map BeneficiaryName and UniqueRefNo columns.

Sample Request

Upload an Invoice PDF

curl --request POST 'https://uatapi.wowpe.in/api/api-module/gst-recon/read' \
  --header 'X-Client-Id: YOUR_CLIENT_ID' \
  --header 'X-Client-Secret: YOUR_CLIENT_SECRET' \
  --form '[email protected]'

Upload a Structured File with Column Mapping

curl --request POST 'https://uatapi.wowpe.in/api/api-module/gst-recon/read' \
  --header 'X-Client-Id: YOUR_CLIENT_ID' \
  --header 'X-Client-Secret: YOUR_CLIENT_SECRET' \
  --form '[email protected]' \
  --form 'optionsJson={"headerRow":1,"columns":{"BeneficiaryName":"Supplier","UniqueRefNo":"Invoice No"},"absentTaxIsZero":false}'

Sample Response

{
  "reviewRequired": true,
  "files": [
    {
      "fileName": "invoice.pdf",
      "success": true,
      "rows": [
        {
          "sourceFile": "invoice.pdf",
          "sourcePages": "1",
          "beneficiaryName": "",
          "uniqueRefNo": "0007",
          "gstin": "29BBBBBO0O00B1Z5",
          "taxableValue": 1000.0,
          "cgst": 90.0,
          "sgst": 90.0,
          "igst": 0.0,
          "gstAmount": 180.0,
          "reviewed": false,
          "warnings": [
            "BeneficiaryName not found; review source."
          ]
        }
      ]
    }
  ]
}

This is a representative UAT response. Not every field is guaranteed to appear in every response.

Sample Failure Response

The following example shows a structured file that fails because the required fields are not mapped.

{
  "reviewRequired": true,
  "files": [
    {
      "fileName": "statement-matching.xlsx",
      "success": false,
      "rows": [],
      "pages": [],
      "errorCode": "InvalidFile",
      "message": "Map BeneficiaryName and UniqueRefNo columns."
    }
  ]
}

Response Parameters

ParameterTypeDescription
reviewRequiredBooleanAlways true for this endpoint.
filesArrayProcessing result for each uploaded file.
files[].fileNameStringName of the uploaded file.
files[].successBooleantrue only when rows were produced.
files[].rowsArrayExtracted records. Empty when processing fails.
files[].pagesArrayOCR page text for PDF/image input; empty for structured files.
files[].errorCodeString / NullFailure code, for example InvalidFile.
files[].messageString / NullDetails about the failure.
rows[].idStringRow identifier, prefixed with file1-, file2-, and so on.
rows[].sourceFileStringSource document name.
rows[].sourcePagesStringSource page information.
rows[].lineNumberSource line for structured input.
rows[].beneficiaryNameStringExtracted supplier or beneficiary name.
rows[].uniqueRefNoStringInvoice or reference number.
rows[].gstinStringExtracted GST identification number.
rows[].documentDateStringDocument date as printed.
rows[].documentTypeStringDocument type as printed.
rows[].taxableValueNumber / NullExtracted taxable amount.
rows[].cgstNumber / NullCentral GST amount.
rows[].sgstNumber / NullState GST amount.
rows[].igstNumber / NullIntegrated GST amount.
rows[].gstAmountNumber / NullReported or calculated GST amount.
rows[].reviewedBooleanOperator review state. Always false when returned by the reader.
rows[].reviewRequiredBooleanComputed as !reviewed.
rows[].extractionMethodStringExtraction method: Embedded PDF text, Local OCR, or Structured file.
rows[].warningsArrayWarnings associated with the record.
rows[].provenanceArrayIdentifies the source field or row for each value.
rows[].fieldEvidenceArraySource evidence for individual fields.
rows[].sourceRowsArrayRaw source cells for structured input.

Status Codes

HTTP StatusMeaning
200 OKEvery uploaded file succeeded.
207 Multi-StatusSome files succeeded while others failed. Inspect each files[] entry.
400 Bad RequestMissing or invalid headers, or invalid optionsJson.
422 Unprocessable EntityNo uploaded file succeeded.
499Client cancelled the request.
500Unhandled server error.

Error Handling and Validation

  • Structured files support a maximum of 500 extracted records per request. Use the GST Import API for larger registers.
  • CSV, XLSX, JSON, and XML files are validated before mapping. Limits include 128 columns, 10,000 physical rows, and 2,000 characters per cell.
  • Formula cells, boolean cells, and error cells in XLSX files are rejected rather than evaluated.
  • UniqueRefNo and Gstin supplied as numeric cells are rejected to preserve leading zeros.
  • Duplicate mapped headers, or using one source column for multiple fields, are rejected.
  • If X-Client-Id is missing, the API returns 400 with The X-Client-Id header is required.
  • If X-Client-Id is not 36 characters long, the API returns 400 with The X-Client-Id must be 36 characters. The length check occurs before credential lookup.

Important Notes

  • An HTTP 200 response does not guarantee that every file or extracted record is correct. Check files[].success, rows[].warnings, and rows[].provenance.
  • Preserve missing values as unknown. Do not automatically replace them with zero.
  • Each uploaded file is treated as one document. Conflicting references across pages are retained as warnings rather than automatically resolved.
  • The reviewed field represents an operator's review decision, not an OCR confidence score.
  • Review extracted records and resolve warnings before using the data for reconciliation.

What's Next

Review the extracted rows, resolve warnings and missing values, and submit the reviewed records to the GST Reconciliation API.