Import GST ledger registers or GSTR-2A/GSTR-2B statement files and receive normalized records, source-level evidence, and validation issues for review before reconciliation.
GST Import API
Import GST ledger registers or GSTR-2A/GSTR-2B statement files and receive normalized records, source-level evidence, and validation issues for review before reconciliation.
API Details
| Property | Value |
|---|---|
| Method | POST |
| Endpoint | /gst-recon/import |
| Base URL | https://uatapi.wowpe.in/api/api-module |
| Content-Type | multipart/form-data |
Authentication
Include the following headers with every request:
| Header | Type | Required | Description |
|---|---|---|---|
X-Client-Id | String | Yes | Client ID provided by WowPe. |
X-Client-Secret | String | Yes | Client secret provided by WowPe. |
Both credentials must be provided for authentication.
Overview
The endpoint supports three import types:
- Ledger: Imports a purchase or supplier ledger.
- GSTR2A: Imports a GSTR-2A statement.
- GSTR2B: Imports a GSTR-2B statement.
The import type is selected through optionsJson.importType.
Important: Always provide optionsJson for statement imports. If it is omitted, the request defaults to Ledger mode, which can cause a statement file to fail validation.
Request Parameters
Send the request as multipart/form-data.
| Parameter | Type | Required | Description |
|---|---|---|---|
files | File | Yes | One or more ledger or statement files. Repeat this field for multiple files. |
optionsJson | String (JSON) | Required for statement imports | JSON string containing the import type and associated options. Also used for ledger column mapping and other settings. |
You can upload between 1 and 10 files per request. Each file must be no larger than 5 MB. Files are processed independently, and the response contains a result for each file.
Import Options
Common Options
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
importType | String | Required for statement imports | Ledger | Accepted values: Ledger, GSTR2A, GSTR2B. Case-insensitive. |
headerRow | Number | No | 1 | One-based physical row containing the column headers. Accepted range: 1–30. |
columns | Object | No | {} | Maps canonical field names to the corresponding source column headers. |
absentTaxIsZero | Boolean | No | false | Ledger mode only. When true, blank GST component amounts are treated as confirmed zero. Not allowed for statement imports. |
Ledger Import Options
Use importType: "Ledger" to import a ledger register.
| Field | Type | Required | Description |
|---|---|---|---|
headerRow | Number | No | Row containing the headers, from 1 to 30. |
columns | Object | No | Maps canonical ledger fields to source column names. |
absentTaxIsZero | Boolean | No | If true, blank CGST, SGST, IGST, or GSTAmount values are treated as zero. If false, missing values remain unknown and require review. |
The following two fields are mandatory in Ledger mode:
BeneficiaryNameUniqueRefNo
If these columns cannot be resolved, the file fails with the message Map BeneficiaryName and UniqueRefNo columns.
Ledger Canonical Columns
| Canonical Field | Description |
|---|---|
BeneficiaryName | Supplier or beneficiary name. Required. |
UniqueRefNo | Invoice or reference number. Required. |
TaxableValue | Taxable amount. |
CGST | Central GST amount. |
SGST | State GST amount. |
IGST | Integrated GST amount. |
GSTAmount | Total GST amount. Calculated from CGST + SGST + IGST when not supplied. |
Gstin | GST identification number. |
DocumentDate | Document date. |
DocumentType | Document type. |
Ledger Column Mapping Example
{
"importType": "Ledger",
"headerRow": 1,
"columns": {
"BeneficiaryName": "Supplier Name",
"UniqueRefNo": "Invoice Number",
"TaxableValue": "Taxable Amount",
"CGST": "Central Tax",
"SGST": "State Tax",
"IGST": "Integrated Tax",
"GSTAmount": "Total GST"
},
"absentTaxIsZero": false
}
The values in the mapping must match the column headers in your uploaded file.
GSTR-2A and GSTR-2B Import Options
Use importType: "GSTR2A" or importType: "GSTR2B" to import a GST statement.
The following fields are required:
| Field | Type | Required | Description |
|---|---|---|---|
importType | String | Yes | GSTR2A or GSTR2B. |
recipientGstin | String | Yes | GSTIN of the recipient associated with the statement. |
statementPeriod | String | Yes | Statement period in yyyy-MM format, such as 2026-04. |
statementDownloadedAt | String (ISO 8601) | Yes | Timestamp identifying the supplied statement snapshot, including its timezone or UTC offset. |
Additional options:
| Field | Type | Default | Description |
|---|---|---|---|
headerRow | Number | 1 | One-based row containing the column headers. |
headerRowCount | Number | 1 | Number of header rows to combine. Accepted range: 1–3. |
skipRows | Number Array | [] | One-based data-row positions to exclude. Entries must be unique and occur after the header block. |
documentDateFormat | String | yyyy-MM-dd | Date format used to parse document dates. Accepted values: yyyy-MM-dd, dd/MM/yyyy, dd-MM-yyyy, dd-MMM-yyyy. |
documentTypes | Object | {} | Maps source document codes to Invoice, CreditNote, or DebitNote. |
defaultDocumentType | String | None | Fallback document type when the source field is blank. Accepted values: Invoice, CreditNote, DebitNote. |
creditNoteAmountSign | String | Signed | Controls credit-note amount normalization. Accepted values: Signed, PositiveMagnitude. |
columns | Object | {} | Maps canonical fields to source headers. Explicit mappings replace the default aliases for those fields. |
The absentTaxIsZero option is not supported for statement imports. Missing tax values remain unknown rather than being converted to zero.
If neither a document type column nor defaultDocumentType is available, the file fails validation.
Statement Canonical Fields and Accepted Headers
Header matching is case-insensitive and ignores spaces, slashes, and other punctuation.
| Canonical Field | Required | Accepted Source Headers |
|---|---|---|
SupplierGstin | Yes | SupplierGstin, GSTIN of Supplier, Supplier GSTIN/UIN, GSTIN |
DocumentNumber | Yes | DocumentNumber, Invoice Number, Invoice No, Note Number |
DocumentDate | Yes | DocumentDate, Invoice Date, Note Date |
DocumentType | Conditional | DocumentType, Document Type, Invoice Type |
RecipientGstin | No | RecipientGstin, Recipient GSTIN |
StatementPeriod | No | StatementPeriod, Statement Period |
TaxableValue | No | TaxableValue, Taxable Value |
Cgst | No | Cgst, Central Tax, Central Tax Amount |
Sgst | No | Sgst, State/UT Tax, State/UT Tax Amount |
Igst | No | Igst, Integrated Tax, Integrated Tax Amount |
Cess | No | Cess, Cess Amount |
PortalItcStatus | No | PortalItcStatus, ITC Availability |
IsAmendment | No | IsAmendment, Is Amendment |
OriginalDocumentNumber | No | OriginalDocumentNumber, Original Invoice Number |
OriginalDocumentDate | No | OriginalDocumentDate, Original Invoice Date |
If a required column cannot be identified, the file returns a mapping error along with the discovered headers. Use these headers to configure an explicit columns mapping.
Supported Input Formats
| Format | Supported Structure and Limits |
|---|---|
| CSV | UTF-8; up to 5 MB, 5 million characters, 128 columns, and 10,000 physical rows. |
| XLSX | First worksheet only; up to 128 columns, 10,000 rows, and 2,000 characters per cell. |
| JSON | Array of 1–10,000 flat row objects. Nested objects are not supported. |
| XML | Flat rows in the structure <rows><row><Field>value</Field></row></rows>. Supports 1–9,999 rows without attributes. |
The endpoint does not directly parse native nested GST portal JSON, PDF statements, or government multi-sheet exports. Convert these to a supported flat tabular structure before importing.
File Validation Rules
The following are rejected before mapping:
- Formula, Boolean, and error cells.
- Duplicate or unordered cells.
- Numeric cells used for identifiers or dates such as
SupplierGstin,RecipientGstin,DocumentNumber,OriginalDocumentNumber,DocumentDate, orOriginalDocumentDate.
Store identifiers and dates as text where required to preserve leading zeros and date meaning.
Sample Request: GSTR-2A Statement Import
curl --request POST \
'https://uatapi.wowpe.in/api/api-module/gst-recon/import' \
--header 'X-Client-Id: YOUR_CLIENT_ID' \
--header 'X-Client-Secret: YOUR_CLIENT_SECRET' \
--form '[email protected]' \
--form 'optionsJson={"importType":"GSTR2A","recipientGstin":"27FGHIJ5678K1Z2","statementPeriod":"2026-04","statementDownloadedAt":"2026-05-15T10:00:00Z","headerRow":1,"headerRowCount":1,"skipRows":[],"documentDateFormat":"yyyy-MM-dd","creditNoteAmountSign":"Signed","columns":{}}'
Replace the sample values and file name with your statement details.
Sample Request: Ledger Import
curl --request POST \
'https://uatapi.wowpe.in/api/api-module/gst-recon/import' \
--header 'X-Client-Id: YOUR_CLIENT_ID' \
--header 'X-Client-Secret: YOUR_CLIENT_SECRET' \
--form '[email protected]' \
--form 'optionsJson={"importType":"Ledger","headerRow":1,"columns":{},"absentTaxIsZero":false}'
Ensure the uploaded ledger contains the required BeneficiaryName and UniqueRefNo columns or maps them through columns.
Response Structure
The response includes a top-level review indicator and a files array containing the result for each uploaded file.
Sample Response: Statement Import
{
"reviewRequired": true,
"importType": "GSTR2A",
"statementType": "GSTR-2A",
"recipientGstin": "27AAAPA1234A1Z5",
"statementPeriod": "2026-04",
"statementDownloadedAt": "2026-04-01T00:00:00+05:30",
"files": [
{
"fileName": "statement.xlsx",
"success": true,
"reviewRequired": true,
"errorCode": null,
"message": "Normalized statement evidence; human review required.",
"headers": [
"SupplierGstin",
"DocumentNumber",
"DocumentDate",
"DocumentType",
"TaxableValue",
"Cgst",
"Sgst",
"Igst",
"Cess",
"StatementPeriod",
"RecipientGstin"
],
"rows": [
{
"sourceId": "register1-2",
"sourceFile": "statement.xlsx",
"sourceLocation": "first worksheet/table row 2",
"recipientGstin": "27AAAPA1234A1Z5",
"supplierGstin": "27ABCDE1234F1Z5",
"documentNumber": "INV-0007",
"documentDate": "2026-04-01T00:00:00",
"documentType": "Invoice",
"statementPeriod": "2026-04",
"isAmendment": false,
"originalDocumentNumber": "",
"originalDocumentDate": null,
"taxableValue": 100,
"cgst": 9,
"sgst": 9,
"igst": 0,
"cess": 0,
"portalItcStatus": ""
}
],
"evidence": [],
"issues": []
}
]
}
The evidence array is abbreviated in this example. Actual responses may include raw source cells and mapped field evidence for each row.
Sample Response: Ledger Import
{
"reviewRequired": true,
"files": [
{
"fileName": "ledger.csv",
"success": true,
"rows": [
{
"id": "register1-2",
"sourceFile": "ledger.csv",
"sourcePages": "record 2",
"line": 1,
"beneficiaryName": "Example Supplier Pvt Ltd",
"uniqueRefNo": "INV-0007",
"gstin": "27ABCDE1234F1Z5",
"documentDate": "2026-04-01",
"documentType": "Tax Invoice",
"taxableValue": 100.0,
"cgst": 9.0,
"sgst": 9.0,
"igst": 0.0,
"gstAmount": 18.0,
"reviewed": false,
"reviewRequired": true,
"extractionMethod": "Structured file",
"warnings": [],
"provenance": [
"TaxableValue: source row 2",
"CGST: source row 2",
"SGST: source row 2",
"IGST: source row 2"
],
"fieldEvidence": [],
"sourceRows": []
}
],
"pages": [],
"errorCode": null,
"message": null
}
]
}
Response Parameters
Top-Level Fields
| Parameter | Type | Description |
|---|---|---|
reviewRequired | Boolean | Indicates that human review is required. |
importType | String | Resolved import type for statement imports. |
statementType | String | Display name of the statement, such as GSTR-2A or GSTR-2B. |
recipientGstin | String | Recipient GSTIN used for the statement import. |
statementPeriod | String | Statement period used for the import. |
statementDownloadedAt | String | Timestamp identifying the statement snapshot. |
files | Array | Individual results for uploaded files. |
File-Level Fields
| Parameter | Type | Description |
|---|---|---|
files[].fileName | String | Uploaded file name. |
files[].success | Boolean | Indicates whether normalized rows were produced without any Error-severity issues. |
files[].reviewRequired | Boolean | Indicates that the imported data requires review. |
files[].errorCode | String / Null | Error identifier, such as MappingNeeded or InvalidFile; null on success. |
files[].message | String / Null | Summary of the processing result. |
files[].headers | Array | Headers discovered in the source file, including when mapping fails. |
files[].rows | Array | Normalized records that were not rejected. |
files[].evidence | Array | Source-row evidence, including raw cells and rejection details. |
files[].issues | Array | Validation issues with code, severity, source row, field, and message. |
Statement Row Fields
| Parameter | Type | Description |
|---|---|---|
rows[].sourceId | String | Source row identifier. |
rows[].sourceFile | String | Name of the source file. |
rows[].sourceLocation | String | Location of the row in the source. |
rows[].recipientGstin | String | Recipient GSTIN associated with the row. |
rows[].supplierGstin | String | Supplier GSTIN, converted to uppercase. |
rows[].documentNumber | String | Invoice or document reference. |
rows[].documentDate | String / Null | Parsed document date in ISO format, or null if unparseable. |
rows[].documentType | String / Null | Invoice, CreditNote, or DebitNote. |
rows[].statementPeriod | String | Statement period applied to the row. |
rows[].isAmendment | Boolean | Indicates whether the document is an amendment. Defaults to false. |
rows[].originalDocumentNumber | String | Original document reference for an amendment. |
rows[].originalDocumentDate | String / Null | Original document date. |
rows[].taxableValue | Number / Null | Taxable amount. null indicates an unknown value, not zero. |
rows[].cgst | Number / Null | Central GST amount. |
rows[].sgst | Number / Null | State GST amount. |
rows[].igst | Number / Null | Integrated GST amount. |
rows[].cess | Number / Null | Cess amount. |
rows[].portalItcStatus | String | ITC status retained from the source as evidence. It is not an eligibility decision. |
Ledger Row Fields
| Parameter | Type | Description |
|---|---|---|
rows[].id | String | Row identifier. |
rows[].line | Number | Source line number. |
rows[].beneficiaryName | String | Supplier or beneficiary name. |
rows[].uniqueRefNo | String | Invoice or reference number. |
rows[].gstin | String | GST identification number. |
rows[].documentDate | String | Document date as supplied. |
rows[].documentType | String | Document type as supplied. |
rows[].taxableValue | Number / Null | 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 total GST amount. |
rows[].reviewed | Boolean | Operator review state. |
rows[].reviewRequired | Boolean | Indicates whether the row needs review. |
rows[].extractionMethod | String | Extraction method, such as Structured file. |
rows[].warnings | Array | Warnings associated with the row. |
rows[].provenance | Array | Source headers and rows used to populate field values. |
Validation Issues
Statement imports return issues at file or row level. An issue with Error severity rejects the affected row. An issue with Review severity retains the row and flags it for review.
Error-Severity Issues
| Code | Description |
|---|---|
MappingNeeded | Required columns could not be resolved, or no rows survived mapping. |
RecipientConflict | A row's recipient GSTIN differs from the declared statement recipient. |
InvalidSupplierGstin | Supplier GSTIN is missing or invalid. |
InvalidDocumentNumber | Document number is blank or exceeds 255 characters. |
DocumentTypeMappingNeeded | Document type could not be mapped to a supported type. |
InvalidDate | Document date does not match the declared date format. |
StatementPeriodConflict | Row statement period differs from the supplied snapshot period. |
TextStorageRequired | An identifier or date is stored numerically, risking loss of leading zeros or date meaning. |
AmendmentMappingNeeded | Amendment value is not explicit true or false text. |
DataBeyondHeader | Non-blank data extends beyond the mapped header width. |
NoValidRecords | No structurally valid record was found. |
Review-Severity Issues
| Code | Description |
|---|---|
UnreadableAmount | An amount could not be parsed. The raw value is retained and the normalized amount is null. |
MissingAmount | An amount is blank and remains unknown rather than zero. |
UnexpectedAmountSign | The amount sign does not match the declared document type convention. |
DocumentMonthDiffersFromStatement | Document month differs from the statement period. |
AmendmentRequiresReview | Amendment or original document references require review. |
CreditNoteSignNormalized | A positive credit-note amount was converted to a negative amount. |
SignConventionConflict | A negative amount conflicts with the declared positive-magnitude convention. |
DuplicateDocument | A duplicate document identity was found. Duplicate rows are retained. |
CallerExcludedRow | The row was excluded through skipRows; source evidence is retained. |
Issues are evaluated at their applicable scope. A row is rejected only when an Error-severity issue is raised for that row.
HTTP Status Codes
| HTTP Status | Description |
|---|---|
200 OK | All files succeeded. Review-level issues may still be present. |
207 Multi-Status | Some files succeeded while others failed. |
400 Bad Request | Invalid or incomplete options, or failed header authentication. The response body is a plain string. |
422 Unprocessable Entity | No file produced valid records. The response includes file-level error information. |
499 | Client cancelled the request. |
500 Internal Server Error | An unhandled server error occurred. |
Common Validation Errors
| Scenario | HTTP Status | Response |
|---|---|---|
optionsJson omitted for a statement file | 422 | File fails in Ledger mode because required ledger columns cannot be mapped. |
statementPeriod omitted | 400 | StatementPeriod must be yyyy-MM. |
absentTaxIsZero: true for a statement import | 400 | Statement import forbids AbsentTaxIsZero; missing values stay null. |
Unsupported importType | 400 | ImportType must be Ledger, GSTR2A or GSTR2B. |
| Document date does not match the declared format | 422 | File issues contain InvalidDate. |
Unreadable amount, such as 100.00 INR | 200 | File issues contain UnreadableAmount; normalized value is null. |
| Blank GST amount field | 200 | File issues contain MissingAmount. |
Important Notes
- Always send
optionsJsonfor statement imports. Omitting it selects Ledger mode by default. - Options are validated before the file is processed. Invalid options return a
400response. - The
RecipientGstincolumn in a statement file is optional. If omitted, the value is taken fromoptionsJson.recipientGstin. - Blank amounts remain
null. Supply an explicit zero only when the source confirms that the amount is zero. - A response with
success: truedoes not mean every source row was accepted. Reviewissuesandevidencebefore using the imported data. - Statement imports support up to 5,000 normalized records per request. Ledger imports support up to 10,000.
- Native nested GST portal JSON, PDF statements, and government multi-sheet exports must be normalized into a supported flat format before import.
Next Step: GST Reconciliation
After reviewing the imported data, use the normalized ledger records as purchases and the normalized statement records as statementRows in the GST Reconciliation API.
The import response provides normalized records and source evidence for review. It does not, by itself, determine input tax credit eligibility.
