Skip to content

Verify Invoice With Eway Bill In File#

Verify Invoice With Eway Bill In File API supports verification of existance of the EwayBill and Invoice data for which the Eway Bill is generated. Data fields that can be verified are ewbNumber, docType, docNo, docDate, fromGstin, toGstin, totInvValue, cgstValue, sgstValue, igstValue, cessValue, otherValue and cessNonAdvolValue.These fields are validated based on the values provided along with Eway Bill Generation.

This verification is optional and will be triggered only if the respective field value is provided in File.

Verify Invoice With Eway Bill in File is an asynchronous API, hence will give a task ID in response.
Given a task ID, fetch the task status using Status API. In order to download the result, you would need to use Download API.

Note

  • Supported MIME Type : csv
  • Duplicate Eway Bill numbers will not be allowed in file.
  • One API call can accept one file with maximum 50 invoices.
  • Maximum allowed file size is 1KB.

API Route#

Route

/enriched/eway/{flynn-version}/{ewb_provider}/eway-bills/verify-ewb-with-doc

  • active ‘flynn-version’ : v3.0
  • method: POST

URL Parameters#

Name Description Type
flynn-version version of the API, for example (v3.0) string
ewb_provider Eway bill provider
for example, ew1
enum(ew1, ew2)

Headers#

All headers as mentioned in the Trade Verification Invoice and EWB APIs introduction

Tip

The only valid values for the header keys Content-Type and accept must have to be multipart/form-data and application/json.

Request#

Body consists of two form-data, with key “file” and “meta”.
file key contains allowable file as value with Invoice and E-way Bill information for verification.
meta key contains JSON as string.which consists of meta information for call i.e,
  • Tolerance :   While validating amount fields this value will be considered. This will be the allowable amount of variation(±) in Rupees, during comparison. This is an optional input and the default value is 0.
  • ToleranceInPercentage :   If this flag is set true then while validating amount fields tolerance value mentioned above will be considered as percentage. This is an optional input and the default value is false.
  • PDF :   If this flag set to true and if verification is successful, the Eway Bill PDF will be generated and added to response. This is optional input and the default value is false.
  • JSON :   If this flag set to true and if verification is successful, the Eway Bill Json will be added to response. This is an optional input and the default value is false.
  • FileFormatType :   This input value is mandatory and indicates the placement of the fields in the csv file. This value is used to parse the input file. Valid values for FileFormatType are:

    For following details, column and row index is zero based

    1. ewbNumber :

      • column Headers : None
      • Data Start Row : 0
      • Data: Only Contains ewbNumber values in column 0

        0 1 2 3
        0 141002176530
        1 111002176531
        2 181002176532
    2. default :

      • Column Headers : Names will be in following sequence only and mandatory that start from column 0 ewbNumber,docType,docNo, docDate,fromGstin, toGstin, totInvValue, totalValue,cgstValue,sgstValue,igstValue,cessValue,otherValue, cessNonAdvolValue
      • Data Start Row: 1
      • Data : Data corresponding to the column headers mentioned above

        ewbNumber docType docNo docDate fromGstin toGstin totInvValue totalValue cgstValue sgstValue igstValue cessValue otherValue cessNonAdvolValue
        141002176530 INV 1674455553249VZY 23/01/2023 29AAACW4202F1ZM 29AEKPV7203E1Z9 11556371.34 5609889 336593.34 336593.34 0 0 -1 1
        111002176531 INV 1674455553249VZY 23/01/2023 29AAACW4202F1ZM 29AEKPV7203E1Z9 11556371.34 5609889 336593.34 336593.34 0 0 -1 1
    3. custom :

      • This type enables complete configurable file. This configuration should be provided in meta section with fileFormat.This contains details sush as startRow, defaultDocType, defaultFromGstin, defaultToGstin and at whar index following fieldValue are set such as ewbNumber, docType, docNo, docDate, fromGstin, toGstin, totInvValue, totalValue, cgstValue, sgstValue, igstValue, cessValue, otherValue, cessNonAdvolValue. If all ewb details contains the same docType, fromGstin and toGstin then it can be configured in defaultDocType, defaulFromGstin, defaultToGstin instead of repeating in all rows.
      • Column Headers : Headers are optional
      • Data Start Row : This is an input value for the API and is optional. Default value is 0.
      • Data : Data corresponding to the field names in the input specified in the meta section as fileFormat. Allowed set of fields is ewbNumber, docType, docNo, docDate, fromGstin, toGstin, totInvValue, totalValue, cgstValue, sgstValue, igstValue, cessValue, otherValue

        {
            "fileFormat": {
            "startRow": 1,
            "ewbNumber": 2,
            "docNo": 0,
            "totInvValue": 1,
            "cessNonAdvolValue": 3,
            "defaultFromGstin": "29AAACW4202F1ZM"
           }
        }
        
        File content for above format -

      Invoice No Invoice Amount E-wayBill No. toGstin
      1674455553249VZY 11556371.34 141002176530 29AEKPV7203E1Z9
      1674455731332LXX 11556371.34 111002176531 29AAAAA1303P1ZV
      1674455812833FT0 11556371.34 181002176532 29ALSPR1722R1Z3

Sample Json For meta

{
    "pdf": "N",
    "json": "Y",
    "tolerance": "2",
    "isToleranceInPercentage":"N",
    "fileFormatType": "custom",
    "fileFormat": {
        "startRow": 2,
        "ewbNumber": 0,
        "docType": 1,
        "docNo": 2,
        "docDate": 3,
        "fromGstin": 4,
        "toGstin": 5,
        "totInvValue": 6,
        "totalValue": 7,
        "cgstValue": 8,
        "sgstValue": 9,
        "igstValue": 10,
        "cessValue": 11,
        "otherValue": 12,
        "cessNonAdvolValue": 13
    }
}

Only ewbNumber is the mandatory field in file, other fields are optional.

Response#

200:#

Successful response will have an async task-id. Using this task-id you will be able to fetch the status of the request.

Sample Response Body

{
  "status": "1",
  "data": {
      "task-id": "d139aedf-395a-4b6d-a76c-bb2c9bf83098"
  },
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
}
Download API Response:#

Download API response is unique for each API.
content of result.json file in case in meta json and pdf is true and verification is successful

Example

{
  "status": "1",
  "data": [
    {
      "status": "1",
      "data": {
        "details": null,
        "json": "141002176530.json",
        "pdf": "141002176530.pdf"
      },
      "error": null,
      "info": null,
      "additionalInfo": {
        "key": {
          "ewb-number": "141002176530"
        }
      },
      "alert": null
    }
  ],
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
}

Content of result.json file in case in meta json and pdf is false and verification is successful

Example

{
  "status": "1",
  "data": [
    {
      "status": "1",
      "data": {
        "details": null,
        "json": null,
        "pdf": null
      },
      "error": null,
      "info": null,
      "additionalInfo": {
        "key": {
          "ewb-number": "141002176530"
        }
      },
      "alert": null
    }
  ],
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
}

Content of result.json file in case of field verification failed

Example

{
  "status": "1",
  "data": [
      {
          "status": "0",
          "data": null,
          "error": [
              {
                  "type": "client-request",
                  "message": "err-ewb-verification-failed",
                  "args": {
                      "invalid docNo": "1674455553249VY",
                      "invalid docDate": "02/01/2023"
                  }
              }
          ],
          "info": null,
          "additionalInfo": { 
            "key": { 
              "ewb-number": "141002176530" 
              } 
            },
          "alert": null
      }
  ],
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
} 

Contents of ewb.json file in case json is true

Sample ewb.json File

{
  "actFromStateCode": 29,
  "actToStateCode": 29,
  "actualDist": 7,
  "cessValue": 0.0,
  "cgstValue": 336593.34,
  "docDate": 1674432000000,
  "docNo": "1674455553249VZY",
  "docType": "INV",
  "ewayBillDate": "23/01/2023 12:02:00 PM",
  "ewbNo": 141002176530,
  "extendedTimes": 0,
  "fromAddr1": "2ND CROSS NO 59  19  A",
  "fromAddr2": "GROUND FLOOR OSBORNE ROAD",
  "fromGstin": "29AAACW4202F1ZM",
  "fromPincode": 577217,
  "fromPlace": "FRAZER TOWN",
  "fromStateCode": 29,
  "fromTrdName": "welton",
  "genMode": "API",
  "igstValue": 0.0,
  "noValidDays": 1,
  "rejectStatus": "N",
  "vehicleType": "R",
  "sgstValue": 336593.34,
  "status": "ACT",
  "subSupplyType": "1",
  "supplyType": "O",
  "toAddr1": "Shree Nilaya",
  "toAddr2": "Dasarahosahalli",
  "toGstin": "29AEKPV7203E1Z9",
  "toPincode": 560008,
  "toPlace": "Beml Nagar",
  "toStateCode": 29,
  "transactionType": 1,
  "totalValue": 5609889.0,
  "totInvValue": 11556371.34,
  "otherValue": -1.0,
  "cessNonAdvolValue": 1.0,
  "toTrdName": "sthuthya",
  "transporterId": "29AAACW6288M1ZH",
  "transporterName": "WELBURN CANDLES PRIVATE LIMITED",
  "userGstin": "29AAACW4202F1ZM",
  "validUpto": "24/01/2023 11:59:00 PM",
  "itemList": [
    {
      "productDesc": "Wheat",
      "cessRate": 0.0,
      "cgstRate": 6.0,
      "hsnCode": 1001,
      "igstRate": 0.0,
      "productId": "0",
      "productName": "Wheat",
      "qtyUnit": "BOX",
      "quantity": 4.0,
      "sgstRate": 6.0,
      "taxableAmount": 5609889.0,
      "itemNo": 1,
      "cessNonAdvol": 0.0
    }
  ],
  "VehiclListDetails": [
    {
      "updMode": "API",
      "vehicleNo": "KA51AB4094",
      "fromPlace": "FRAZER TOWN",
      "fromState": 29,
      "tripshtNo": 0,
      "userGSTINTransin": "29AAACW4202F1ZM",
      "enteredDate": "23/01/2023 12:02:00 PM",
      "transMode": "1",
      "transDocNo": "",
      "transDocDate": "23/01/2023",
      "groupNo": "0"
    }
  ]
}

Notes#

Below URL is deprecated now. Instead of it please use New URL.
/enriched/ewb/{flynn-version}/eway-bills/verify-ewb-with-doc