[API][V2] Get earner shifts
The Get Earner Shifts API is designed for suppliers to retrieve shifts for their earners that overlap with a given time range.
¶ Use case
By using the Get Earner Shifts API, suppliers can verify that shifts are stored as expected and confirm Upsert API behaviour.
¶ Support for Hierarchical Data
The API operates within the hierarchical structure of the organization linked to the developer’s account at the time of setup.
¶ Supported supplier types
Fleets
¶ Scopes
vehicle_suppliers.shifts.management
¶ Required Internal Permissions
In addition to the OAuth scope above, the user that the access token represents must be granted the following Identity permission for the supplier organization that owns the earner. Permissions are assigned via Uber Admin Portal by a supplier-org admin.
| Permission | Required for |
|---|---|
supplier.driver.shift.read |
Reading earner shifts |
If this permission is missing, the request will fail with 401 unauthorized / permission denied even when the OAuth scope is correctly authorized for the application.
¶ Resource
/v2/vehicle-supplier/shifts/earner/:earner_uuid
¶ HTTP Method
GET
¶ Authorization
¶ Example Request
curl -X GET "https://api.uber.com/v2/vehicle-supplier/shifts/earner/:earner_uuid?start_time_utc=1795578688000&end_time_utc=1795593088000" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>'
¶ Request Path Parameters
| Name | Type | Description |
|---|---|---|
earner_uuid |
string | UUID of the earner whose shifts will be fetched |
¶ Request Query Parameters
| Name | Type | Description |
|---|---|---|
start_time_utc |
int64 | Start of the time range in epoch milliseconds |
end_time_utc |
int64 | End of the time range in epoch milliseconds |
¶ Example Response
Status-code: 200
{
"shifts": [
{
"start_time_utc": {
"value": "1795578688000"
},
"end_time_utc": {
"value": "1795593088000"
},
"zone_id": "us-east-1",
"marketplace_type": "MARKETPLACE_TYPE_EATS",
"metadata": {
"start_location": {
"point": {
"latitude": 37.7749,
"longitude": -122.4194
},
"name": "Start Depot",
"address": "123 Main St, San Francisco, CA"
},
"end_location": {
"point": {
"latitude": 37.7849,
"longitude": -122.4094
},
"name": "End Depot",
"address": "456 Market St, San Francisco, CA"
}
}
}
]
}
¶ Response Body Parameters
| Name | Type | Description |
|---|---|---|
shifts |
list | List of shift objects |
¶ Shift
| Name | Type | Description |
|---|---|---|
start_time_utc |
object | Start time of the shift. Object with value field containing epoch milliseconds as a string |
end_time_utc |
object | End time of the shift. Object with value field containing epoch milliseconds as a string |
zone_id |
string | Zone identifier for the shift |
marketplace_type |
string | Type of marketplace. One of: MARKETPLACE_TYPE_RIDES, MARKETPLACE_TYPE_EATS |
metadata |
object | Additional metadata related to the shift |
¶ Metadata
| Name | Type | Description |
|---|---|---|
start_location |
object | Start location of the shift |
end_location |
object | End location of the shift |
¶ Location
| Name | Type | Description |
|---|---|---|
point |
object | Geographic point of the location |
name |
string | Name of the location |
address |
string | Address of the location |
¶ Point
| Name | Type | Description |
|---|---|---|
latitude |
double | Latitude of the location |
longitude |
double | Longitude of the location |
¶ Rate limit
- The rate limit for this endpoint is 1 request per second.
¶ Endpoint Specific Errors
| Http Status Code | Code | Message |
|---|---|---|
400 |
bad_request | The request parameters are invalid, rate limited, code cancelled etc. |
401 |
unauthorized/permission denied | |
500 |
internal_server_error | Internal server error |
Note
- All shifts overlapping with the given time range
[start_time_utc, end_time_utc)will be returned - All the parameters in the request are mandatory