[API] Get shifts
The GET API is designed for debugging purposes when the supplier integrated the Upsert API.
¶ Use case
By using the GET API, suppliers can confirm that shifts are stored as expected and verify 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
¶ Resource
/v1/vehicle-supplier/shifts/driver/:driver_id
¶ HTTP Method
GET
¶ Authorization
¶ Example Request
curl -X POST "https://api.uber.com/v1/vehicle-supplier/shifts/driver/:driver_id?start_time_utc=<time>&end_time_utc=<time>" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>'
¶ Request Path Parameters
Name | Type | Description |
---|---|---|
driver_id |
string | Driver ID for whom the shift is planned |
¶ Request Query Parameters
Name | Type | Description |
---|---|---|
start_time_utc |
i64 | start time of desired search interval in epoch milliseconds |
end_time_utc |
i64 | end time of desired search interval in epoch milliseconds |
¶ Example Response
Status-code: 200
{
"shifts": [
{
"start_time_utc": "2024-12-30T17:11:00.000Z",
"end_time_utc": "2024-12-30T21:11:00.000Z",
"metadata": {
"start_location": {
"latitude": 123,
"longitude": 456
},
"end_location": {
"latitude": 234,
"longitude": 567
}
}
}
]
}
¶ Response Body Parameters
Name | Type | Description |
---|---|---|
shifts |
list<Shift> | list of planned shifts |
¶ 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
- Shifts properly contained in the internal [start_time_utc, end_time_utc) will be returned