All e-way bill and e-invoice API calls

E-way bill PDF API

POST /v1/ewaybill/pdf

Short answer

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.

Regular or detailed

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.

A copy, not the official print

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.

File or JSON

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.

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 12-digit e-way bill number.
print_typestringNo"detailed" (default) or "regular".
formatstringNoOmit for the PDF file, or "base64" for JSON with pdf_base64.
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/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
}

Errors you can expect

CodeMessageWhat to do
325Could not retrieve dataNo e-way bill is available to you under that number. Charged 1 credit, as it was a real lookup; no PDF is made.
HTTP 400print_type or format not recognisedFree. print_type is "detailed" or "regular"; format is omitted or "base64".

All e-way bill API error codes

Questions

Is this the official e-way bill print?
No. It is our copy of the e-way bill data, laid out like the portal print, and the footer says so. Use the portal print where an official copy is required.
Can I read an e-way bill another party generated?
Only one your GSTIN is a party to, the same as the details call.

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.