Send one POST with the e-way bill JSON in the government's own format. You get back the 12-digit e-way bill number, its date and its validity. If the call times out, send the same document number again: you get the original e-way bill back instead of a duplicate.
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 body carries your GSTIN, the API username and password for that GSTIN, and a payload object. The payload is the e-way bill JSON exactly as the government network defines it (supplyType, docType, docNo, fromGstin, toGstin, itemList and the rest). gstinapi.in does not rename or reshape it.
The API username and password are not your normal portal login. You create them once on the e-way bill portal under Registration, For GSP.
A government-network call can occasionally run long enough that you cannot tell whether the e-way bill was filed. Do not generate a new document number. Send the same payload again with the same docNo.
If that document already exists, the response is the real e-way bill with already_existed set to true, billed like a fresh success. Sending a different document number is what actually risks a duplicate filing.
POST /v1/ewaybill/validate checks the payload locally for the mistakes that cause most rejections and charges nothing. Passing it does not guarantee acceptance: the government network also checks things no one else can see, such as a cancelled GSTIN or a duplicate document.
| Field | Type | Required | Meaning |
|---|---|---|---|
| gstin | string | Yes | The GSTIN you act as, with API access set up. |
| gstin_username | string | Yes | The e-way bill API username for that GSTIN. Never stored. |
| password | string | Yes | The matching API password. Never stored. |
| payload | object | Yes | One e-way bill JSON payload in the government's field names. |
| test_mode | boolean | No | true 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.
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" \
-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", "payload": { "supplyType": "O", "docType": "INV", "docNo": "INV-1001" }, "test_mode": true }'Response
{
"success": true,
"ewaybill_no": "351000000123",
"ewaybill_date": "23/10/2026",
"valid_upto": "25/10/2026",
"doc_no": "INV-1001",
"already_existed": false,
"billed_to": "paid",
"credits_remaining": 197
}| Code | Message | What to do |
|---|---|---|
| 108 | Invalid login credentials | The API username or password was refused. Usually the API user was created for a different GSP, or the password has special characters. |
| 604 | Already generated | Handled for you: the existing e-way bill is returned with already_existed: true. |
| HTTP 403 | paid_account_required | Real filings need an account that has bought a credit pack. test_mode works on any account. |
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.