API Documentation v1.0

Traxflow API Services

Powerful vehicle data and consent management APIs — production-ready, HA-backed, and built for scale.

https://api.traxflow.ai

Quick Reference

Vehicle Info POST

/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
Consent POST

/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:

X-TRAXFLOW-API-KEY: txf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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.

Rate limited

Requests over quota return 429 Too Many Requests. Monitor usage via /api/v1/usage.


Vehicle Info API

POST
https://api.traxflow.ai /api/v1/vehicle/lookup

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

POST /api/v1/vehicle/lookup
// 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.

GET /api/v1/usage

Current month quota statistics — total calls, cache hits, billed calls, and overage.

total_calls integer — all requests this month
cache_hits integer — served from cache
billed_calls integer — fresh VAHAN lookups
quota_limit integer — plan monthly quota
quota_remaining integer — remaining calls
GET /api/v1/usage/daily

Per-day breakdown for the current month. Useful for charting consumption trends.

date string (ISO date)
total_calls integer
cache_hits integer
billed_calls integer
// 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"
}