[API] Create Vehicle
Creates a vehicle of the vehicle supplier.
¶ Resource
/v1/vehicle-suppliers/vehicles
¶ HTTP Method
POST
¶ Access Method
¶ Required scopes
vehicle_suppliers.vehicles.write
¶ 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 |
¶ Response Fields
Name | Type | Description |
---|---|---|
vehicle |
object | Vehicle object |
Vehicle
object fields
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 |
¶ 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
}
}
¶ 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 |