Skip to main content

List Driver Availability

Query Parameters

page
number
default:"1"
Page number for pagination
limit
number
default:"10"
Number of items per page
driverId
string
Filter by driver UUID
isOnline
boolean
Filter by online status
isAvailableForTrips
boolean
Filter by trip availability

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
array
Array of driver availability records
meta
object
Pagination metadata

Create Driver Availability

Body Parameters

driverId
string
required
UUID of the driver
isOnline
boolean
Whether the driver is currently online. Defaults to false
isAvailableForTrips
boolean
Whether the driver is available to accept trips. Defaults to false
lastLocation
object
Driver’s last known location
lastLocationTimestamp
string
Timestamp of the last location update (ISO 8601)
currentTripId
string
UUID of the current active trip, or null if no active trip
currentVehicleId
string
UUID of the vehicle currently being used, or null if none
lastOnlineTimestamp
string
Timestamp when the driver last went online (ISO 8601)

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
object
Created driver availability record

Get Driver Availability by Driver

Path Parameters

driverId
string
required
UUID of the driver

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
object
Driver availability record

Get Authenticated Driver Availability

Headers

Authorization
string
required
Bearer token for authentication

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
object
Driver availability record

Find Nearby Drivers

Query Parameters

lat
number
required
Latitude of the search location
lng
number
required
Longitude of the search location
radiusMeters
number
default:"2000"
Search radius in meters (default: 2000m)
limit
number
default:"50"
Maximum number of drivers to return (default: 50)

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
array
Array of nearby available drivers with distance information

Upsert Driver Availability

Body Parameters

driverId
string
required
UUID of the driver
isOnline
boolean
Online status
isAvailableForTrips
boolean
Trip availability status
lastLocation
object
Location coordinates
lastLocationTimestamp
string
Location timestamp (ISO 8601)
lastOnlineTimestamp
string
Online timestamp (ISO 8601)
currentTripId
string
Current trip UUID or null
currentVehicleId
string
Current vehicle UUID or null

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
object
Created or updated availability record

Ping Location

Headers

Authorization
string
required
Bearer token for authentication

Body Parameters

lat
number
Current latitude (if provided, triggers location update)
lng
number
Current longitude (if provided, triggers location update)

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
object
Updated availability record
This endpoint is rate-limited to prevent excessive updates. If lat/lng are provided, the location is updated only if the driver has moved beyond a minimum threshold. Without coordinates, it acts as a heartbeat ping.

Update Driver Status

Path Parameters

driverId
string
required
UUID of the driver

Body Parameters

isOnline
boolean
New online status
isAvailableForTrips
boolean
New trip availability status
availabilityReason
enum
Reason for unavailability, or null to clear
  • OFFLINE - Driver is offline
  • ON_TRIP - Driver is on an active trip
  • UNAVAILABLE - Driver is unavailable for other reasons

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
object
Updated availability record

Update Status by Driver

Headers

Authorization
string
required
Bearer token for authentication

Body Parameters

isOnline
boolean
New online status
isAvailableForTrips
boolean
New trip availability status
availabilityReason
enum
Reason for unavailability
  • OFFLINE
  • ON_TRIP
  • UNAVAILABLE

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
object
Updated availability record

Update Location

Path Parameters

driverId
string
required
UUID of the driver

Body Parameters

lat
number
required
Latitude coordinate
lng
number
required
Longitude coordinate
lastLocationTimestamp
string
Timestamp of the location update (ISO 8601)

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
object
Updated availability record

Set or Clear Current Trip

Path Parameters

driverId
string
required
UUID of the driver

Body Parameters

currentTripId
string
UUID of the trip to assign, or null to clear the current trip

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
object
Updated availability record

Delete Driver Availability

Path Parameters

driverId
string
required
UUID of the driver

Response

success
boolean
Indicates if the operation was successful
message
string
Response message
data
null
Returns null for deleted resources

Build docs developers (and LLMs) love