Dispatch flex ride
POST/v1/health/trips/{request_id}/dispatch
¶ Use case
Use this endpoint to dispatch a “Flexible ride” on behalf of a rider. Call this endpoint on the day of pickup when rider is ready, and Uber would start preparing a driver dispatch. We recommend calling /v1/health-trips-get following this request, in order to get latest information on trip details such as price, ETA etc.
The endpoint would return an error if the ride has already been redeemed by the guest.
Please note that this endpoint is only available for a Flexible ride type.
If the request is from a third party (3P) app, please add x-uber-organizationuuid header and the Organization UUID as the value or the request will be denied.
¶ Authorization
OAuth 2.0 Bearer token with the health.trips
scope.
¶ Request
¶ Example request
curl -X POST \
-H 'authorization: Bearer <access_token>' \
-H 'content-type: application/json' \
-d '{}' \
'https://api.uber.com/v1/health/trips/<request_id>/dispatch'
¶ Request URL path parameters
URL path parameter | Type | Description |
---|---|---|
request_id |
string |
A unique identifier of a trip’s request returned when creating a flexible trip (required). |
¶ Response
¶ Example response
HTTP 200 OK
¶ Endpoint errors
Example error 1: The ride is already dispatched.
{
"code": "entity_not_found",
"message": "This ride can no longer be dispatched."
}
Example error 2: Ride could not be found.
{
"code": "entity_not_found",
"message": "Not found"
}
Example error 3: Attempted to dispatch a ride before pickup day.
{
"code": "validation_failed",
"message": "Ride cannot be dispatched until pickup day"
}
Example error 4: Attempted to dispatch non-flex type ride.
{
"code": "validation_failed",
"message": "This ride type cannot be dispatched."
}