Overview

Sequence Diagram

The format and details of Cancellation of E-way bill API request is depicted in following table.

Note: This API is provided only on the Sandbox environment. On the production environment, the Cancel E Way Bill API of the E Way Bill System only should be used.

URL <URL>/ewayapi/

Content-Type

application/json

Method

POST

Request Payload

Request Header

Attributes Description
client-id client id to be provided by E-Invoice System
client-secret Secret to be provided by E-Invoice System
Gstin GSTIN of Requester(Tax payer or Transporter)
authtoken Authentication token returned by the E-Invoice System

Request Payload

Attributes

Description

action

CANEWB

CANEWB

Encrypt(Base64(Request JSON),sek)

Cancelled E-way bill JSON string.

Response Payload

Attributes Description Value
status Status of request 1 – Success; 0 - Error
Encrypt(Base64(Response JSON),sek) Response of Cancelled E-way bill JSON string. The response will have cancelled eway bill number and cancelled date if it is successfully cancelled. Otherwise the response will have error codes

If Status is ‘1’

Data Base 64 encoded string of decrypted invoice JSON using Sek.
After decrypting Data the following attributes are obtained as below.
Attributes Description
EwbNo e-waybill Number
EwbDt e-waybill date
EwbValidTill e-waybill validity

If Status is ‘0’

error Base 64 encoded string.
On decoding error the following attributes from JSON array are obtained as follows.
ErrorCode Unique error code

Sample JSON (Request)

CANCEL E-WAY BILL Request

{
"action":"CANEWB ",
"data":"eyAgDQoiZXdiTm8iOiAxMTEwMDA2MDkyODIsDQogImNhbmN lbFJzbkNvZGUiOiAyLA0KImNhbmNlbFJtcmsiOiAiQ2FuY2Vsb GVkIHRoZSBvcmRlciINCn0NCg== "
}

“data” JSON (corresponds to the data element of Cancel E-WAY BILL Request)

{  
"ewbNo": 111000609282,
"cancelRsnCode": 2,
"cancelRmrk": "Cancelled the order"
}

Sample JSON (Response)

{
"status":"1",
"data":"ew0KCSJld2F5QmlsbE5vIjogIjExMTAwMDYwOTI4MiIsDQoJIm NhbmNlbERhdGUiOiAiMTUvMTIvMjAxNyAxMTozN TowMCBBTSINCn0="
}

“data” JSON (corresponds to the data element of Cancelled EWB Response(Success))

{   
"ewayBillNo": "111000609282",
"cancelDate": "15/12/2017 11:35:00 AM"
}

JSON(in case of error)


"status": "0",
"error":{"errorCodes": 240}
}

JSON Schema

{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ewbNo": {
"type": "number",
"description": "EwayBill Number"
},
"cancelRsnCode": {
"type": "number",
"description": "Reason for cancellation"
},
"cancelRmrk": {
"type": "string",
"description": "Remarks"
}
},
"required": [
"ewbNo",
"cancelRsnCode"
]
}

Validations

  1. E-way bill can be cancelled by the generator of the e-way bill only.
  2. E-way bill can be cancelled within 24 hours of generation of e-way bill

Frequently Asked Questions

Content will be updated shortly.