Drivers API
Driver profile, document, location, and assigned-shipment operations for account and S2S integrations.
Base Path
https://api.niyantha.in/api/v1/sessionAuthentication
Authorization: Bearer <token>
The driver routes let an account-facing app keep driver identity and licenses updated, track availability and location, and let assigned drivers accept, reject, or complete shipments. The same contracts are available via /api/v1/s2s/accounts/drivers.
/driversGet the current driver profile bound to the authenticated account context.
{
"id": 44,
"name": "Raghav",
"email": "driver@fleet.in",
"contact": "+919999999999",
"afa_verified": true,
"aadhaar_verified": true,
"is_online": true,
"current_latitude": 12.9716,
"current_longitude": 77.5946
}/drivers/update-licensesUpload and update Aadhaar, selfie, and driving license references.
{
"aadhaar_file_id": 11,
"selfie_file_id": 12,
"two_wheeler_license_file_id": 13,
"two_wheeler_license_number": "KA-22-2025-00012",
"heavy_license_file_id": 14,
"heavy_license_number": "DL-TRANS-99881"
}{
"success": true,
"message": "Driver documents updated"
}/drivers/locationUpdate current driver location and online presence.
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
| latitude | float | No | Current latitude. |
| longitude | float | No | Current longitude. |
| online | bool | No | Legacy online flag. |
| is_online | bool | No | Preferred online flag. |
{
"latitude": 12.9716,
"longitude": 77.5946,
"is_online": true
}{
"id": 44,
"current_latitude": 12.9716,
"current_longitude": 77.5946,
"is_online": true
}/drivers/shipmentsFetch shipments assigned to the current driver.
{
"items": [
{
"id": 9001,
"status": "assigned",
"pickup_location_id": 66,
"drop_location_id": 77,
"estimated_cost": 120
}
]
}/drivers/shipments/:id/acceptAccept an assigned shipment.
{
"id": 9001,
"status": "accepted"
}/drivers/shipments/:id/rejectReject an assigned shipment and trigger re-allocation.
{
"id": 9001,
"status": "failed"
}/drivers/shipments/:id/completeMark an assigned shipment as completed.
{
"id": 9001,
"status": "completed"
}Notes
Driver routes are shipment-oriented in the current backend, not order-oriented. The docs have been aligned to the actual /drivers/shipments route family.
For backend-to-backend apps, switch the same paths to /api/v1/s2s/accounts/drivers and authenticate with X-API-Key and X-API-Secret.