https://your-domain/api/v1 Sample GSTIN 27AABCS1429B1ZUUse aps_test_… keys: labelled sample data, never billed.Parent API: E-way Bill APIQuickstart guideAuthentication guide
E-way Bill Generation API
Validates and submits an E-way Bill. The body follows the NIC GENEWAYBILL field names (supplyType, docNo, fromGstin, itemList, transMode, …). Until a live provider is configured and your account is activated: and always with sandbox keys: the call runs in demo mode: full validation, nothing created, nothing charged.
Billing: On live generation only. Demo validation and failures are free.
Parameters
Header parameters
AuthorizationstringrequiredBearer <your API key>: aps_live_… or aps_test_…. X-API-Key is also accepted.
Idempotency-Keystring (8 to 80 chars)requiredRetries with the same key replay the original result instead of generating twice.
Body
bodyapplication/jsonrequiredThe E-way Bill payload. See the sample body and the field validation on the generation form.
Response
200400401402403404409429502503504
200 returns the JSON shown in the example panel. Every non-200 uses the standard envelope with a stable error.code:
- 400
invalid_requestA field is missing or malformed; details.issues lists what. - 400
invalid_gstinThe GSTIN fails format or checksum validation. - 400
invalid_ewb_noAn E-way Bill number has 12 digits. - 401
invalid_api_keyThe key is missing, malformed, revoked, or used with the wrong environment prefix. - 402
insufficient_balanceThe wallet cannot cover this call. Recharge and retry. - 403
insufficient_scopeThe key lacks the scope this endpoint needs. - 403
ewb_not_enabledE-way Bill access has not been purchased on this account. - 403
ewb_activation_pendingSetup is paid; provider onboarding has not finished. - 404
not_foundNo such resource. - 409
idempotency_conflictA request with this Idempotency-Key is still in progress. - 429
rate_limitedToo many requests; honour Retry-After. - 502
upstream_errorThe data source failed. You were not charged. - 503
provider_not_configuredThis capability has no live provider configured. - 504
upstream_timeoutThe data source took too long. You were not charged.
- A missing or malformed Idempotency-Key is a 400.
- `mode` is `live` or `demo`; only `mode: "live"` with `created: true` means a real E-way Bill exists.
Frequently Asked Questions
Why is an Idempotency-Key required?
Networks fail mid-request. Retrying with the same key replays the original result instead of generating a second E-way Bill, so a retry can never double-generate or double-charge.
What is demo mode?
Until a live provider is configured and your account is activated (and always with sandbox keys), the call validates the full payload but creates nothing and charges nothing. The response says so explicitly with mode: "demo" and created: false.
Which fields does the body use?
The NIC GENEWAYBILL field names: supplyType, docType, docNo, fromGstin, toGstin, itemList, transMode and the rest. Copy the sample body and adjust.
When am I charged?
Only when a live E-way Bill is actually created. Demo validation, validation failures and provider errors are free.