[API] Get Vehicles Information
Get basic information of a single vehicle/all vehicles linked to a supplier organization.
¶ Resource
/v2/vehicle-suppliers/vehicles
¶ HTTP Method
GET
¶ Access Method
¶ Required scopes
Primary - 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 vehicles directly linked to the organization ID passed in the query param as shown in Example Request. It doesn’t support fetching vehicles linked to their child organizations.
¶ Example Request
curl -i -X GET "https://api.uber.com/v2/vehicle-suppliers/vehicles?org_id=<org_id>&page_token=<page_token>&page_size=<page_size>" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
¶ Example Request with vehicle filter
curl -i -X GET "https://api.uber.com/v2/vehicle-suppliers/vehicles?org_id=<org_id>&page_token=<page_token>&page_size=<page_size>&vehicle_id=<vehicle_uuid>" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
¶ Request Query Parameters
Name | Type | Required | Description |
---|---|---|---|
org_id |
string | Y | Encrypted organization 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<=1000. |
vehicle_id |
string | N | Raw vehicle UUID to get the results for the requested vehicle UUID. |
¶ Response Body Fields
Name | Type | Nullable | Description |
---|---|---|---|
vehicleInformation |
object array | Y | Array of VehicleInformation containing a list of drivers with their information. |
paginationResult |
object | N | Object of type PaginationResult. |
Name | Type | Description |
---|---|---|
vehicleId |
string | Raw vehicle id |
vehicleIdEncrypted |
string | Vehicle id in encrypted format |
make |
string | Make of the vehicle |
model |
string | Model of the vehicle |
year |
int | Make year of the vehicle |
vin |
string | Vin (chassis number) of the vehicle |
licensePlate |
string | License plate ID of the vehicle |
color |
string | Name of the vehicle color, e.g. White |
Name | Type | Description |
---|---|---|
nextPageToken |
string | Can be empty, if there are no more records |
¶ Example Response
{
"vehicleInformation": [
{
"vehicleId": "b0c8e126-584b-4e4f-85d0-8c38c9b19272",
"vehicleIdEncrypted": "vP4ZnXbsyIgAeyWJrO4Lx6nRHOGgNBUvWEc3A4iMht0vE4rkyqM1x7I2hFkY6SLR4OMoflGtx7XsQaLRc8mHq3rI2HMyVK5c1g==",
"color": "red",
"licensePlate": "KA02BR1234",
"make": "Ford",
"model": "Fiesta",
"year": 2022,
"vin": "1GYS4DKJ1FR125068"
}
],
"paginationResult": {
"nextPageToken": ""
}
}
¶ Pagination
-
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 1000).
¶ Rate Limit
- Rate limit for this endpoint is 1,00,000 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. |