Skip to main content
POST

Request body schema

View request body schema

Headers

authorization
string
required

E-Invoice access token. For token-generation steps, refer to the Generate E-Invoice Session recipe, then pass the token in the authorization header.

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

Body

application/json
Irn
string
required

Invoice Reference Number

Required string length: 64
Distance
integer<int32>
required

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

Required range: 0 <= x <= 4000
TransId
string

Transporter number/GSTIN

Required string length: 15
Pattern: ([0-9]{2}[0-9A-Z]{13})
TransName
string

Transporter name

Required string length: 3 - 100
Pattern: ^([^\"])*$
TransMode
enum<string>

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

Available options:
1,
2,
3,
4
Required string length: 1
Pattern: ^([1-4]{1})?$
TransDocNo
string

Transport Document Number

Required string length: 1 - 15
Pattern: ^([a-zA-Z0-9/-]{1,15})$
TransDocDt
string

Transport Document Date

Required string length: 10
Pattern: ^[a-zA-Z0-9]{1}[a-zA-Z0-9-/]*$
VehNo
string

Vehicle Number

Required string length: 4 - 20
Pattern: ^([A-Z|a-z|0-9]{4,20})$
VehType
enum<string>

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

Available options:
O,
R
Required string length: 1
Pattern: ^([O|R]{1})$
ExpShipDtls
object
DispDtls
object

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)

A successful NIC response or a NIC business-error response. Both variants use HTTP 200.

code
enum<integer>
required

HTTP-compatible Sandbox response code.

Available options:
200
Example:

200

timestamp
integer<int64>
required

Unix timestamp in milliseconds.

Example:

1763446641000

transaction_id
string
required

Request transaction identifier.

Example:

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

data
object
required