Skip to main content
POST

NIC validations

  1. E-waybill can be generated only if E-way Bill related details are passed where distance is mandatory.
  2. E-way Bill is not generated for document types of Debit Note and Credit Note and Services.
  3. E Way Bill can be generated provided at least HSN of one item belongs to goods.
  4. If only Transporter Id is provided, then only Part-A is generated. Transport Mode, Vehicle Type, Vehicle No, Transportation document number and date should be null or attributes should not have been passed.
  5. If mode of transportation is “Road”, then the Vehicle number and vehicle type should be passed. If mode of transportation is Ship, Air, Rail, then the transport document number and date should be passed. Vehicle type and vehicle number should be null or attributes should not have been passed.
  6. The Vehicle no. should match with specified format and exist in Vahan database.
  7. E-Waybill will not be generated if the Supplier or Recipient GSTIN is blocked due to non-filing of Returns.
  8. Pincode of Recipient GSTIN is mandatory if Ship-To details are not entered.
  9. The distance of transportation is validated against the auto-calculated PIN-PIN distance stored in the system. The allowed distance for transportation should be between +/- 10 % of auto-calculated PIN-PIN distance. . If the auto-calculated distance is less than 100 KMs, then The allowed distance for transportation should be between 1 and +10 % of auto-calculated PIN-PIN distance.
  10. If the distance of transportation is passed as 0 (zero), then the system will consider it as request made by the tax payer, to consider the auto-calculated PIN-PIN distance for the generation of e-way bill and generate the e-way bill along with IRN. The actual distance is passed in “Info. Message” Column for reference.
  11. If the PIN-PIN distance is not available in the system, the passed value of distance will be taken for generation of e-way bill and distance value can not be more than 4000.
  12. The actual distance has to be passed in case the source and destination PIN codes are same and the allowed range of value is from 1 to 100.
  13. In case of export of goods, if e-way bill has to be generated, then the address of port should have been passed as shipping address during generation of IRN.
  14. During generation of IRN for export, the shipping address of the port can be updated here for generating the e-Way Bill.
  15. If the dispatching address and/or shipping address have not been passed during generation of IRN, then the respective addresses can be passed here.
  16. If e-commerce wants to Get the RCM Invoice details, in the headers the supplier GSTIN value should be the Recipient GSTIN.

Request body schema

View request body schema

Authorizations

authorization
string
header
required

E-invoice taxpayer access token returned by Authenticate.

x-api-key
string
header
required

Sandbox API key from your Sandbox account.

Headers

x-source
enum<string>
default:primary

NIC server for the session used by this request. primary selects NIC1. secondary selects NIC2. Defaults to primary. See NIC1 and NIC2 routing.

Available options:
primary,
secondary
Example:

"primary"

x-proxy
enum<string>

NIC server that receives the request. If omitted, the request goes to the server selected by x-source. When specified, selects the other server. See NIC1 and NIC2 routing.

Available options:
primary,
secondary
Example:

"secondary"

x-api-version
string
default:1.0.0

API version

Path Parameters

irn
string
required

Query Parameters

supplier_gstin
string

Supplier GSTIN when an e-commerce operator acts on behalf of the supplier. For reverse charge mechanism (RCM) invoices, this is the recipient GSTIN.

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

See transport modes.

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

See vehicle number formats.

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

See vehicle types.

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