Invoice OCR Extract

Extracts invoice information from uploaded documents and returns structured records for review.

API Details

Method: POST

Endpoint: /api/api/api-module/invoice-ocr/extract

Base URL: https://uatapi.wowpe.in

Authentication

HeaderTypeDescription
X-Client-IdStringAssigned client ID.
X-Client-SecretStringAssigned client secret.

Request Parameters

Content-Type: multipart/form-data

ParameterTypeMandatoryDescription
filesFileYesInvoice document(s) to extract. Use the same field name for multiple uploads.

Sample Request

curl -X POST \
  'https://uatapi.wowpe.in/api/api/api-module/invoice-ocr/extract' \
  -H 'X-Client-Id: YOUR_CLIENT_ID' \
  -H 'X-Client-Secret: YOUR_CLIENT_SECRET' \
  -F '[email protected]'

Sample Success Response

{
  "statusCode": 1,
  "message": "Success",
  "rows": [
    {
      "beneficiaryName": "",
      "uniqueRefNo": "0008",
      "amount": 1180.0,
      "grossAmount": 1180.0,
      "taxableValue": 1000.0,
      "cgst": 0.0,
      "sgst": 0.0,
      "igst": 180.0,
      "gstAmount": 180.0,
      "confidence": 20,
      "sourceFile": "invoice.pdf",
      "sourcePages": "Pages 1",
      "extractionMethod": "Embedded PDF text",
      "reviewRequired": true
    }
  ],
  "reviewRequired": true
}

Sample Rejection Response

{
  "statusCode": 0,
  "message": "Use PDF, XML or JSON invoice files.",
  "rows": [],
  "reviewRequired": true
}

Response Parameters

ParameterTypeDescription
statusCodeNumberBusiness-level status. 1 indicates success and 0 indicates rejection in the observed UAT cases.
messageStringResponse message.
rowsArrayContains extracted invoice records.
beneficiaryNameStringExtracted beneficiary name.
uniqueRefNoStringInvoice reference number.
amountNumberReported invoice amount.
grossAmountNumberReported gross amount.
taxableValueNumberReported taxable amount.
cgstNumberCentral GST amount.
sgstNumberState GST amount.
igstNumberIntegrated GST amount.
gstAmountNumberReported GST amount.
confidenceNumberExtraction confidence value. Its scale has not been verified.
sourceFileStringSource document name.
sourcePagesStringSource page information.
extractionMethodStringExtraction method reported by the API.
reviewRequiredBooleanIndicates that human review is required.

Error Handling

HTTP 200 with statusCode: 0

The request may return HTTP 200 even when the extraction is rejected. Check the business-level statusCode and message before treating the request as successful.

Important Notes

  • PDF extraction was observed in UAT.
  • PNG and JPEG uploads were rejected in the tested cases.
  • XML and JSON extraction remain unverified despite being mentioned in the rejection message.
  • Blank or supporting pages may produce additional invoice-shaped rows.
  • The confidence value should not be interpreted as a calibrated probability.
  • Verify extracted amounts, invoice identity and tax details before further processing.

What's Next

Review the extracted invoice records and correct any inaccuracies before submitting approved data for reconciliation.