Privileged and Confidential This endpoint design has been confidentially shared with you. It is still under development and is subject to change without notice. Please do not share this document or API endpoint details with anyone who is not authorized to have access. For more information read about scopes.
The API Endpoint Supplier Performance Data allows users to retrieve comprehensive performance data for both drivers and vehicles. By specifying the supplier ID and a specific time range, users can access detailed metrics, which are crucial for monitoring and analyzing supplier operations.
Use case
By leveraging the “supplier performance data”, fleet suppliers can access detailed metrics such as hours online, hours on-trip, total trips, and total earnings. The data freshness SLA for driver performance metrics is 1–2 hours, and for vehicle performance metrics, it is refreshed every 2–5 minutes.
Using Dependent API
To access detailed performance data for drivers and vehicles, fleet owners should follow a structured two-step process. Firstly, they must use the Get Organizations API with the Fleet Supplier’s unique ID to retrieve all associated encrypted organization IDs. Secondly, using these encrypted organization IDs as input, they can make requests to the Supplier Performance Data API to retrieve performance metrics specific to each linked organization.
Support for Hierarchical Data
Not Supported. The API returns the performance data of the drivers/vehicles directly linked to the organization. It doesn’t support fetching drivers linked to their child organizations
Supported Supplier Types
Fleets
Scopes
solutions.suppliers.metrics.read
Resource
/v1/vehicle-suppliers/analytics-data/query
HTTP Method
POST
Access Method
Client Credentials
Example Request (driver)
curl --location 'https:
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"reportRequests": [
{
"timeRanges": [
{
"startsAt": 1674129878020,
"endsAt": 1674334678020
}
],
"dimensions": [
{
"name": "vs:driver"
}
],
"metrics": [
{
"expression": "vs:HoursOnline"
},
{
"expression": "vs:HoursOnTrip"
},
{
"expression": "vs:TotalTrips"
}
],
"dimension_filter_clauses": [
{
"operator": "FILTER_LOGICAL_OPERATOR_AND",
"filters": [
{
"dimension_name": "vs:driver",
"operator": "OPERATOR_IN",
"expressions": [
"<driver_uuid1>",
"<driver_uuid2>"
]
}
]
}
],
"pagination_options": {
"pageSize": 7,
"pageToken": "<next_page_token_provided_on_the_response>"
}
}
],
"orgId": {
"orgUuid": "<encrypted_supplier_uuid>"
}
}'
Example Response (For driver)
{
"body": {
"reports": [
{
"columnHeader": {
"dimensionHeaderEntries": [
{
"name": "FirstName",
"type": "DIMENSION_TYPE_STRING"
},
{
"name": "LastName",
"type": "DIMENSION_TYPE_STRING"
},
{
"name": "PhoneNumber",
"type": "DIMENSION_TYPE_STRING"
},
{
"name": "Email",
"type": "DIMENSION_TYPE_STRING"
}
],
"metricHeaderEntries": [
{
"name": "HoursOnline",
"type": "METRIC_TYPE_DOUBLE"
},
{
"name": "HoursOnTrip",
"type": "METRIC_TYPE_DOUBLE"
},
{
"name": "TotalTrips",
"type": "METRIC_TYPE_INT64"
}
]
},
"data": {
"timeRangeData": [
{
"rows": [
{
"dimensionName": "UUID",
"dimensionId": "<driver_uuid>",
"dimensionValues": [
"Some Driver Name",
"Some Driver Last Name",
"123456789",
"email@email.com"
],
"metricValues": [
"28.683780",
"18.382747",
"25"
]
}
]
}
]
},
"paginationResult": {
"nextPageToken": "8LXQdrVZDtraWLeNz6_tqiRPXV2rAMvy_RyJXh3kfQc62bKM0JT-Zk4C6xj9mC1SXYc32jvCB1QTs2j20Jf3hw71_TwAsZXULdQ5gtWNSK2jWp89_DWGJTQI14×CvUyQZQ=="
}
}
]
}
}
Example Request (vehicle)
curl --location 'https:
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"reportRequests": [
{
"timeRanges": [
{
"startsAt": 1674129878020,
"endsAt": 1674334678020
}
],
"dimensions": [
{
"name": "vs:vehicle"
}
],
"metrics": [
{
"expression": "vs:HoursOnline"
},
{
"expression": "vs:HoursOnTrip"
},
{
"expression": "vs:TotalTrips"
},
{
"expression": "vs:TotalEarnings"
}
],
"dimension_filter_clauses": [
{
"operator": "FILTER_LOGICAL_OPERATOR_AND",
"filters": [
{
"dimension_name": "vs:vehicle",
"operator": "OPERATOR_IN",
"expressions": [
"<vehicle_uuid1>",
"<vehicle_uuid2>"
]
}
]
}
],
"pagination_options": {
"pageSize": 8,
"pageToken": "<next_page_token_provided_on_the_response>"
}
}
],
"orgId": {
"orgUuid": "<encrypted_supplier_uuid>"
}
}'
Example Response (For vehicle)
{
"body": {
"reports": [
{
"columnHeader": {
"dimensionHeaderEntries": [
{
"name": "PlateNumber",
"type": "DIMENSION_TYPE_STRING"
},
{
"name": "VIN",
"type": "DIMENSION_TYPE_STRING"
}
],
"metricHeaderEntries": [
{
"name": "HoursOnline",
"type": "METRIC_TYPE_DOUBLE"
},
{
"name": "HoursOnTrip",
"type": "METRIC_TYPE_DOUBLE"
},
{
"name": "TotalTrips",
"type": "METRIC_TYPE_INT64"
},
{
"name": "TotalEarnings",
"type": "METRIC_TYPE_DOUBLE"
}
]
},
"data": {
"timeRangeData": [
{
"rows": [
{
"dimensionName": "UUID",
"dimensionId": "<vehicle_uuid>",
"dimensionValues": [
"ABCDE343",
"FDILGOGP43435D"
],
"metricValues": [
"10.860493",
"3.066504",
"5",
"100.123678"
]
}
]
}
]
},
"paginationResult": {}
}
]
}
}
Request Body Fields
Organization Uuid
Name |
Type |
Description |
OrgUuid |
UUID |
Encrypted supplier UUID |
ReportRequest
Name |
Type |
Description |
timeRanges |
object array |
List of Interval objects. Only one (1) Interval object is allowed per request |
dimensions |
object array |
List of Dimension objects |
metrics |
object array |
List of Metric objects |
dimensions_filter_clauses |
(Optional) object array |
List of DimensionFilterClause objects to be used for fetching data for list of drivers or vehicles |
pagination_options |
(Optional) object |
Object of type PaginationOptions |
Interval
Name |
Type |
Description |
startsAt |
int |
UNIX milliseconds timestamp |
endsAt |
int |
UNIX milliseconds timestamp |
Dimension
Name |
Type |
Description |
name |
string |
"vs:driver" or "vs:vehicle" |
Metric
Name |
Type |
Description |
expression |
string |
For driver "vs:HoursOnline" : Total number of hours the driver was available on the platform for making trips. Minute precision. "vs:HoursOnTrip" : Total number of hours a driver was between the statuses driver pick up rider and driver drop off rider. Minute precision. "vs:TotalTrips" : Total number of trips a driver served on the platform. For vehicle "vs:HoursOnline" : Total number of hours the vehicle was available on the platform for making trips. Minute precision. "vs:HoursOnTrip" : Total number of hours a vehicle was between the statuses vehicle pick up rider and vehicle drop off rider. Minute precision "vs:TotalTrips" : Total number of trips a vehicle served on the platform. "vs:TotalEarnings" : Total amount of earnings the vehicle generated on the time interval requested. |
DimensionFilterClause
FilterLogicalOperator
Name |
Type |
Description |
FILTER_LOGICAL_OPERATOR_AND |
FILTER_LOGICAL_OPERATOR_AND |
Operator to be used for AND filters |
FILTER_LOGICAL_OPERATOR_OR |
FILTER_LOGICAL_OPERATOR_OR |
Operator to be used for OR filters |
DimensionFilter
Name |
Type |
Description |
dimension_name |
(Optional) string |
"vs:driver" or "vs:vehicle" |
operator |
(Optional) object |
Operator object |
expressions |
(Optional) string array |
List of un-encrypted driver or vehicle uuids |
Operator
Name |
Type |
Description |
OPERATOR_IN |
OPERATOR_IN |
Operator to be used for checking value in array |
PaginationOptions
Name |
Type |
Description |
pageToken |
(Optional) string |
Page token for the next entities that should come on the report |
pageSize |
(Optional) int32 |
Number of entities that come on each report. Max is 100 per request |
Response Body Fields
Name |
Type |
Description |
reports |
object array |
List of Report objects |
Report
ColumnHeader
DimensionHeaderEntry
Name |
Type |
Description |
name |
string |
For driver : "FirstName" , "LastName" , "PhoneNumber" , "Email" For vehicle : "PlateNumber" , "VIN" |
type |
string |
Corresponds to the type that can safely be casted from the string returned. Options are: "DIMENSION_TYPE_INVALID" , "DIMENSION_TYPE_STRING" , "DIMENSION_TYPE_INT64" |
MetricHeaderEntry
Name |
Type |
Description |
name |
string |
For driver : "HoursOnline" , "HoursOnTrip" , "TotalTrips" For vehicle : "HoursOnline" , "HoursOnTrip" , "TotalTrips" , "TotalEarnings" |
type |
string |
Corresponds to the type that can safely be casted from the string returned. Options are: "METRIC_TYPE_INVALID" , "METRIC_TYPE_INT32" ,
"METRIC_TYPE_INT64" , "METRIC_TYPE_DOUBLE" , "METRIC_TYPE_STRING" |
ReportData
Name |
Type |
Description |
timeRangeData |
(Optional) object array |
List of TimeRangeData objects |
TimeRangeData
Name |
Type |
Description |
rows |
object array |
List of ReportRow objects |
ReportRow
Name |
Type |
Description |
dimensionName |
string |
String tag identifier of the dimensionId for the corresponding row (entity data) Options are: UUID . |
dimensionId |
string |
String ID, corresponding to the dimensionName specified. (raw UUID) |
dimensionValues |
object array |
List of ordered string objects, corresponding to the dimensionHeaderEntries order |
metricValues |
object array |
List of ordered string objects, corresponding to the metricHeaderEntries order |
PaginationResult
Name |
Type |
Description |
nextPageToken |
string |
String token to be used to retrieve the next entities that should come on an specific report. If no more entities to return, PaginationResult object will be empty |
Rate Limit
- Rate limit for this endpoint is 100 000 rph (requests per hour) per Developer Application.
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. |
Notes
- If
pageSize
is not specified, the endpoint has a default return value of 100 records (pageSize
) per report.
- If the returned
paginationResult
object is empty ({}
), it means there are no more entities to report.
- 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 reports, by passing the provided nextPageToken
and a valid pageSize
(between 1 and 1000).
- The endpoint has an enforced
pageSize
limit of 1000 max entities (driver
or vehicle
information records) per report. If you ask for more, or pass a negative pageSize
value, an error will be returned.
- The time range provided in the request has to be more than or equal to 1 hr.
- The api response considers the exact epoch time (UTC timezone) mentioned in request for fetching the requested data.
- Each row is an entity (driver or vehicle) with its given dimensions and metrics.
- An (Optional) param is one that you can omit (if part of the request), or one that can be empty (if part of the response).
FAQ
- Does the API support sandbox environments?
- Yes, the API supports sandbox environments.