[API] Transfer Vehicle
The Transfer Vehicle API is designed to enable the smooth transition of vehicle ownership between organizations under the same vehicle supplier category, such as Fleets or Rentals.
¶ Use case
The “Transfer Vehicle” API utilizes vehicle_id and new_owner_id to update ownership details within the same vehicle supplier, with data refreshness time being less than 2 minutes. This API ensures that all vehicle records, such as make, model, VIN, owner _id, and the last updated timestamp, are up-to-date and accurately reflect the new ownership status.
¶ Support for Hierarchical Data
The Transfer 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/:vehicle_id/transfer
¶ HTTP Method
POST
¶ Authorization
¶ Example Request
curl -X POST "https://api.uber.com/v1/vehicle-suppliers/vehicles/:vehicle_id/transfer" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"new_owner_id":"<new_owner_id>"
}'
¶ Request Path Parameters
Name | Type | Description |
---|---|---|
vehicle_id |
string | Vehicle ID returned from Create Vehicle response. |
¶ Request Body Parameters
Name | Type | Description |
---|---|---|
new_owner_id |
string | ID of the new vehicle supplier who will own the vehicle. |
¶ Example Response
Status-code: 200
{
"vehicle": {
"id": "<vehicle_id>",
"owner_id": "<owner_id>",
"make": "Honda",
"model": "Civic",
"year": 2020,
"vin": "1FMCU14T6JU400773",
"license_plate": "TEST-123",
"color_hex_code":"FFFFFF",
"color_name": "white",
"last_updated": 1585339676000
}
}
¶ 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 1800 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 |
422 |
transfer_assigned_vehicle | It is not allowed to transfer an assigned vehicle |
429 |
rate_limited | Number of requests exceeds allowed limit |
500 |
internal_server_error | Internal server error |
503 |
service_unavailable | Service unavailable |
Notes
- When using the “Transfer Vehicle” API, ensure both the vehicle and the receiving organization are recognized and authorized in the system. Also, the vehicle must not be currently assigned to another task, as transfers of assigned vehicles are not allowed.