[API] Get Drivers Information
Get basic information of a single driver/all drivers linked to a supplier(Fleet) organization.
¶ Resource
/v1/vehicle-suppliers/drivers
¶ HTTP Method
GET
¶ Access Method
¶ Required scopes
One of - solutions.suppliers.drivers.status.read
, solutions.suppliers.metrics.read
¶ Usage
The client should access the Get Organizations API that fetches the child organizations for the given organisation. This API returns the encrypted IDs for the linked organizations . The clients can then use the encrypted organization ID in the below request for the driver status API to fetch the driver status response.
¶ Support for Hierarchical Data
Not Supported. The API returns the information of the drivers directly linked to the organization ID passed in the query param as shown in Example Request. It doesn’t support fetching drivers linked to their child organizations.
¶ Example Request
curl -i -X GET "https://api.uber.com/v1/vehicle-suppliers/drivers?org_id=<org_id>&page_token=<page_token>&page_size=<page_size>" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
¶ Example Request with driver filter
curl -i -X GET "https://api.uber.com/v1/vehicle-suppliers/drivers?org_id=<org_id>&page_token=<page_token>&page_size=<page_size>&driver_id=<driver_uuid>" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
¶ Example Request for fetching assignedVehicle information
curl -i -X GET "https://api.uber.com/v1/vehicle-suppliers/drivers?org_id=<org_id>&page_token=<page_token>&page_size=<page_size>&include_assigned_vehicles=true" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
¶ Request Query Parameters
Name | Type | Required | Description |
---|---|---|---|
org_id |
string | Y | Encrypted organisation UUID. |
page_token |
string | N | Options for Pagination - page cursor for the page. |
page_size |
int32 | N | Options for Pagination - maximum number of records to be fetched in each request 0<x<=100. |
driver_id |
string | N | Raw driver uuid to get the results for requested driver_uuid. |
include_assigned_vehicles |
boolean | N | This Boolean parameter is used to retrieve the information about the vehicles assigned to each driver. |
¶ Response Body Fields
Name | Type | Nullable | Description |
---|---|---|---|
driverInformation |
object array | Y | Array of DriverInformation contains list of driver’s with their information. |
paginationResult |
object | N | object of type PaginationResult. |
Name | Type | Description |
---|---|---|
driverId |
string | Driver’s id in uuid format. |
driverIdEncrypted |
string | Driver’s id in encrypted format. |
firstName |
string | First Name. |
lastName |
string | Last Name. |
phoneNumber |
object | Driver’s registered PhoneNumber. |
email |
string | Driver’s email Id |
assignedVehicles |
object | Vehicles assigned to the driver at current moment AssignedVehicle |
Name | Type | Description |
---|---|---|
countryCode |
string | country code for the phone number. |
number |
string | phone number. |
Name | Type | Description |
---|---|---|
vehicleId |
string | Encrypted uuid of vehicle. |
assignedAt |
string | Time in UTC timezone when the vehicle was assigned to the driver. |
Name | Type | Description |
---|---|---|
nextPageToken |
string | Can be empty, if there are no more records |
¶ Example Response
{
"driverInformation": [
{
"driverId": "910a15d2-a5b4-402b-8888-83ed261e6f99",
"driverIdEncrypted": "y9M1JoXUkOKQlE6OF4F0v34Aw3bHpF3a1x7F1FhMz6Lc6oKQgPEP2GM0eGcx2B2rtyVud50m0E8rGgJ3FXm97DGASbQT43tss5Cy0sUKt1vY8qjsu4tS3oj0snc2ZuYZs79DxW",
"firstName": "FirstName",
"lastName": "LastName",
"phoneNumber": {
"countryCode": "+1",
"number": "1234567890"
},
"email": "abc@gmail.com",
"assignedVehicles": [{
"vehicleId": "4jMffsUkOKQlE6OF4F0v34Aw3bHpF3a1x7F1FhMz6Lc6oKQgPEP2GM0eGcx2B2rtyVud50m0E8rGgJ3FXm97DGASbQT43tss5Cy0sUKt1vY8qjsu4tS3oj0snc2ZuYZs79DxW",
"assignedAt": "2023-03-30T00:10:55.926Z"
}]
}
],
"paginationResult": {
"nextPageToken": ""
}
}
¶ Rate Limit
- Rate limit for this endpoint is 1,00,000 requests per hour per Developer Application.
¶ Notes
-
include_assigned_vehicles is an optional query param, If not passed then this value is considered to be false and wont have impact on the latency of this endpoint.
-
If
page_token
is not specified, then the default value will be blank. -
If the returned
paginationResult
object is not empty, it means you can keep calling the endpoint to get the missing entities on the next subsequent requested data, by passing the providednextPageToken
and a validpageSize
(between 1 and 100).
¶ Endpoint Specific Errors
Http Status Code | Code | Message |
---|---|---|
400 |
bad_request | The request parameters are invalid. |
500 |
internal_server_error | Internal server error. |
403 |
unauthenticated | User does not have permission. |
429 |
rate_limited | Number of requests exceeds allowed limit. |
503 |
service_unavailable | Service unavailable. |
401 |
unauthorized | Invalid OAuth 2.0 credentials. |