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.
| Header | Type | Mandatory | Description |
|---|---|---|---|
X-Client-Id | String | Yes | Client ID provided by WowPe. Must be exactly 36 characters. |
X-Client-Secret | String | Yes | Client secret provided by WowPe. Must be exactly 36 characters. |
Content-Type: multipart/form-data
Request Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
files | File | Yes | Document(s) to process. Repeat this field to upload multiple files (1–10 files per request). |
optionsJson | String (JSON) | No | JSON string containing RegisterOptions. Required for structured files such as CSV, XLSX, JSON, and XML. |
Accepted File Types
| Extension | Processing Method | Limits |
|---|---|---|
.pdf | OCR or embedded text extraction | Maximum 20 MB, 1–20 pages |
.png, .jpg, .jpeg | Local OCR | Maximum 20 MB, up to 10,000 px per side and 36 MP |
.txt | Plain UTF-8 text | Maximum 5 MB, 2 million characters |
.csv, .xlsx, .json, .xml | Structured file reader | Maximum 5 MB; requires optionsJson |
Unsupported file types return errorCode: "InvalidFile".
optionsJson Parameters
optionsJson ParametersThe optionsJson field accepts a JSON string containing the following RegisterOptions fields.
| Field | Type | Mandatory | Default | Description |
|---|---|---|---|---|
headerRow | Number | No | 1 | One-based physical row containing headers. Valid range: 1–30. |
columns | Object | No | {} | Maps canonical field names to exact source headers. Matching is case-sensitive. |
absentTaxIsZero | Boolean | No | false | Confirms 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 Field | Description |
|---|---|
BeneficiaryName | Supplier or beneficiary name |
UniqueRefNo | Invoice or reference number |
TaxableValue | Taxable amount |
CGST | Central GST amount |
SGST | State GST amount |
IGST | Integrated GST amount |
GSTAmount | Reported total GST amount |
Gstin | GST identification number |
DocumentDate | Document date |
DocumentType | Document 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
| Parameter | Type | Description |
|---|---|---|
reviewRequired | Boolean | Always true for this endpoint. |
files | Array | Processing result for each uploaded file. |
files[].fileName | String | Name of the uploaded file. |
files[].success | Boolean | true only when rows were produced. |
files[].rows | Array | Extracted records. Empty when processing fails. |
files[].pages | Array | OCR page text for PDF/image input; empty for structured files. |
files[].errorCode | String / Null | Failure code, for example InvalidFile. |
files[].message | String / Null | Details about the failure. |
rows[].id | String | Row identifier, prefixed with file1-, file2-, and so on. |
rows[].sourceFile | String | Source document name. |
rows[].sourcePages | String | Source page information. |
rows[].line | Number | Source line for structured input. |
rows[].beneficiaryName | String | Extracted supplier or beneficiary name. |
rows[].uniqueRefNo | String | Invoice or reference number. |
rows[].gstin | String | Extracted GST identification number. |
rows[].documentDate | String | Document date as printed. |
rows[].documentType | String | Document type as printed. |
rows[].taxableValue | Number / Null | Extracted taxable amount. |
rows[].cgst | Number / Null | Central GST amount. |
rows[].sgst | Number / Null | State GST amount. |
rows[].igst | Number / Null | Integrated GST amount. |
rows[].gstAmount | Number / Null | Reported or calculated GST amount. |
rows[].reviewed | Boolean | Operator review state. Always false when returned by the reader. |
rows[].reviewRequired | Boolean | Computed as !reviewed. |
rows[].extractionMethod | String | Extraction method: Embedded PDF text, Local OCR, or Structured file. |
rows[].warnings | Array | Warnings associated with the record. |
rows[].provenance | Array | Identifies the source field or row for each value. |
rows[].fieldEvidence | Array | Source evidence for individual fields. |
rows[].sourceRows | Array | Raw source cells for structured input. |
Status Codes
| HTTP Status | Meaning |
|---|---|
200 OK | Every uploaded file succeeded. |
207 Multi-Status | Some files succeeded while others failed. Inspect each files[] entry. |
400 Bad Request | Missing or invalid headers, or invalid optionsJson. |
422 Unprocessable Entity | No uploaded file succeeded. |
499 | Client cancelled the request. |
500 | Unhandled 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.
UniqueRefNoandGstinsupplied 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-Idis missing, the API returns400withThe X-Client-Id header is required. - If
X-Client-Idis not 36 characters long, the API returns400withThe X-Client-Id must be 36 characters.The length check occurs before credential lookup.
Important Notes
- An HTTP
200response does not guarantee that every file or extracted record is correct. Checkfiles[].success,rows[].warnings, androws[].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
reviewedfield 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.
