Three lines

Uber

Developers

[API] Unassign Vehicle

Privileged and Confidential This endpoint design has been confidentially shared with you. It is still under development and is subject to change without notice. Please do not share this document or API endpoint details with anyone who is not authorized to have access. For more information read about scopes.

The Unassign Vehicle API enables vehicle suppliers to disassociate a vehicle from a driver within their organization.

Use case

The Unassign Vehicle API primarily focuses on managing vehicles within Fleets or Rental services. This API allows for the dynamic un-assignment of vehicles from drivers, which is particularly useful in scenarios where vehicles need to be reallocated or temporarily removed from service. Additionally, the data refreshness time for this API is less than 2 minutes, ensuring timely updates in the system.

Support for Hierarchical Data

The Unassign 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.assignment

Resource

/v1/vehicle-suppliers/vehicles/:vehicle_id/unassign

HTTP Method

POST

Authorization

Client Credentials

Example Request
curl -X POST "https://api.uber.com/v1/vehicle-suppliers/vehicles/:vehicle_id/unassign" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
    "driver_id":"driver_id"
}'

Request Path Parameters
Name Type Description
vehicle_id string Vehicle ID returned from Create Vehicle response.
Request Body parameters
Name Type Description
driver_id (optional) string Driver ID returned from Get Driver Info response. If driver_id is not provided, all drivers will be unassigned from the given vehicle

Example Response
Status-code: 204 No Content
{
}
Response Body parameters

None: No data is returned in the body of the response.

Rate limit
  • The rate limit for this endpoint is 3600 requests per hour (RPH).
Endpoint Success Codes
Http Status Code Code Message
200 OK Driver was successfully unassigned
204 NO_CONTENT There was no drivers to unassign
Endpoint Specific Errors
Http Status Code Code Message
400 bad_request The request parameters are invalid, e.g. vehicle_id is not recognized
401 unauthorized Invalid OAuth 2.0 credentials provided
404 vehicle_not_found The vehicle is not found
404 driver_not_found The driver is not found
429 rate_limited Number of requests exceeds allowed limit
500 internal_server_error Internal server error
503 service_unavailable Service unavailable

Notes

  • The “Driver ID” is a parameter obtained from the Get Driver Info response. It is used to specify which driver to unassign from a vehicle. If the “driver_id” is not provided when making a request to unassign a vehicle, the API will remove all drivers associated with that vehicle, effectively unassigning the vehicle from all drivers.

Uber

Developers
© 2023 Uber Technologies Inc.