Three lines

Uber

Developers

Dispatch flex ride

POSThttps://api.uber.com/v1/guests/trips/{request_id}/dispatch

Privileged and Confidential This endpoint design has been confidentially shared with you. It is still under development and is subject to change without notice. Please do not share this document or API endpoint details with anyone who is not authorized to have access. For more information read about scopes.

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"
  }
}
Endpoint Possible Errors
HTTP Status Code Description
400 validation_failed This error occurs when an incorrect or invalid request_id is provided in the request path. Please use a valid request_id to avoid this error.
400 validation_failed This error occurs when an attempt is made to dispatch a flexible trip before the scheduled pickup_day. Ensure that the trip is dispatched only after the specified pickup_day to avoid this error.
400 entity_not_found This error occurs when attempting to dispatch a flexible trip using a request_id that has expired. Ensure that the request_id corresponds to an active and valid trip to avoid this error.
401 unauthorized Authentication failed. The client lacks valid authentication credentials for the requested resource.
403 forbidden The client does not have permission to access the requested resource.
404 not_found The requested resource or entity could not be found on the server or in the database.
500 internal_server_error An unexpected error occurred on the server while processing the request.

Uber

Developers
© 2023 Uber Technologies Inc.