Generate E-Waybill by IRN

You can use this API to generate the e-waybill using the Invoice Registration Number (IRN).

Request Method

POST

Request URL

{{HOST}}/einv/v2/eInvoice/ewaybill

Request Headers

PARAMETER
PARAM TYPE
TYPE
DESCRIPTION

X-Cleartax-Auth-Token

Header

String

Mandatory. The auth token generated from ClearTax user id and password.

gstin

Header

String

Mandatory. Users GSTIN

Request Path Params

There are no path parameters for this API.

Request Query Params

There are no query parameters for this API.

Request Body

Parameter
Data Type
Field Validations
Description

Irn

String

minLength: 64

maxLength: 64

Mandatory. IRN generated for the invoice.

TransId

String

minLength: 15

maxLength: 15

pattern: "([0-9]{2}[0-9A-Z]{13})"

Conditional. Transporter GSTIN or CEN (Common Enrollment Number)

TransName

String

minLength: 3

maxLength: 100

pattern: "^([^\\\"])*$"

Optional. Name of the transporter.

TransMode

String

minLength: 1

maxLength: 1

enum: ["1", "2", "3", "4"]

Conditional. Mode of transport (Road-1, Rail-2, Air-3, Ship-4)

Distance

Number

minimum: 1

maximum: 4000

Mandatory. Distance between source and destination PIN codes

TransDocNo

String

minLength: 1

maxLength: 15

pattern: "^([a-zA-Z0-9\/-]{1,15})$"

Optional. Transport Document Number

TransDocDt

String

minLength: 10

maxLength: 10

pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"

Optional. Transport Document Date

VehNo

String

minLength: 4

maxLength: 20

pattern: "^([A-Z|a-z|0-9]{4,20})$"

Conditional. Vehicle Number

VehType

String

minLength: 1, maxLength: 1,

enum: ["O", "R"],

Conditional. Whether O-ODC or R-Regular

ExpShipDtls

Object

DispDtls

Object

Response Status Codes

HTTP Status Code
Description

200

For a successfully processed request (may be a success or validation error).

400

Bad Request. Invalid JSON Payload

401

If the user is not authenticated for the operation.

403

If the user is not authorized for the operation.

500

If there are any unhandled exceptions on the Clear side.

Response Schema

Parameter
Data Type
Field Validations
Description

Success

Boolean

‘Y’, ‘N’

If Success or Failure.

AckNo

Number

NA

IRN Acknowledgement Number

AckDt

String

NA

IRN Acknowledgement Date

IRN

String

64 Digits

Invoice Reference Number

Status

String

Enum: Generated

Generation Status of EWB

EwbNo

Number

NA

E-Way bill Number.

EwbDt

String

NA

E-Way bill generation date and time.

EwbValidTill

String

NA

E-Way bill expiry date and time.

info

List

NA

List of Objects. If there will be error, this field will not be present in the response.

Info Object Details

Parameter
Data Type
Field Validations
Description

InfCd

String

NA

EWBPPD

EWB Pin to Pin Distance

Desc

String

NA

Pin to Pin calculated distance

Sample Request & Response

Request

[
    {
        "Irn": "1f4f2e175c590658931cca809b6b0880bcb176469cb874ae35d6bc7d5ac68a52",
        "Distance": 0,
        "TransMode": "1",
        "TransId": "12AWGPV7107B1Z1",
        "TransName": "trans name",
        "TransDocDt": "26/10/2023",
        "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": 560027,
            "Stcd": "29"
        }
    }
]

Response - Success:

HTTP Status code - 200

[
    {
        "TransId": "12AWGPV7107B1Z1",
        "TransName": "trans name",
        "TransMode": "1",
        "Distance": 0,
        "VehNo": "KA12ER1234",
        "VehType": "R",
        "Irn": "49463cfdd39b418b85fa3173a0c2a3d528c2168255b45360221205be2b3904e2",
        "govt_response": {
            "Success": "Y",
            "AckNo": 112310186089002,
            "AckDt": "2023-10-19 15:15:00",
            "Irn": "49463cfdd39b418b85fa3173a0c2a3d528c2168255b45360221205be2b3904e2",
            "Status": "GENERATED",
            "EwbNo": 121010274297,
            "EwbDt": "2023-10-19 15:15:00",
            "EwbValidTill": "2023-10-20 23:59:00",
            "info": [
                {
                    "InfCd": "EWBPPD",
                    "Desc": "Pin-Pin calc distance: 80KM"
                }
            ]
        },
        "ewb_status": "GENERATED"
    }
]

Response - Failure:

HTTP Status Code - 200

[
    {
        "TransId": "12AWGPV7107B1Z1",
        "TransName": "trans name",
        "TransMode": "1",
        "Distance": 0,
        "TransDocNo": "TRAN/DOC/11",
        "TransDocDt": "26/10/2023",
        "VehNo": "KA12ER1234",
        "VehType": "R",
        "Irn": "1f4f2175c590658931cca809b6b0880bcb176469cb874ae35d6bc7d5ac68a52",
        "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": 560027,
            "Stcd": "29"
        },
        "govt_response": {
            "Success": "N",
            "Irn": "1f4f2175c590658931cca809b6b0880bcb176469cb874ae35d6bc7d5ac68a52",
            "ErrorDetails": [
                {
                    "error_code": "107",
                    "error_message": "irn : Invalid Invoice Reference Number, should be 64 characters in length. Please correct the IRN and try again.",
                    "error_source": "CLEARTAX"
                }
            ]
        }
    }
]

API Validations

Currently there are no known validations for this API.

API Constraints

A Maximum of 5 E-Waybills can be generated in an API call.

Last updated

Was this helpful?