Skip to content

Generate EWB by IRN#

Generate EWB via IRN offers single EWB generation as opposed to its enriched counterpart.

Route

/basic/einv/{flynn-version}/{irp}/eiewb/{e-invoice-api-version}/ewaybill

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

URL Parameters#

Name Description Type
flynn-version version of the API
for example, v3.0
string
irp IRP Provider as per GST registration for e-invoicing enum (ni1, ni2)
e-invoice-api-version E-invoice API version string

Headers#

All headers as mentioned in the Basic E-Invoice API introduction.

Apart from the common headers need to pass below headers

header Description
irp This request header is mandatory if Taxpayer wants to perform interoperability / criss-cross operations on IRN. Accepted values are NIC1 or NIC2

Tip

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

Request#

Body consists of the payload guided by IRP documentation present on this page

Please refer the following request body for reference-

Sample request body

{
    "Irn": "988610af33bfa7cf38114cd804d537d5b95e2cbe402962f8494ec3ff83992fc9",
    "Distance": 100,
    "TransMode": "1",
    "TransId":"12AWGPV7107B1Z1",  
    "TransName": "trans name",
    "TransDocDt": "01/08/2020",
    "TransDocNo": "TRAN/DOC/11",
    "VehNo": "KA12ER1234",
    "VehType": "R",
    "ExpShipDtls": {
        "Addr1": "7th block, kuvempu layout",
        "Addr2": "kuvempu layout",
        "Loc": "Banagalore",
        "Pin": 562160,
        "Stcd": "29"
    },
    "DispDtls": {
        "Nm": "ABC company pvt ltd",
        "Addr1": "7th block, kuvempu layout",
        "Addr2": "kuvempu layout",
        "Loc": "Banagalore",
        "Pin": 562160,
        "Stcd": "29"
    }
}

Response#

200:#

Successful response will have the generated e-way bill entry in “data” attribute as a String.

Sample response body

{
"status": "1",
"data": {
    "EwbNo": 661010233323,
    "EwbDt": "2023-07-06 16:44:00",
    "EwbValidTill": "2023-07-13 23:59:00",
    "Remarks": null
},
"error": null,
"info": [
    {
        "InfCd": "EWBPPD",
        "Desc": "Pin-Pin calc distance: 1308KM"
    }
],
"additionalInfo": null,
"alert": null
}
502:#

Sample Error response

{
"status": "0",
"data": null,
"error": {
    "message": "err-irp-returned-error",
    "type": "Irp",
    "args": {
        "details": [
            {
                "ErrorCode": "4003",
                "ErrorMessage": "Requested IRN data is not available"
            }
        ]
    }
},
"info": null,
"additionalInfo": null,
"alert": null
}

E-invoice errors are mentioned under common errors for v3.0 api.

Notes#

IRP - nic is deprecated. Instead of it please use ni1 or ni2