Complete testing API for Indian E-Invoicing system with realistic sample data. Perfect for developers testing GST integration.
Create E-Invoices with auto-generated IRN and QR codes
Validate invoice data against business rules
Cancel generated invoices with proper audit trail
Auto-generate QR codes for invoice verification
Stable, predictable test data for consistent testing scenarios
/health/api/e-invoice/invoices/api/e-invoice/samples/api/e-invoice/sample/1/api/e-invoice/stats/api/e-invoice/schema/api/e-invoice/generate/api/e-invoice/generate-dynamic/api/e-invoice/validate/api/e-invoice/cancelUse this strict JSON Schema to validate your payload structure
before sending requests. This schema matches the output of
/api/e-invoice/sample/1.
Test the XML output and schema validation for REST Assured integration.
?status=Generated?supplyType=B2B?sellerState=29?buyerState=07?documentType=INV?supplyTypes=B2B,EXPWP,SEZWP?statuses=Generated,Cancelled?interstate=true?reverseCharge=false?totalValue=lt:1000?totalValue=gt:50000?search=INV/2024?page=2&limit=20?sortBy=totalValue&sortOrder=desc?dateFrom=2024-01-01&dateTo=2024-12-31?minValue=1000&maxValue=10000Test various API authentication methods securely.
Click to see the valid API Keys, Usernames, and Passwords for testing.
Uses x-api-key header.
Base64 encoded username:password.
1. Login to get a token. 2. Use token to access protected route.
Test tricky scenarios like Headers, CSRF, Token Expiry, and Session Fixation.
Server sets duplicate cookies. Last one should win.
Attempt to force a session ID.
Validate JSESSIONID name enforcement.
Spam the button to trigger 429 Too Many Requests.
Simulate typical automation flow.
Use these strict endpoints in your automation scripts to validate edge cases.
| Method | Endpoint | Required Headers / Params | Edge Case Test |
|---|---|---|---|
| POST | /api/edge-cases/strict-post |
Content-Type: application/json X-CSRF-TOKEN: [token] |
Strict Content-Type Check ✅ Valid Request (200) ❌ Missing Content-Type (400/415) |
| GET | /api/e-invoice/invoices |
Accept: application/xml |
Accept Header Trap ❌ Requesting XML (406 Not Acceptable) |
| GET | /api/edge-cases/custom-header |
X-Tenant-Id: [missing] |
Custom Header ❌ Missing X-Tenant-Id (400) |
| GET | /api/edge-cases/conditional-auth |
?type=guest Authorization: [any token] |
Guest Logic ❌ Guest should not send Auth (400) |
| GET | /api/auth/test/bearer |
Authorization: Bearer expired-token |
Token Expiry ❌ Expired Token (401) |
| GET | /api/auth/test/bearer |
Authorization: valid-token |
Token Format ❌ Missing 'Bearer' Prefix (401) |
| GET | /api/edge-cases/scope-protected |
Authorization: Bearer read-only-token |
Scope Validation ❌ Write access denied (403) |
| POST | /api/edge-cases/cookie-override |
- | Cookie Override (Last One Wins) |
| POST | /api/edge-cases/session-fixation |
?session_id=hacked | Session Fixation Vulnerability |
| GET | /api/auth/test/session |
Cookie: JSESSIONID=[valid] | Session Auth Strict Name |
| GET | /api/edge-cases/rate-limit |
- |
Rate Limiting 🚗 Check Headers (Limit/Remaining) 🏎️ Spam >5/min → 429 Too Many Requests |
| POST | /api/auth/login |
{"username":"admin", "password":"..."} |
Chain Step 1: Login Returns token for reuse
|
| GET | /api/auth/test/bearer |
Authorization: Bearer [token] |
Chain Step 3: Reuse Proof of session continuity |
Welcome to the E-Invoice Test API.
This API is a high-fidelity Sandbox environment designed to mimic the standards and behaviors of the Indian Goods and Services Tax (GST) E-Invoicing system (IRP). It automates the generation of complex JSON structures, IRNs (Invoice Reference Numbers), and QR codes, allowing developers to test their ERP integrations without needing credentials for the live government portal.
The API follows a "Universal Auth" policy, meaning it accepts credentials in multiple formats to suit your preferred testing style.
| Method | Header Key | Value Format | Description |
|---|---|---|---|
| API Key | x-api-key |
ei_demo_... |
Simplest for scripts/Postman. |
| Bearer | Authorization |
Bearer [token] |
Standard OAuth pattern. |
| Basic | Authorization |
Basic [base64] |
Legacy systems (User/Pass). |
Complete list of available operations for testing.
/health
/api/e-invoice/invoices
/api/e-invoice/samples
/api/e-invoice/sample/1
/api/e-invoice/stats
/api/e-invoice/generate
/api/e-invoice/generate-dynamic
/api/e-invoice/validate
/api/e-invoice/cancel
Here is an explanation of the output from /api/e-invoice/sample/1:
TaxSch: "GST" (Tax Scheme)SupTyp: "B2B", "B2C", "EXP" (Supply Type)RegRev: "Y"/"N" (Reverse Charge Applicable?)Gstin: 15-digit Tax ID (State Code + PAN + Entity Code)
LglNm: Legal Name of the entityPos: Place of Supply (State Code)Addr1, Loc, Pin: Address
details
AssVal: Taxable ValueCgstVal, SgstVal, IgstVal:
Tax
BreakdownsTotInvVal: Final Invoice Value (inclusive of taxes)
Available Filter Parameters:
?status=Generated
?supplyType=B2B
?sellerState=29
?buyerState=07
?documentType=INV
?interstate=true
?reverseCharge=false
?totalValue=lt:1000
?totalValue=gt:50000
?search=INV/2024
?supplyTypes=B2B,EXPWP,SEZWP
?statuses=Generated,Cancelled
?page=2&limit=20
?sortBy=totalValue&sortOrder=desc
?dateFrom=2024-01-01&dateTo=2024-12-31
?minValue=1000&maxValue=10000
We simulate specific failure scenarios to help you build robust error handling.
If you exceed 5 requests/minute on specific endpoints, you get a 429 Too Many Requests.
Sending a JSON body > 100kb will trigger a 413 error, simulating server protection limits.
Requesting Accept: application/xml will fail because we only support JSON.
Sending POST to a GET-only endpoint yields 405 Method Not Allowed.
This is a testing API only. All generated IRNs and QR codes are simulated and have no legal validity. Do not use for production purposes or actual GST filing.