Quick Reference
/api/v1/vehicle/lookup
Instant VAHAN vehicle registration lookup with 90-day intelligent caching.
- Real-time VAHAN data
- 90-day intelligent cache
- Quota tracking
- Multi-provider fallback
/api/v1/consent/enroll
Generate WhatsApp QR codes to collect vehicle owner consent at the point of service.
- QR code generation
- WhatsApp delivery
- Enrollment tracking
- Custom messages
Authentication
All API requests must include a valid API key. Keys are available from your Traxflow Dashboard. Never expose your API key in client-side code.
Traxflow uses API key authentication via a custom HTTP request header. Include the header on every request:
Secure by default
API keys are stored as SHA-256 hashes. The plaintext key is only shown once at creation.
Scoped per customer
Each key is bound to one customer account. Usage, quotas, and billing are tracked independently.
Vehicle Info API
Returns full VAHAN vehicle registration details for an Indian vehicle number. Results are cached for 90 days — cached lookups do not count against your billable quota and return in <50ms. Fresh API calls typically resolve in 1–3 s depending on the VAHAN provider.
↑ Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| vehicle_number | string | Required | Indian vehicle registration number, e.g. TN09AB1234. Spaces and hyphens are stripped automatically. |
↓ Response Schema
| Field | Type | Description |
|---|---|---|
| vehicle_number | string | Normalised registration number |
| owner_name | string | Owner name (partially masked per VAHAN privacy rules) |
| vehicle_class | string | e.g. Light Motor Vehicle |
| vehicle_kind | string | e.g. CAR, MOTORCYCLE, TRUCK |
| fuel_type | string | e.g. Petrol, Diesel, CNG, Electric |
| registration_date | string (date) | ISO-8601 date, e.g. 2015-03-20 |
| rc_status | string | Registration Certificate status: Registered | Expired | Cancelled |
| maker | string | Vehicle manufacturer, e.g. MARUTI SUZUKI |
| model | string | Vehicle model, e.g. SWIFT DZIRE |
| rto_code | string | RTO code extracted from the vehicle number |
| rto_name | string | null | Full RTO office name if available |
| state | string | State of registration, e.g. Tamil Nadu |
| source | string | CACHE — served from 90-day cache, not billed | API — fresh VAHAN call, billed |
| called_at | string (datetime) | ISO-8601 UTC timestamp of this response |
Example Request
// POST /api/v1/vehicle/lookup // Header: X-TRAXFLOW-API-KEY: txf_a0bd3a1d... { "vehicle_number": "TN09AB1234" }
200 OK Response
{
"vehicle_number": "TN09AB1234",
"owner_name": "R**** K****",
"vehicle_class": "Light Motor Vehicle",
"vehicle_kind": "CAR",
"fuel_type": "Diesel",
"registration_date": "2015-03-20",
"rc_status": "Registered",
"maker": "MARUTI SUZUKI",
"model": "SWIFT DZIRE",
"rto_code": "TN09",
"state": "Tamil Nadu",
"source": "CACHE",
"called_at": "2026-06-04T10:30:00Z"
}
Try it
// Response will appear here
Consent Workflow API
Initiates the consent enrollment flow for a vehicle owner. Returns a QR code (PNG, base64-encoded) that the customer can scan to open WhatsApp and send their consent message. Enrollment status is updated automatically once the vehicle owner sends their consent via WhatsApp.
↑ Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| vehicle_number | string | Required | Vehicle registration number to enroll |
↓ Response Schema
| Field | Type | Description |
|---|---|---|
| status | string |
qr_generated — new QR created |
pending — awaiting owner action |
already_enrolled — owner has already consented
|
| vehicle_number | string | Normalised vehicle number |
| qr_base64 | string | null | Base64-encoded PNG QR code image. Null if already enrolled. |
| qr_payload | string | null | WhatsApp deep-link encoded in the QR, e.g. https://wa.me/91XXXXXXXXXX?text=CONSENT+TN09AB1234 |
Consent Flow
POST /api/v1/consent/enroll
Your app calls the endpoint with the vehicle number
Display QR to vehicle owner
Render qr_base64 as an <img> at the fuel station kiosk
Owner scans QR with phone
Camera app or WhatsApp scanner opens the wa.me link
Owner sends "CONSENT TN09AB1234"
WhatsApp pre-fills the consent message — owner just taps Send
WhatsApp reply received → status: ENROLLED
Traxflow receives the inbound WhatsApp message, marks the lead as enrolled
Example Request
// POST /api/v1/consent/enroll // Header: X-TRAXFLOW-API-KEY: txf_a0bd3a1d... { "vehicle_number": "TN09AB1234" }
200 OK Response
{
"status": "qr_generated",
"vehicle_number": "TN09AB1234",
"qr_base64": "iVBORw0KGgoAAAA...",
"qr_payload": "https://wa.me/91XXXXXXXXXX
?text=CONSENT+TN09AB1234"
}
Try it
// Response will appear here
Quota & Usage
Monitor your API consumption in real time. These endpoints are always free and do not consume quota. All timestamps are UTC.
Current month quota statistics — total calls, cache hits, billed calls, and overage.
Per-day breakdown for the current month. Useful for charting consumption trends.
// GET /api/v1/usage // Header: X-TRAXFLOW-API-KEY: txf_a0bd3a1d... // 200 OK { "period": "2026-06", "total_calls": 8421, "cache_hits": 6150, "billed_calls": 2271, "quota_limit": 5000, "quota_remaining": 2729, "overage_calls": 0, "plan": "Growth" }