Dispatch flex ride
POSThttps://api.uber.com/v1/guests/trips/{request_id}/dispatch
¶ Use case
Use this endpoint to dispatch a “Flexible ride” on behalf of a guest. Call this endpoint on the day of pickup when rider is ready, and Uber would start preparing a driver dispatch. We recommend calling /v1/guest-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 guests.trips
scope.
¶ Request
¶ Example request
curl -X POST \
-H 'authorization: Bearer <access_token>' \
-H 'content-type: application/json' \
-d '{}' \
'https://api.uber.com/v1/guests/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.
{
{
"message": "This ride can no longer be dispatched.",
"metadata": {
"statusCode": "404"
},
"code": "entity_not_found"
}
}
Example error 2: Ride could not be found.
{
{
"message": "Not found",
"metadata": {
"statusCode": "404"
},
"code": "entity_not_found"
}
}
Example error 3: Attempted to dispatch a ride before pickup day.
{
{
"message": "Ride cannot be dispatched until pickup day.",
"metadata": {
"statusCode": "404"
},
"code": "entity_not_found"
}
}
Example error 4: Attempted to dispatch non-flex type ride.
{
{
"message": "This ride type cannot be dispatched.",
"metadata": {
"statusCode": "404"
},
"code": "entity_not_found"
}
}