[API] Create Vehicle
The Create Vehicle API enables Fleets or Rental Suppliers to add new vehicles to their system.
¶ Use Case
By using this API, the process of registering vehicles is automated, ensuring that all vehicle details, such as the make, model, year, VIN, and license plate are accurately captured, with an expected data refreshness of less than 2 minutes.
¶ Support for Hierarchical Data
The Create 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.write
¶ Resource
/v1/vehicle-suppliers/vehicles
¶ HTTP Method
POST
¶ Authorization
¶ Example Request
curl -X POST "https://api.uber.com/v1/vehicle-suppliers/vehicles" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"owner_id":"<owner_id>",
"make":"Honda",
"model":"Civic",
"year":2020,
"vin":"KM8JU3AC6DU590931",
"license_plate":"LP1234",
"color_hex_code":"FFFFFF"
}'
¶ Request Body Parameters
Name | Type | Description |
---|---|---|
owner_id |
string | ID of the vehicle supplier who 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 (optional) |
string | License plate ID of the vehicle. |
color_hex_code (optional) |
string | Hex code of the vehicle color, e.g. FFFFFF for white color |
¶ Example Response
Status-code: 200
{
"vehicle": {
"id": "<vehicle_id>",
"owner_id": "<owner_id>",
"make": "Honda",
"model": "Civic",
"year": 2020,
"vin": "KM8JU3AC6DU590931",
"license_plate": "LP1234",
"color_hex_code": "FFFFFF",
"color_name": "white",
"last_updated": 1583365226000
}
}
¶ 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 |
Rate limit
- The rate limit for this endpoint is 2000 requests per hour (RPH).
¶ Endpoint Specific Errors
Http Status Code | Code | Message |
---|---|---|
400 |
bad_request | The request parameters are invalid |
400 |
validation_failed | The required field is missing |
401 |
unauthorized | Invalid OAuth 2.0 credentials provided |
404 |
organization_not_found | Supplier organization was not found or not authorized |
409 |
vehicle_already_exists | Vehicle with same VIN already exists |
429 |
rate_limited | Number of requests exceeds allowed limit |
500 |
internal_server_error | Internal server error |
503 |
service_unavailable | Service unavailable |
Note
- Before using this endpoint, verify the make and model of the vehicle with the operations team to ensure accuracy and reduce errors.