[API] Transfer Driver
The Transfer Driver API moves a fleet driver from their current organization to another organization under the same root organization, without sending an invite to the driver.
¶ Use case
Fleets that organize drivers into sub-organizations (for example by city, depot or business line) can use the “Transfer Driver” API to move a driver between two of those sub-organizations in a single call. The API uses driver_id and target_org_id; the driver’s current organization is the source and is not passed in the request. The driver does not need to accept anything, and stays attached to the fleet throughout the move.
¶ Support for Hierarchical Data
The Transfer Driver API automatically operates within the hierarchical structure of the organization linked to the developer’s account at the time of setup. The source and target organizations must be under the same root organization.
¶ Supported supplier types
Fleets
¶ Scopes
vehicle_suppliers.drivers.transfer
¶ Resource
/v1/vehicle-suppliers/drivers/transfer
¶ HTTP Method
POST
¶ Authorization
¶ Example Request
curl -X POST "https://api.uber.com/v1/vehicle-suppliers/drivers/transfer" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"driver_id": {
"value": "<driver_id>"
},
"target_org_id": {
"value": "<target_org_id>"
}
}'
¶ Request Body Parameters
| Name | Type | Description | Required |
|---|---|---|---|
driver_id |
UUID | Encrypted ID of the driver to transfer. Use the driverIdEncrypted value returned by the Get Drivers Information API. The driver’s current organization is the source. |
Yes |
target_org_id |
UUID | Encrypted ID of the organization to move the driver to. Must be under the same root organization as the driver’s current organization. | Yes |
¶ Example Response
Status-code: 200
{
"membershipUuid": {
"value": "<membership_id>"
}
}
¶ Response Body Parameters
| Name | Type | Description |
|---|---|---|
membershipUuid |
UUID | Encrypted ID of the driver’s new membership in the target organization. |
¶ Rate limit
- The rate limit for this endpoint is 10000 requests per hour (RPH).
¶ Endpoint Specific Errors
| Http Status Code | Code | Message |
|---|---|---|
400 |
bad_request | driver and target organization are required |
400 |
bad_request | Driver is not a member of any organization |
400 |
bad_request | Source and target organizations are the same |
400 |
bad_request | Source and target organizations are not under the same root organization |
400 |
bad_request | Driver has a vehicle assigned in the source organization |
400 |
bad_request | Reason the driver cannot join the target organization (eligibility checks) |
401 |
unauthorized | Invalid OAuth 2.0 credentials provided |
403 |
forbidden | The requesting user is not authorized to perform the action |
404 |
not_found | Driver or organization was not found |
409 |
conflict | The request conflicts with the driver’s current membership |
429 |
rate_limited | Number of requests exceeds allowed limit |
500 |
internal_server_error | Internal server error |
503 |
service_unavailable | Service unavailable |
Notes
- The developer’s application must have the transfer permission on the root organization that the source and target organizations belong to.
- Transfers are only allowed between organizations under the same root organization. Transfers across root organizations are not supported.
- One driver is transferred per request. To transfer several drivers, send one request per driver.
- A driver who has a vehicle assigned in the source organization cannot be transferred. Unassign the vehicle first.
- The same eligibility checks as adding a driver to an organization apply to the target organization, including compliance and fraud checks. The request is rejected if any check fails.
- The driver’s city and flow type are updated to those of the target organization, as when a driver joins an organization through an invite.
- A successful response means every check passed and the transfer has started. The transfer completes asynchronously; use the Get Drivers Information API to confirm the driver’s new organization.