RSDATripMate API

REST API for integrating with the RSDATripMate fleet management platform. All endpoints return JSON.

Overview

Base URL: https://www.rsdatripmate.com/api

The API uses standard HTTP methods. All requests and responses use application/json unless uploading files (multipart/form-data).

Authentication

⚠️ All endpoints require a Bearer token in the Authorization header, except public endpoints marked with 🌐.
Authorization: Bearer <your_jwt_token>

Get a token

POST/auth/login
Authenticate and receive a JWT token (valid 30 days)
{
  "email": "admin@yourcompany.com",
  "password": "YourPassword@123"
}

Response includes token and user object. Use the token in all subsequent requests.

Error Codes

CodeMeaning
400Bad request — invalid parameters
401Unauthorized — missing or invalid token
403Forbidden — insufficient role permissions
404Resource not found
409Conflict — duplicate or state mismatch
422Validation error — check request body
500Server error

Webhooks

Register a URL to receive real-time event notifications. RSDATripMate signs each delivery with HMAC-SHA256.

POST/features/webhooks
Register a webhook endpoint
{
  "url": "https://your-server.com/webhook",
  "events": ["trip_started","trip_completed","sos_triggered","incident_created"]
}

Available events: trip_started · trip_completed · trip_assigned · trip_cancelled · sos_triggered · geofence_entry · geofence_exit · incident_created · expense_approved · driver_status_changed

Verify signature: X-TripMate-Signature: sha256=<hmac>

Trips

GET/vendor/trips/assigned
List trips assigned to the authenticated driver
POST/vendor/trips/{id}/accept
Driver accepts a trip
POST/vendor/trips/{id}/start
Driver starts a trip
POST/vendor/trips/{id}/end
Driver ends a trip
GET/admin/trips
List all trips (admin)
POST/client/trips
Client books a trip
POST/features/otp/generate/{trip_id}
Generate OTP for ride start verification
POST/features/otp/verify/{trip_id}
Driver verifies OTP to start trip
POST/features/epod/{trip_id}
Submit electronic proof of delivery

Drivers

GET/admin/drivers
List all drivers with live status
POST/admin/drivers
Create a driver
PATCH/admin/drivers/{id}/status
Update driver status
POST/features/alcohol-check
Log alcohol check result
POST/features/fatigue/calculate/{driver_id}
Calculate driver fatigue risk score
GET/features/fatigue/fleet
Fleet-wide fatigue scores for today

Vehicles

GET/admin/vehicles
List all vehicles
PATCH/admin/vehicles/{id}
Update vehicle fields
POST/features/immobilize
Immobilize or restore a vehicle
GET/features/ais140
List AIS-140 compliance records
POST/features/ais140
Create/update AIS-140 record
GET/features/echallan
List e-challans
POST/features/echallan/check/{vehicle_id}
Check Parivahan for pending challans

GPS Hardware Ingest

Send GPS pings from hardware trackers (Teltonika, Concox, Queclink, generic HTTP). No JWT required — secure by IP allowlist.

POST/gps/ingest
Ingest GPS position from hardware device
{
  "vehicle_number": "DL01AB1234",
  "lat": 28.6139,
  "lng": 77.2090,
  "speed": 45.5,
  "ignition": true,
  "odometer": 12500.0,
  "source": "teltonika"
}
GET/gps/latest/{vehicle_id}
Get latest hardware GPS position for a vehicle

Safety

POST/safety/sos
Driver triggers SOS panic alert
GET/safety/sos
List SOS alerts (admin)
GET/safety/scores
Driver safety scores for a month
GET/safety/behaviour
Driver behaviour events (harsh braking, speeding)

Features API

GET/features/webhooks
List registered webhooks
POST/features/transport-policy
Create transport policy
POST/features/transport-policy/{id}/check
Validate a trip against a policy
POST/features/pool/trips
Create a shared cab pool trip
POST/features/pool/seats
Book a seat in a pool trip
POST/features/waitlist
Add trip request to waitlist
POST/features/convoy
Create a convoy (group trip dispatch)
GET/features/predictive-maintenance
Get predictive maintenance alerts for fleet
POST/features/consignment
Create LR/Builty consignment record
GET/features/hrms/config
Get HRMS integration config
POST/features/hrms/sync-attendance
Push attendance to HRMS
GET/features/accounting/config
Get accounting integration config
GET/features/accounting/export-tally/{month}
Export invoices as Tally XML

Analytics

GET/analytics/revenue?months=6
Monthly revenue, trips, expenses
GET/analytics/fleet-utilization
Per-vehicle utilization for a month
GET/analytics/driver-performance
Per-driver trips, rating, attendance
GET/analytics/carbon-footprint
CO₂ emissions from fuel consumption
GET/analytics/dashboard-kpis
Quick KPIs for dashboard header

📧 support@rsdatourandtravels.com  ·  🌐 rsdatripmate.com  ·  Interactive Swagger UI →