GST Ledger Import

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

PropertyValue
MethodPOST
Endpoint/gst-recon/import
Base URLhttps://uatapi.wowpe.in/api/api-module
Content-Typemultipart/form-data

Authentication

Include the following headers with every request:

HeaderTypeRequiredDescription
X-Client-IdStringYesClient ID provided by WowPe.
X-Client-SecretStringYesClient 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.

ParameterTypeRequiredDescription
filesFileYesOne or more ledger or statement files. Repeat this field for multiple files.
optionsJsonString (JSON)Required for statement importsJSON 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

FieldTypeRequiredDefaultDescription
importTypeStringRequired for statement importsLedgerAccepted values: Ledger, GSTR2A, GSTR2B. Case-insensitive.
headerRowNumberNo1One-based physical row containing the column headers. Accepted range: 1–30.
columnsObjectNo{}Maps canonical field names to the corresponding source column headers.
absentTaxIsZeroBooleanNofalseLedger 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.

FieldTypeRequiredDescription
headerRowNumberNoRow containing the headers, from 1 to 30.
columnsObjectNoMaps canonical ledger fields to source column names.
absentTaxIsZeroBooleanNoIf 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:

  • BeneficiaryName
  • UniqueRefNo

If these columns cannot be resolved, the file fails with the message Map BeneficiaryName and UniqueRefNo columns.

Ledger Canonical Columns

Canonical FieldDescription
BeneficiaryNameSupplier or beneficiary name. Required.
UniqueRefNoInvoice or reference number. Required.
TaxableValueTaxable amount.
CGSTCentral GST amount.
SGSTState GST amount.
IGSTIntegrated GST amount.
GSTAmountTotal GST amount. Calculated from CGST + SGST + IGST when not supplied.
GstinGST identification number.
DocumentDateDocument date.
DocumentTypeDocument 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:

FieldTypeRequiredDescription
importTypeStringYesGSTR2A or GSTR2B.
recipientGstinStringYesGSTIN of the recipient associated with the statement.
statementPeriodStringYesStatement period in yyyy-MM format, such as 2026-04.
statementDownloadedAtString (ISO 8601)YesTimestamp identifying the supplied statement snapshot, including its timezone or UTC offset.

Additional options:

FieldTypeDefaultDescription
headerRowNumber1One-based row containing the column headers.
headerRowCountNumber1Number of header rows to combine. Accepted range: 1–3.
skipRowsNumber Array[]One-based data-row positions to exclude. Entries must be unique and occur after the header block.
documentDateFormatStringyyyy-MM-ddDate format used to parse document dates. Accepted values: yyyy-MM-dd, dd/MM/yyyy, dd-MM-yyyy, dd-MMM-yyyy.
documentTypesObject{}Maps source document codes to Invoice, CreditNote, or DebitNote.
defaultDocumentTypeStringNoneFallback document type when the source field is blank. Accepted values: Invoice, CreditNote, DebitNote.
creditNoteAmountSignStringSignedControls credit-note amount normalization. Accepted values: Signed, PositiveMagnitude.
columnsObject{}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 FieldRequiredAccepted Source Headers
SupplierGstinYesSupplierGstin, GSTIN of Supplier, Supplier GSTIN/UIN, GSTIN
DocumentNumberYesDocumentNumber, Invoice Number, Invoice No, Note Number
DocumentDateYesDocumentDate, Invoice Date, Note Date
DocumentTypeConditionalDocumentType, Document Type, Invoice Type
RecipientGstinNoRecipientGstin, Recipient GSTIN
StatementPeriodNoStatementPeriod, Statement Period
TaxableValueNoTaxableValue, Taxable Value
CgstNoCgst, Central Tax, Central Tax Amount
SgstNoSgst, State/UT Tax, State/UT Tax Amount
IgstNoIgst, Integrated Tax, Integrated Tax Amount
CessNoCess, Cess Amount
PortalItcStatusNoPortalItcStatus, ITC Availability
IsAmendmentNoIsAmendment, Is Amendment
OriginalDocumentNumberNoOriginalDocumentNumber, Original Invoice Number
OriginalDocumentDateNoOriginalDocumentDate, 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

FormatSupported Structure and Limits
CSVUTF-8; up to 5 MB, 5 million characters, 128 columns, and 10,000 physical rows.
XLSXFirst worksheet only; up to 128 columns, 10,000 rows, and 2,000 characters per cell.
JSONArray of 1–10,000 flat row objects. Nested objects are not supported.
XMLFlat 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, or OriginalDocumentDate.

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

ParameterTypeDescription
reviewRequiredBooleanIndicates that human review is required.
importTypeStringResolved import type for statement imports.
statementTypeStringDisplay name of the statement, such as GSTR-2A or GSTR-2B.
recipientGstinStringRecipient GSTIN used for the statement import.
statementPeriodStringStatement period used for the import.
statementDownloadedAtStringTimestamp identifying the statement snapshot.
filesArrayIndividual results for uploaded files.

File-Level Fields

ParameterTypeDescription
files[].fileNameStringUploaded file name.
files[].successBooleanIndicates whether normalized rows were produced without any Error-severity issues.
files[].reviewRequiredBooleanIndicates that the imported data requires review.
files[].errorCodeString / NullError identifier, such as MappingNeeded or InvalidFile; null on success.
files[].messageString / NullSummary of the processing result.
files[].headersArrayHeaders discovered in the source file, including when mapping fails.
files[].rowsArrayNormalized records that were not rejected.
files[].evidenceArraySource-row evidence, including raw cells and rejection details.
files[].issuesArrayValidation issues with code, severity, source row, field, and message.

Statement Row Fields

ParameterTypeDescription
rows[].sourceIdStringSource row identifier.
rows[].sourceFileStringName of the source file.
rows[].sourceLocationStringLocation of the row in the source.
rows[].recipientGstinStringRecipient GSTIN associated with the row.
rows[].supplierGstinStringSupplier GSTIN, converted to uppercase.
rows[].documentNumberStringInvoice or document reference.
rows[].documentDateString / NullParsed document date in ISO format, or null if unparseable.
rows[].documentTypeString / NullInvoice, CreditNote, or DebitNote.
rows[].statementPeriodStringStatement period applied to the row.
rows[].isAmendmentBooleanIndicates whether the document is an amendment. Defaults to false.
rows[].originalDocumentNumberStringOriginal document reference for an amendment.
rows[].originalDocumentDateString / NullOriginal document date.
rows[].taxableValueNumber / NullTaxable amount. null indicates an unknown value, not zero.
rows[].cgstNumber / NullCentral GST amount.
rows[].sgstNumber / NullState GST amount.
rows[].igstNumber / NullIntegrated GST amount.
rows[].cessNumber / NullCess amount.
rows[].portalItcStatusStringITC status retained from the source as evidence. It is not an eligibility decision.

Ledger Row Fields

ParameterTypeDescription
rows[].idStringRow identifier.
rows[].lineNumberSource line number.
rows[].beneficiaryNameStringSupplier or beneficiary name.
rows[].uniqueRefNoStringInvoice or reference number.
rows[].gstinStringGST identification number.
rows[].documentDateStringDocument date as supplied.
rows[].documentTypeStringDocument type as supplied.
rows[].taxableValueNumber / NullTaxable amount.
rows[].cgstNumber / NullCentral GST amount.
rows[].sgstNumber / NullState GST amount.
rows[].igstNumber / NullIntegrated GST amount.
rows[].gstAmountNumber / NullReported or calculated total GST amount.
rows[].reviewedBooleanOperator review state.
rows[].reviewRequiredBooleanIndicates whether the row needs review.
rows[].extractionMethodStringExtraction method, such as Structured file.
rows[].warningsArrayWarnings associated with the row.
rows[].provenanceArraySource 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

CodeDescription
MappingNeededRequired columns could not be resolved, or no rows survived mapping.
RecipientConflictA row's recipient GSTIN differs from the declared statement recipient.
InvalidSupplierGstinSupplier GSTIN is missing or invalid.
InvalidDocumentNumberDocument number is blank or exceeds 255 characters.
DocumentTypeMappingNeededDocument type could not be mapped to a supported type.
InvalidDateDocument date does not match the declared date format.
StatementPeriodConflictRow statement period differs from the supplied snapshot period.
TextStorageRequiredAn identifier or date is stored numerically, risking loss of leading zeros or date meaning.
AmendmentMappingNeededAmendment value is not explicit true or false text.
DataBeyondHeaderNon-blank data extends beyond the mapped header width.
NoValidRecordsNo structurally valid record was found.

Review-Severity Issues

CodeDescription
UnreadableAmountAn amount could not be parsed. The raw value is retained and the normalized amount is null.
MissingAmountAn amount is blank and remains unknown rather than zero.
UnexpectedAmountSignThe amount sign does not match the declared document type convention.
DocumentMonthDiffersFromStatementDocument month differs from the statement period.
AmendmentRequiresReviewAmendment or original document references require review.
CreditNoteSignNormalizedA positive credit-note amount was converted to a negative amount.
SignConventionConflictA negative amount conflicts with the declared positive-magnitude convention.
DuplicateDocumentA duplicate document identity was found. Duplicate rows are retained.
CallerExcludedRowThe 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 StatusDescription
200 OKAll files succeeded. Review-level issues may still be present.
207 Multi-StatusSome files succeeded while others failed.
400 Bad RequestInvalid or incomplete options, or failed header authentication. The response body is a plain string.
422 Unprocessable EntityNo file produced valid records. The response includes file-level error information.
499Client cancelled the request.
500 Internal Server ErrorAn unhandled server error occurred.

Common Validation Errors

ScenarioHTTP StatusResponse
optionsJson omitted for a statement file422File fails in Ledger mode because required ledger columns cannot be mapped.
statementPeriod omitted400StatementPeriod must be yyyy-MM.
absentTaxIsZero: true for a statement import400Statement import forbids AbsentTaxIsZero; missing values stay null.
Unsupported importType400ImportType must be Ledger, GSTR2A or GSTR2B.
Document date does not match the declared format422File issues contain InvalidDate.
Unreadable amount, such as 100.00 INR200File issues contain UnreadableAmount; normalized value is null.
Blank GST amount field200File issues contain MissingAmount.

Important Notes

  • Always send optionsJson for statement imports. Omitting it selects Ledger mode by default.
  • Options are validated before the file is processed. Invalid options return a 400 response.
  • The RecipientGstin column in a statement file is optional. If omitted, the value is taken from optionsJson.recipientGstin.
  • Blank amounts remain null. Supply an explicit zero only when the source confirms that the amount is zero.
  • A response with success: true does not mean every source row was accepted. Review issues and evidence before 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.