PMaaS API
Integrate Vehk data into your own systems.
Authentication
All API requests require a Vehk API key (starting with vehk_). You can pass it in either the HTTP Header or as a URL Query Parameter:
Option 1: HTTP Header (Recommended)
X-API-Key: vehk_live_abcdef1234567890...
(Also supports Authorization: Bearer vehk_...)
Option 2: URL Query Parameter
GET https://api.vehk.in/api/external/devices/locations?X-API-Key=vehk_live_abcdef1234567890...
Get Your API Key
- Dashboard (
https://axle.vehk.in) → Settings → API Keys - Click "Create New Key"
- Select your permission scopes (e.g.,
telemetry:read,telemetry:write,devices:read,vehicles:read,predict) - Copy immediately (shown only once)
Format: vehk_live_... or vehk_...
Base URL
Production API endpoints:
| Environment | Base URL |
|---|---|
| Production API | https://api.vehk.in |
| External Fleet API | https://api.vehk.in/api/external |
| Dashboard | https://axle.vehk.in |
Full interactive API documentation (Swagger) is available at your API base URL + /docs
Permission Scopes
Supported permission scopes for API keys:
telemetry:write/telemetry:readtracking:write/tracking:readpredictvehicles:read/vehicles:writedevices:read/devices:writesub_clients:read/sub_clients:manage(Reseller & White-Label platform)*(Full access)
Reseller & Sub-Client Platform API
If you are a reseller or white-label partner managing multiple downstream fleets (e.g., Client Alpha, Client Beta), use the Reseller Platform API to programmatically manage sub-clients, provision devices, register vehicles, and query partitioned telemetry and predictions.
See the dedicated Reseller & Sub-Client Platform Guide for full API specs, code samples, and workflow guides.
Common Endpoints
List Vehicles
GET /vehicles
Response:
{
"vehicles": [
{
"id": "MH01AB1234",
"vin": "1HGBH41JXMN109186",
"make": "Tata",
"model": "LPT 1518",
"healthScore": 87.5
}
]
}
Get Vehicle Health
GET /vehicles/{id}/health
Response:
{
"vehicleId": "MH01AB1234",
"healthScore": 87.5,
"components": {
"engine": 92,
"transmission": 85,
"brakes": 78
},
"alerts": []
}
Get Predictions
GET /predictions?vehicleId={id}
Response:
{
"predictions": [
{
"vehicleId": "MH01AB1234",
"component": "battery",
"issue": "Voltage degradation detected",
"rul_days": 45,
"confidence": 0.87,
"severity": "medium"
}
]
}
Get Alerts
GET /alerts?severity=critical
Response:
{
"alerts": [
{
"id": "alert_123",
"vehicleId": "MH01AB1234",
"severity": "critical",
"message": "Engine overheating detected",
"timestamp": "2026-01-12T10:00:00Z"
}
]
}
Ingest Telemetry Data
Push vehicle telemetry data to Vehk:
Via REST API
POST /telemetry
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
Request Body:
{
"vehicleId": "MH01AB1234",
"timestamp": "2026-01-13T10:00:00Z",
"engine_speed": 2400,
"coolant": 92,
"battery_voltage": 13.2,
"vehicleSpeed": 65
}
Via Kafka
For high-volume streaming, use Kafka integration:
- Go to Settings → Kafka Config in the dashboard
- Configure your Kafka broker connection
- Publish telemetry messages to the configured topic
Rate Limits
| Plan | Rate Limit |
|---|---|
| Starter | 100,000 calls/month |
| Professional | Unlimited |
| Enterprise | Unlimited |
Webhooks
Receive real-time notifications:
Setup
- Dashboard → Settings → Webhooks
- Add endpoint URL
- Select events to receive
Events
| Event | Description |
|---|---|
vehicle.health.changed | Health score changed significantly |
alert.created | New alert generated |
prediction.created | New maintenance prediction |
maintenance.completed | Maintenance marked complete |
Example Payload:
{
"event": "alert.created",
"timestamp": "2026-01-13T10:00:00Z",
"data": {
"vehicleId": "MH01AB1234",
"severity": "critical",
"message": "Brake failure predicted in 7 days"
}
}
Code Examples
Python
import requests
API_KEY = "vehk_your_api_key_here"
BASE_URL = "https://api.vehk.in/api/external"
headers = {
"X-API-Key": API_KEY,
"Content-Type": "application/json"
}
# 1. Get all vehicle live locations & telemetry
response = requests.get(f"{BASE_URL}/devices/locations", headers=headers)
locations = response.json()
# 2. Get single vehicle location
response = requests.get(f"{BASE_URL}/vehicles/MH01AB1234/location", headers=headers)
vehicle_loc = response.json()
JavaScript / TypeScript
const API_KEY = 'vehk_your_api_key_here';
const BASE_URL = 'https://api.vehk.in/api/external';
const headers = {
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
};
// 1. Get all vehicle live locations & telemetry
const response = await fetch(`${BASE_URL}/devices/locations`, { headers });
const data = await response.json();
// 2. Get single vehicle location
const vehicleRes = await fetch(`${BASE_URL}/vehicles/MH01AB1234/location`, { headers });
const vehicleLoc = await vehicleRes.json();
cURL
# Using Header
curl -X GET "https://api.vehk.in/api/external/devices/locations" \
-H "X-API-Key: vehk_your_api_key_here"
# Using Query Parameter (useful for quick browser or Postman checks)
curl -X GET "https://api.vehk.in/api/external/devices/locations?X-API-Key=vehk_your_api_key_here"
Error Handling
All errors return JSON:
{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid"
}
}
Common Errors:
| Status | Code | Description |
|---|---|---|
400 | invalid_request | Malformed request |
401 | invalid_api_key | API key is invalid or missing |
404 | not_found | Resource not found |
429 | rate_limit_exceeded | Too many requests |
500 | server_error | Internal server error |
Next Steps
- Dashboard Guide - Learn the dashboard features
- Getting Started - Initial setup
- Pricing - Compare plans