Send a 12-digit e-way bill number and get a PDF back, laid out like the e-way bill portal print with the QR code, the Part A and Part B blocks, the goods and tax totals and the barcode. Choose the plain print or the detailed print.
Cost: 1 credit per PDF. A number that is not found also costs 1; a refusal or a failed PDF is free.
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.
print_type "detailed" (the default) follows the portal's Detailed Print: the e-way bill details, the From and To address boxes, the goods table with tax totals, the transportation details and the vehicle table. print_type "regular" follows the portal's plain Print: the Part A block, the Part B vehicle table and the barcode.
The PDF is built from the e-way bill data and laid out like the portal print. It is not the official print from the e-way bill portal, and the footer says so. Where an official copy is required, take the print from the portal.
By default the response body is the PDF itself, with the remaining balance in the X-Credits-Remaining header. Send format "base64" to get JSON with pdf_base64 instead, which is easier to pass on from a server.
| 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. |
| ewaybill_no | string | Yes | The 12-digit e-way bill number. |
| print_type | string | No | "detailed" (default) or "regular". |
| format | string | No | Omit for the PDF file, or "base64" for JSON with pdf_base64. |
| 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/pdf" \
-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", "print_type": "detailed", "format": "base64", "test_mode": true }'Response
{
"success": true,
"ewaybill_no": "351000000123",
"content_type": "application/pdf",
"pdf_base64": "JVBERi0xLjMK...",
"billed_to": "paid",
"credits_remaining": 198
}| Code | Message | What to do |
|---|---|---|
| 325 | Could not retrieve data | No e-way bill is available to you under that number. Charged 1 credit, as it was a real lookup; no PDF is made. |
| HTTP 400 | print_type or format not recognised | Free. print_type is "detailed" or "regular"; format is omitted or "base64". |
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.