Generate EWB by IRN#
Generate EWB via IRN offers single EWB generation as opposed to its enriched counterpart.
Route
/basic/einv/{flynn-version}/{irp}/eiewb/{e-invoice-api-version}/ewaybill
- active ‘flynn-version’: v1.0
- method: POST
URL Parameters#
Name | Description | Type |
---|---|---|
flynn-version | version of the API for example, v1.0 |
string |
irp | IRP Provider as per GST registration for e-invoicing | enum (ni1, ni2) |
e-invoice-api-version | E-invoice API version | string |
Headers#
All headers as mentioned in the Basic E-Invoice API introduction.
Apart from the common headers need to pass below headers
header | Description |
---|---|
irp | This request header is mandatory if Taxpayer wants to perform interoperability / criss-cross operations on IRN. Accepted values are NIC1 or NIC2 |
Tip
The only valid values for the header keys Content-Type
and accept
must have to be application/json
.
Request#
Body consists of the payload guided by IRP documentation present on this page
Please refer the following request body for reference-
Sample request body
{
"Irn": "988610af33bfa7cf38114cd804d537d5b95e2cbe402962f8494ec3ff83992fc9",
"Distance": 100,
"TransMode": "1",
"TransId":"12AWGPV7107B1Z1",
"TransName": "trans name",
"TransDocDt": "01/08/2020",
"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": 562160,
"Stcd": "29"
}
}
Response#
200
:#
Successful response will have the generated e-way bill entry in “data” attribute as a String
.
Sample response body
{
"data": "{\"EwbNo\":111008683051,\"EwbDt\":\"2020-04-24 11:28:00\",\"EwbValidTill\":\"2020-04-26 23:59:00\",\"Remarks\":null}"
}
502
:#
Sample Error response
"error": {
"message": "err-irp-returned-error",
"type": "irp",
"args": {
"details": [
{
"ErrorCode": "4003",
"ErrorMessage": "Requested IRN data is not available"
}
],
"data": "null"
}
}
E-invoice errors are mentioned under common errors.
Notes#
IRP - nic is deprecated. Instead of it please use ni1 or ni2