Cancel E-way Bills#
Cancel EWB(s) API supports cancellation of bulk e-way bills, as opposed to its basic counterpart. Cancel e-ewb API will give a reference ID in response.
Given a reference ID, you could fetch its status and number of completed and pending e-way bills using Status API. In order to download the result, you would need to use Result API.
Route
/enriched/einv/{flynn-version}/{irp}/invoices/cancel-ewb
- active ‘flynn-version’: v3.0
- method: POST
URL Parameters#
Name | Description | Type |
---|---|---|
flynn-version | version of the API for example, v3.0 |
string |
irp | IRP Provider as per GST registration for e-invoicing | enum (ni1, ni2) |
Headers#
All headers as mentioned in the Enriched E-Invoice API introduction.
Tip
The only valid values for the header keys Content-Type
and accept
must have to be application/json
.
Request#
Body consists of two sections, “payload” and “meta”.
payload
contains actual EWB cancel requests in a list.
The schema of the payload is guided by the NIC portal. Please check the published documentation.
Sample Request Body
{
"payload": [
{
"ewbNo": 611008686183,
"cancelRsnCode": "1",
"cancelRmrk": "Cancelled the order"
},
{
"ewbNo": 12345678,
"cancelRsnCode": "1",
"cancelRmrk": "Cancelled the order"
}
],
"meta": null
}
Response#
200
:#
Successful response will an async task-id
.
Using this task-id
you will be able to fetch the status of the request.
Sample Response Body
{
"status": "1",
"data": {
"task-id": "2a51e392-529c-4b5a-bfd8-ca14d510a68d"
},
"error": null,
"info": null,
"additionalInfo": null,
"alert": null
}
Result API Response:#
Result API response is unique for each API.
Sample Response Body
{
"status": "1",
"data": [
{
"status": "1",
"data": {
"ewayBillNo": "671010236325",
"cancelDate": "14/07/2023 04:51:00 PM"
},
"error": null,
"info": null,
"additionalInfo": null,
"alert": null
},
{
"status": "1",
"data": {
"ewayBillNo": "601010236324",
"cancelDate": "14/07/2023 04:51:00 PM"
},
"error": null,
"info": null,
"additionalInfo": null,
"alert": null
}
],
"error": null,
"info": null,
"additionalInfo": null,
"alert": null
}
data
key will contain the list of responses for the respective list of documents requested for generating e-invoices.
Each successful item of the list contains, two key - status
and details
.
For successful generation of IRN status
will be True
and details
will contain response as per the ‘E-Invoice API Documentation’ published by NIC.
In the error scenario value of the status
key will be False
and error
will contain error details.
List order will be maintained in the json response.
Notes#
IRP - nic is deprecated. Instead of it please use ni1 or ni2