[API][V2] Delete earner shifts
The Delete Earner Shifts API is designed for suppliers to delete shifts for their earners that overlap with a given time range.
¶ Use case
By using the Delete Earner Shifts API, suppliers can remove planned shifts that are no longer valid, such as when a driver’s schedule changes or a shift was created in error.
¶ 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.schedule.update |
Deleting 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/delete/earner/:earner_uuid
¶ HTTP Method
POST
¶ Authorization
¶ Example Request
curl -X POST "https://api.uber.com/v2/vehicle-supplier/shifts/delete/earner/:earner_uuid" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data '{
"start_time_utc": {
"value": "1795578688000"
},
"end_time_utc": {
"value": "1795593088000"
}
}'
¶ Request Path Parameters
| Name | Type | Description |
|---|---|---|
earner_uuid |
string | UUID of the earner whose shifts will be deleted |
¶ Request Body Parameters
| Name | Type | Description |
|---|---|---|
start_time_utc |
object | Start of the time range. Object with value field containing epoch milliseconds as a string |
end_time_utc |
object | End of the time range. Object with value field containing epoch milliseconds as a string |
¶ Example Response
Status-code: 200
{}
¶ 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 deleted - All the parameters in the request body are mandatory