For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Response - Success:

HTTP Status code - 200

Response - Failure:

HTTP Status Code - 200

Response - Failure:

HTTP Status Code - 200

Response - Failure:

HTTP Status Code - 200 B2B/SEZ override attempts are rejected the same way with code 2324 ("Ship details provided during IRN generation cannot be replaced for B2B/SEZ transactions").

API Validations:

  1. Ship-To GSTIN already in the IRN- Auto-populated: If this field is omitted in the EWB-by-IRN request, the value from the corresponding IRN will be used automatically.

  2. B2B/SEZ Ship- To details in the IRN cannot be modified or replaced. You may only provide a Ship-To GSTIN if it was not present in the IRN. The request will be rejected even if you submit the same Ship-To details as those in the IRN.

  3. Export cases- Ship-To details (including Ship-To GSTIN) can be overridden. URP is allowed for unregistered recipients. Any replacement GSTIN must be a valid, registered GSTIN; otherwise, NIC will reject the request.

API Constraints:

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

Last updated

Was this helpful?