Generate an e-Way Bill

You can generate an e-Way Bill in two modes.

Mode 1 — derive from an IRN (preferred)

If you've already generated the IRN through OneFinOps, pass its id and we'll pull seller, buyer, totals and items from the IRN record. You only supply transport details.

POST /v1/ewaybills HTTP/1.1
Host: api.in.onefinops.com
Authorization: Bearer ...
Idempotency-Key: ewb-INV-2026-00001
{
  "eInvoiceId": "einv_01HRXY...",
  "sellerGstin": "29ABCDE1234F1Z5",
  "supplyType": "O",
  "subSupplyType": "1",
  "documentType": "INV",
  "documentNumber": "INV-2026-00001",
  "documentDate": "2026-05-04",
  "transactionType": 1,
  "from": { ... },
  "to": { ... },
  "totals": { "totalValue": 10000, "totalInvoiceValue": 11800 },
  "transport": {
    "transportMode": 1,
    "distance": 980,
    "vehicleNumber": "KA01AB1234",
    "vehicleType": "R"
  },
  "items": [{ "hsnCode": "998314", "taxableAmount": 10000 }]
}

(You still send from and to because EWB needs the dispatch / delivery addresses, which the IRN does not necessarily carry — they describe the physical movement.)

Mode 2 — standalone

For movements that don't need an IRN (delivery challans, job-work transfers, imports), omit eInvoiceId and supply the full payload.

Required NIC concepts

These mirror NIC's EWB schema directly:

transactionType

ValueMeaning
1Regular
2Bill-To / Ship-To (buyer differs from consignee)
3Bill-From / Dispatch-From (seller differs from consignor)
4Combination of 2 + 3

Set dispatchFromGstin/dispatchFromTradeName when type is 3 or 4. Set shipToGstin/shipToTradeName when type is 2 or 4.

subSupplyType

CodeMeaning
1Supply
2Import
3Export
4Job Work
5For Own Use
6Job Work Returns
7Sales Return
8Others — subSupplyDescription required
9SKD/CKD
10Line Sales
11Recipient Not Known
12Exhibition or Fairs

transport

NIC's EWB is split into Part-A (the bill) and Part-B (the vehicle). You can:

  • Supply vehicleNumber → generate a complete EWB (Part-A + Part-B).
  • Supply only transporterId (transporter GSTIN or TRANSIN) → generate Part-A; the transporter assigns the vehicle later via Update Part-B.

transportMode: 1=Road, 2=Rail, 3=Air, 4=Ship. distance in km, capped at 4000.

Party stateCode fields

Each from and to party carries two state codes:

  • actualStateCode — the physical state where goods are dispatched / received.
  • billStateCode — the billing state (i.e. on the invoice).

These usually match but can differ in bill-from/ship-to scenarios.

Successful response

{
  "id": "ewb_01HRXY...",
  "object": "ewaybill",
  "status": "generated",
  "ewbNumber": "112345678901",
  "generatedAt": "2026-05-04T11:50:18Z",
  "validUntil": "2026-05-09T23:59:59Z",
  "sellerGstin": "29ABCDE1234F1Z5",
  "vehicleNumber": "KA01AB1234",
  "transporterName": null,
  "distanceKm": 980,
  "totalInvoiceValue": 11800
}

Validity periods

NIC computes validity from the consignment distance:

  • Up to 100 km → 1 day
  • Each additional 100 km → +1 day
  • Over-Dimensional Cargo (vehicleType: "O") → halved distance threshold (1 day per 20 km)

Check validUntil on every record. Once it lapses, you cannot extend retroactively — see Extend validity.

Prerequisites

  • An OAuth client provisioned via the Developer hub (single gstn-india scope).
  • EWB credential uploaded for the seller GSTIN — see Set up EWB credentials. Without this you'll see a credential error from the upstream.

Next