e-Way Bill API | GSP-Licensed

e-Way Bill API - Every dispatch event triggers an e-way bill. We make it one API call.

Generate, extend, and cancel e-way bills programmatically. Auto-populate from existing IRNs. Handle bulk dispatch from warehouses. Used in production by Pharmeasy (14 warehouses) and WheelsEye.

1import WhiteBooks from '@whitebooks/node'
2
3const client = new WhiteBooks({
4 apiKey: process.env.WB_API_KEY,
5 sandbox: false,
6});
7
8// Generate an e-way bill from an existing IRN
9const ewb = await client.ewaybill.generate({
10 irn: "a5c1...9f2e",
11 vehicleNumber: "KA01AB1234",
12 transportMode: "Road",
13 distance: 320,
14});
15
16console.log("EWB:", ewb.ewbNo)
200 OK·142ms

Three reasons e-way bill integrations break at scale.

01

Re-keying data from the invoice system

Most integrations require pushing all invoice and buyer data again to generate the e-way bill. WhiteBooks reads existing IRNs and pre-populates 90% of the e-way bill fields automatically.

02

Validity expiry mid-transit

Trucks break down. Routes divert. Bills expire. WhiteBooks emits a webhook 4 hours before any e-way bill expires, giving your dispatch team time to extend.

03

Consolidated bills for multi-invoice trips

When one vehicle carries 30 consignments, you generate one consolidated e-way bill — not 30. Most APIs don't expose consolidated bills cleanly; WhiteBooks does.

The endpoints. Documented like an API should be.

GET/authenticate

Authenticate with the e-Way Bill portal and obtain a session token. Required before any bill generation or query operation.

POST/ewayapi/genewaybill

Generate an e-way bill for a single consignment. Full consignor, consignee, item, tax, and transport details in, EWB number out.

POST/ewayapi/gencewb

Generate a consolidated e-way bill for a multi-consignment vehicle trip. Pass an array of EWB numbers on one trip sheet.

POST/ewayapi/extendvalidity

Extend validity near expiry with a reason code (vehicle breakdown, transshipment, natural calamity) and remaining distance.

POST/ewayapi/canewb

Cancel an e-way bill within 24 hours of generation, with a cancellation reason code and remark.

POST/ewayapi/rejewb

Reject an e-way bill assigned to you by another party. Returns updated EWB status after rejection.

POST/ewayapi/vehewb

Update Part-B / vehicle number mid-transit for transshipment. Requires transport mode, place, state, and reason.

PUT/ewayapi/updatetransporter

Reassign or update transporter ID mid-transit. Useful when logistics partners change hands during a long-haul movement.

POST/ewayapi/regentripsheet

Regenerate the consolidated trip sheet for a vehicle carrying multiple consignments. Returns updated print-ready PDF reference.

GET/ewayapi/getewaybill

Retrieve full e-way bill details, validity, and Part-A / Part-B status for any EWB number.

GET/ewayapi/getewaybillsbydate

Bulk-fetch all e-way bills generated on a given date. Ideal for daily reconciliation and dispatch-log audits.

GET/ewayapi/getewaybillsfortransporter

Fetch all e-way bills assigned to a specific transporter. Supports date-range filtering for fleet-level visibility.

GET/ewayapi/getewaybillsfortransporterbygstin

Retrieve all e-way bills for a transporter filtered by consigner or consignee GSTIN. Useful for vendor-level reconciliation.

GET/ewayapi/getewaybillsfortransporterbystate

Fetch transporter e-way bills filtered by the destination or origin state code. Supports multi-state logistics dashboards.

GET/ewayapi/getewaybillreportbytransporterassigneddate

Generate a report of e-way bills by the date they were assigned to a transporter. Useful for SLA tracking and on-time dispatch reporting.

GET/ewayapi/getewaybillsofotherparty

Fetch all e-way bills where your GSTIN is the counter-party (consignee or consignor) but not the generator. Essential for 3PL and marketplace flows.

GET/ewayapi/getewaybillsrejectedbyothers

List all e-way bills you generated that were rejected by the receiving party. Returns rejection reason codes for dispute resolution.

GET/ewayapi/getewaybillgeneratedbyconsigner

Retrieve all e-way bills generated by a specific consigner GSTIN. Useful for supplier-level tracking and audits.

GET/ewayapi/gettripsheet

Fetch the full consolidated trip sheet for a vehicle — all consignments, EWB numbers, and validity windows — in one call.

GET/ewayapi/gettransporterdetails

Look up a transporter's registered details by GSTIN — legal name, registration status, and vehicle fleet size on record.

GET/ewayapi/getgstindetails

Validate and fetch GSTIN details within the e-way bill portal context — legal name, registration status, and state code.

GET/ewayapi/gethsndetailsbyhsncode

Look up HSN code details — commodity description, applicable GST rate, and UQC (unit quantity code) — for e-way bill line items.

POST/ewayapi/initmulti

Initiate a bulk/multi-vehicle e-way bill session. Returns a session token used for batch add and update operations.

POST/ewayapi/addmulti

Add consignments to an active multi-vehicle session. Accepts an array of e-way bill numbers to be consolidated.

PUT/ewayapi/updtmulti

Update vehicle or transporter details for an active multi-vehicle session before finalising the consolidated trip sheet.

GET/ewayapi/geterrorlist

Retrieve the full list of EWB portal error codes with descriptions. Use to build meaningful error messages in your integration.

POST/ewayapi/clsewb

Close (consolidate and finalize) an e-way bill session. Marks all consignments in the session as dispatched and locks the trip sheet.

40+ ERP Integrations

Built for logistics, WMS, and TMS platforms.

SDKs in Node.js, Python, PHP, Java, Go. Integration patterns for warehouse management dispatch flows, transporter onboarding, and freight brokerage platforms. Webhooks: bill generated, bill approaching expiry (4hr alert), bill expired, vehicle updated, bill cancelled.

Real-time Sync

Native connectors for instant data flow

Always Up-to-date

Maintained against every ERP upgrade

Zero Manual Work

No CSV exports. No email uploads.

Enterprise Secure

Bank-grade security & data protection

40+
ERP Integrations
1000+
Customers using integrations
Real-time
Data Push
99.99%
Uptime SLA
  • Node.js
  • Python
  • PHP
  • Java
  • Go
  • .NET
  • Oracle NetSuite

What the AI does inside the API.

WhiteBooks runs a shared AI engine across every product. Trained on Indian compliance data, tuned for finance teams, and embedded in the workflows you already use.

01

Realistic transit prediction

Beyond GSTN's pin-to-pin calculation, WhiteBooks predicts realistic transit time based on route history, transporter performance, and seasonal factors. Returned in every bill creation response.

02

Anomaly flagging

Webhook events include flags for invalid vehicle number formats, unknown transporter IDs, distances outside historical norms, and bills generated outside typical dispatch hours.

03

Compliance copilot

Ask "show me all e-way bills that expired last week" or "which warehouses generated the most bills in March?" — answers from live data, source rows linked.

04

Bulk dispatch optimizer

Given a list of consignments and available vehicles, the /v1/ewaybill/optimize endpoint suggests vehicle assignments to minimize bills generated (via consolidated bills) and maximize utilization.

Frequently asked Questions.

Can I auto-generate an e-way bill from an IRN?+
Yes. Pass the irn field in the create request; WhiteBooks pulls all matching fields from the source invoice and pre-populates the e-way bill. You only need to add vehicle number, distance, and transport mode.
How does extension work via API?+
Call /v1/ewaybill/extend with the bill number, new vehicle number (if applicable), new validity period, and a reason code. Extensions are permitted within 8 hours before or 8 hours after expiry per GSTN rules.
Do you support consolidated e-way bills?+
Yes. The /v1/ewaybill/create-consolidated endpoint accepts an array of IRNs or invoice IDs and generates a single consolidated bill — the standard for multi-invoice vehicle trips.
What happens if I cancel a bill after 24 hours?+
GSTN rules don't permit cancellation after 24 hours. The bill will auto-expire at end of its validity. The API returns a clear error if you attempt cancellation outside the 24-hour window.
Can I update the vehicle number mid-transit?+
Yes. Call /v1/ewaybill/update-vehicle with the new vehicle number and reason code. Every update is logged with timestamp and user — required for audit and dispute resolution.
Do you provide webhooks for expiring bills?+
Yes. A ewaybill.expiring_soon event is emitted 4 hours before any active bill expires. Subscribe to alert your dispatch team in time to extend.

Logistics doesn't wait. Your e-way bill integration shouldn't either.

Pharmeasy generates e-way bills for 14 warehouses via the WhiteBooks API. WheelsEye uses the API for fleet onboarding and transporter invoice reconciliation. Same SLA, same direct GSP pipe.

See pricing · Full API reference