All e-way bill and e-invoice API calls

Cancel an e-way bill

POST /v1/ewaybill/cancel

Short answer

Send the e-way bill number and a reason. It is cancelled and you get the cancellation time back. It has to be done by the generator, within 24 hours of generating the e-way bill: after that the network answers with error 728.

Cost: 3 credits per successful call. A rejection or an upstream failure is never charged.

Every call accepts "test_mode": true and returns a sample in the live shape, free. Set up your API credentials before the first real call.

The 24-hour rule

An e-way bill can be cancelled by its generator only, and only within 24 hours of generation. Past that, error 728 says "You can cancel the ewaybill within 24 hours from Part B entry" and nothing can be done through the API.

If you generate e-way bills while testing, cancel them in the same session. They cannot be cancelled the next day.

Reason codes

cancel_reason_code is one digit: 1 Duplicate, 2 Order Cancelled, 3 Data Entry mistake, 4 Others. Add a short cancel_remark.

These are not the same numbers as the e-invoice cancellation reasons, where 2 is Data entry mistake. Do not reuse one table for the other.

Request fields

FieldTypeRequiredMeaning
gstinstringYesThe GSTIN you act as, with API access set up.
gstin_usernamestringYesThe e-way bill API username for that GSTIN. Never stored.
passwordstringYesThe matching API password. Never stored.
ewaybill_nostringYesThe e-way bill number to cancel.
cancel_reason_codestringNo1 Duplicate, 2 Order Cancelled, 3 Data Entry mistake, 4 Others. Defaults to 2.
cancel_remarkstringNoShort free-text remark.
test_modebooleanNotrue returns a sample in the live shape: free, nothing is filed.

Send your API key in the x-api-key header. Government API credentials are used for the one call and never stored.

Example

The request below runs in test mode, so it is free and files nothing. Remove test_mode for a real call.

curl -X POST "https://www.gstinapi.in/v1/ewaybill/cancel" \
  -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{ "gstin": "24AAAAA0000A1Z5", "gstin_username": "YOUR_EWB_API_USER", "password": "YOUR_EWB_API_PASSWORD", "ewaybill_no": "351000000123", "cancel_reason_code": "2", "cancel_remark": "Order cancelled", "test_mode": true }'

Response

{
  "success": true,
  "ewaybill_no": "351000000123",
  "cancel_date": "23/10/2026",
  "billed_to": "paid",
  "credits_remaining": 197
}

Errors you can expect

CodeMessageWhat to do
728You can cancel the ewaybill within 24 hours from Part B entryToo late. Generate a correct e-way bill instead; the old one stays until it expires.

All e-way bill API error codes

Questions

Can the transporter cancel?
No. Only the generator of the e-way bill can cancel it.
What if the e-way bill is part of a consolidated e-way bill?
Cancel it only after checking the trip sheet. A consolidated e-way bill is regenerated with the remaining e-way bills rather than edited.

Not affiliated with the Government of India. Rules are the government network's own and can change; if a page here looks out of date, tell us.