[API] Get Vehicle
The Get Vehicle is tailored for vehicle suppliers involved in Fleets or Rental services, allowing them to retrieve detailed information about a specific vehicle in their inventory.
¶ Use Case
By utilizing this Get Vehicle API, suppliers have access to ownership details, make, model, year, VIN, license plate, color, and compliance with necessary documents. Example compliance documents that can be accessed include Vehicle Insurance, Vehicle Registration, and Vehicle Inspection, with statuses such as ACTIVE, MISSING, or PENDING. Additionally, the data refreshness for this API is less than 2 minutes, ensuring that the information retrieved is both current and accurate.
¶ Support for Hierarchical Data
The Get Vehicle API automatically operates within the hierarchical structure of the organization linked to the developer’s account at the time of setup.
¶ Supported supplier types
Fleets/Rentals
¶ Scopes
vehicle_suppliers.vehicles.read
¶ Resource
/v1/vehicle-suppliers/vehicles/:vehicle_id
¶ HTTP Method
GET
¶ Authorization
¶ Example Request
curl GET "https://api.uber.com/v1/vehicle-suppliers/vehicles/:vehicle_id?fields=_all_" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json"
¶ Request Path Parameters
Name | Type | Description |
---|---|---|
fields |
string | If set to _all_ , the response includes the vehicle compliance info and vehicle assignment info. |
¶ Request Body Parameters
Name | Type | Description |
---|---|---|
vehicle_id |
string | Vehicle ID returned from Create Vehicle response. |
¶ Example Response
Status-code: 200
{
"vehicle": {
"id": "<vehicle_id>",
"owner_id": "<owner_id>",
"make": "Honda",
"model": "Civic",
"year": 2018,
"vin": "",
"license_plate": "LP1234",
"color_hex_code": "FFFFFF",
"color_name": "white",
"last_updated": 1583286227000,
"compliance": {
"status": "INACTIVE",
"documents": [
{
"global_type_name": "Vehicle Insurance",
"type_id": "<type_id>",
"status": "ACTIVE"
},
{
"global_type_name": "Vehicle Registration",
"type_id": "<type_id>",
"status": "MISSING"
},
{
"global_type_name": "Vehicle Inspection",
"type_id": "<type_id>",
"status": "PENDING"
}
]
},
"assignments": [
{
"driver_id": "<driver_id>"
}
]
}
}
¶ Response Body parameters
Name | Type | Description |
---|---|---|
vehicle |
object | Vehicle object |
Vehicle
Name | Type | Description |
---|---|---|
id |
string | Vehicle ID |
owner_id |
string | ID of the vehicle supplier that owns the vehicle |
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 |
license_plate |
string | License plate ID of the vehicle |
color_hex_code |
string | Hex code of the vehicle color, e.g. FFFFFF for white color |
color_name |
string | Name of the vehicle color, e.g. White |
last_updated |
int | Last updated timestamp of the vehicle in milliseconds |
compliance |
object | Vehicle compliance info |
compliance.status |
string | Status of the vehicle: |
ACTIVE: vehicle is active | ||
INACTIVE: vehicle is not active | ||
compliance.documents |
object array | Vehicle documents |
compliance.documents[].type_name |
string | Granular type of document |
compliance.documents[].global_type_name |
string | Global type of document e.g. Vehicle Registration , Vehicle Insurance , Vehicle Inspection |
compliance.documents[].type_id |
string | ID of the document type |
compliance.documents[].status |
string | Status of the document: |
ACTIVE: document is approved and active | ||
MISSING: document is missing (not uploaded yet) | ||
PENDING: document is pending review from the document approver | ||
REJECTED: document was rejected by the document approver | ||
EXPIRED: document is expired | ||
EXPIRING: document is expiring in next 30 days | ||
compliance.documents[].status_reason_name |
string | Reason name for why the document is rejected |
compliance.documents[].expires_at |
int | Expiration timestamp of the document in milliseconds |
assignments |
object array | Vehicle assignments |
assignments[].driver_id |
string | Encrypted ID of the driver that is assigned to the vehicle |
Rate limit
- The rate limit for this endpoint is 7200 requests per hour (RPH).
¶ Endpoint Specific Errors
Http Status Code | Code | Message |
---|---|---|
400 |
bad_request | The request parameters are invalid |
401 |
unauthorized | Invalid OAuth 2.0 credentials provided |
404 |
vehicle_not_found | Vehicle was not found or not authorized |
404 |
organization_not_found | Supplier organization was not found or not authorized |
429 |
rate_limited | Number of requests exceeds allowed limit |
500 |
internal_server_error | Internal server error |
503 |
service_unavailable | Service unavailable |