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. |
| force_refresh | boolean | Optional | If true, bypasses the 90-day cache and fetches live data from the provider. Counts as a billed call. Defaults to false. |
↓ 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
Plate Reader (AI)
Upload 1–4 images of a vehicle (or plate crop) and receive the license plate the AI reads. Powered by a vision-capable large language model with a chain-of-thought abstention prompt — it prefers to abstain rather than guess, so a returned plate is high-confidence. Multi-image calls are pooled: send several frames of the same vehicle to improve accuracy.
↑ Request (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
| images | file[] | Required | Between 1 and 4 image files (JPEG/PNG), max 8 MB each. Multiple images should be different frames of the same vehicle. |
↓ Response Schema
| Field | Type | Description |
|---|---|---|
| can_read | boolean | true if the AI read the plate confidently; false if it abstained |
| plate | string | null | Detected plate in normalised form (e.g. TN02CE6525). Null when can_read=false. |
| confidence | float | 0.0 for abstentions, 0.95 for accepted reads |
| abstain_reason | string | null | Short phrase — e.g. plate not visible, motion blur, low light |
| image_description | string | One-line description of what the AI saw across the frames |
| latency_ms | integer | LLM call latency in milliseconds |
| billed | boolean | Whether this call consumed monthly quota |
Example Request (curl)
# POST /api/v1/vehicle/plate/read # multipart/form-data upload curl -X POST https://api.traxflow.ai/api/v1/vehicle/plate/read \ -H "X-TRAXFLOW-API-KEY: txf_..." \ -F "images=@frame1.jpg" \ -F "images=@frame2.jpg"
200 OK Response
{
"can_read": true,
"plate": "TN02CE6525",
"confidence": 0.95,
"abstain_reason": null,
"image_description": "White SUV, plate clear.",
"latency_ms": 4820,
"billed": true,
"called_at": "2026-07-09T10:30:00Z"
}
Try it
JPEG or PNG, max 8 MB each. Send multiple frames of the same vehicle for higher accuracy.
// 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" }