Skip to main content
POST
/
gst
/
compliance
/
e-invoice
/
tax-payer
/
invoice
/
{irn}
/
e-way-bill
Generate E-Way Bill by IRN
curl --request POST \
  --url https://api.sandbox.co.in/gst/compliance/e-invoice/tax-payer/invoice/{irn}/e-way-bill \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "Irn": "20ba3c6f4945944c9c928369fb3047c6985302b17eaefc42eb8183caa99fde6b",
  "Distance": 5,
  "TransMode": "1",
  "TransId": "12AWGPV7107B1Z1",
  "TransName": "trans name",
  "TrnDocDt": "01/01/2024",
  "TrnDocNo": "TRAN/DOC/11",
  "VehNo": "KA12ER1234",
  "VehType": "R"
}'
{
"code": 200,
"data": {
"Data": {
"EwbDt": "2024-02-22 17:50:00",
"EwbNo": 101010315529,
"EwbValidTill": "2024-02-23 23:59:00"
},
"ErrorDetails": null,
"InfoDtls": [
{
"Desc": "Pin-Pin calc distance: 57KM",
"InfCd": "EWBPPD"
}
],
"Status": 1
},
"timestamp": 1763446641000,
"transaction_id": "15af04d4-6d42-4161-aa88-07d01046780b"
}

Headers

Authorization
string
required

E-Invoice access token

x-source
enum<string>
default:primary

Specifies the source to access, either primary (NIC 1) or secondary (NIC 2)

Available options:
primary,
secondary
Example:

"primary"

x-proxy
enum<string>

Enables criss-cross operations by routing requests through the specified source (e.g., access primary via secondary if primary is unavailable)

Available options:
primary,
secondary
Example:

"secondary"

x-api-version
string
default:1.0.0

API version

x-api-key
string
required

API key for identification

Path Parameters

irn
string
required

Invoice Reference Number

Body

application/json
Irn
string
required

Invoice Reference Number

Distance
integer
required

Distance between source and destination PIN codes. Pass 0 to auto calculate

TransId
string

Transporter number/GSTIN

TransMode
string

Mode of transport. Possible values: 1 - Road, 2 - Rail, 3 - Air, 4 - Ship

TransName
string

Transporter name

TrnDocDt
string

Transport Document Date

TrnDocNo
string

Transport Document Number

VehNo
string

Vehicle Number

VehType
string

Vehicle type. Possible values: O - ODC, R - Regular

Response

200 - application/json

4002 EWB already generated / 2302 Status of IRN is not active / 200 EWB generated (road) / 4009 EWB cannot be generated for Services / 200 Distance auto-calculated / 5002 Invalid distance / 4038 Distance too high / 4012 Transport document number missing / 4039 Vehicle cannot be regular in ship mode / 4020 Invalid vehicle type / 200 EWB generated (ship)

code
number
Example:

200

data
object
timestamp
number
Example:

1763446641000

transaction_id
string
Example:

"21f0d4c6-678b-473c-84f4-3c8849a08f1f"