GET /requests/{request_id}
¶ Ride Request - Details
The Ride Request endpoint allows retrieving the status of an ongoing or completed trip that was created by your app.
By default, only details about trips your app requested will be accessible. If your app has all_trips
scope, however, trip details will be returned for all trips irrespective of which application initiated them.
See the Ride Request tutorial for a step-by-step guide to requesting rides on behalf of an Uber user. Please review the sandbox documentation on how to develop and test against these endpoints without making real-world Ride Requests and being charged.
¶ Resource
GET /v1.2/requests/{request_id}
¶ Authorization
OAuth 2.0 user access token with the request
or all_trips
scope.
¶ Path Parameters
Name | Type | Description |
---|---|---|
request_id |
string |
Unique identifier representing a Request. |
¶ Query Parameters
None
¶ Example Request
curl -H 'Authorization: Bearer <TOKEN>' \
-H 'Accept-Language: en_US' \
-H 'Content-Type: application/json' \
'https://api.uber.com/v1.2/requests/<REQUEST_ID>'
¶ Response
Status-Code: 200 OK
{
"product_id": "17cb78a7-b672-4d34-a288-a6c6e44d5315",
"request_id": "a1111c8c-c720-46c3-8534-2fcdd730040d",
"status": "accepted",
"surge_multiplier": 1.0,
"shared": true,
"driver": {
"phone_number": "+14155550000",
"sms_number": "+14155550000",
"rating": 5,
"picture_url": "https:\/\/d1w2poirtb3as9.cloudfront.net\/img.jpeg",
"name": "Bob"
},
"vehicle": {
"make": "Bugatti",
"model": "Veyron",
"license_plate": "I<3Uber",
"picture_url": "https:\/\/d1w2poirtb3as9.cloudfront.net\/car.jpeg"
},
"location": {
"latitude": 37.3382129093,
"longitude": -121.8863287568,
"bearing": 328
},
"pickup": {
"alias": "work",
"latitude": 37.3303463,
"longitude": -121.8890484,
"name": "1455 Market St.",
"address": "1455 Market St, San Francisco, California 94103, US",
"eta": 5
},
"destination": {
"alias": "home",
"latitude": 37.6213129,
"longitude": -122.3789554,
"name": "685 Market St.",
"address": "685 Market St, San Francisco, CA 94103, USA",
"eta": 19
},
"waypoints": [
{
"rider_id":null,
"latitude":37.77508531,
"type":"pickup",
"longitude":-122.3976683872
},
{
"rider_id":null,
"latitude":37.773133,
"type":"dropoff",
"longitude":-122.415069
},
{
"rider_id":"8KwsIO_YG6Y2jijSMf",
"latitude":37.7752423,
"type":"dropoff",
"longitude":-122.4175658
}
],
"riders": [
{
"rider_id":"8KwsIO_YG6Y2jijSMf",
"first_name":"Alec",
"me": true
},
{
"rider_id":null,
"first_name":"Kevin",
"me": false
}
]
}
Name | Type | Description |
---|---|---|
request_id |
string |
The unique ID of the Request. |
product_id |
string |
Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles. |
status |
string |
The status of the Request indicating state. |
vehicle |
object |
The object that contains vehicle details. Only non-null during an ongoing trip. |
vehicle.make |
string |
The vehicle make or brand. |
vehicle.model |
string |
The vehicle model or type. |
vehicle.license_plate |
string |
The license plate number of the vehicle. |
vehicle.picture_url |
string |
The URL to a stock photo of the vehicle (may be null). |
driver |
object |
The object that contains driver details. Only non-null during an ongoing trip. |
driver.phone_number |
string |
The E.164 formatted phone number for calling a driver. Note, this may be different from driver.sms_number. |
driver.sms_number |
string |
The E.164 formatted phone number for sending an SMS message to a driver. Note, this may be different from driver.phone_number. |
driver.rating |
float |
The driver’s star rating out of 5 stars. |
driver.picture_url |
string |
The URL to the photo of the driver. |
driver.name |
string |
The first name of the driver. |
location |
object |
The object that contains the location information of the vehicle and driver. |
location.latitude |
float |
The current latitude of the vehicle. |
location.longitude |
float |
The current longitude of the vehicle. |
location.bearing |
integer |
The current bearing of the vehicle in degrees (0-359). |
surge_multiplier |
float |
The surge pricing multiplier used to calculate the increased price of a Request. A multiplier of 1.0 means surge pricing is not in effect. |
pickup |
object |
The object containing the information about the pickup for the trip. |
pickup.alias |
string |
The alias from an Uber user’s profile mapped to the pickup address (if available). Can be either work or home . Only exposed with a valid access token for places scope. |
pickup.latitude |
float |
The latitude of the pickup. |
pickup.longitude |
float |
The longitude of the pickup. |
pickup.name |
string |
The name of the pickup place (if available). Not exposed in sandbox. |
pickup.eta |
float |
The estimated time until arrival at the pickup. ETA is only available when the trips is accepted or arriving. |
pickup.address |
string |
The address of the pickup location (if available). Not exposed in sandbox. |
destination |
object |
The object containing the information about the destination of the trip, if one has been set. |
destination.alias |
string |
The alias from an Uber user’s profile mapped to the destination address (if available). Can be either work or home . Only exposed with a valid access token for places scope. |
destination.latitude |
float |
The latitude of the destination. |
destination.longitude |
float |
The longitude of the destination. |
destination.name |
string |
The name of the destination place (if available). Not exposed in sandbox. |
destination.eta |
float |
The estimated time until arrival at the destination. Only non-null during an ongoing trip. |
destination.address |
string |
The address of the destination location (if available). Not exposed in sandbox. |
shared |
boolean |
True if the ride is an UberPOOL ride. False otherwise. This key is always present. |
riders |
array |
A list of co-riders who are dropped off before the current user. This is returned only for shared rides, like uberPOOL. |
riders[].rider_id |
string |
The hashed rider uuid. A value of null means that the rider account associated with the rider_id has not authenticated with your app. |
riders[].first_name |
string |
The first name of the rider. |
riders[].me |
boolean |
If true, this rider is the current authenticated user. |
waypoints |
array |
A list of waypoints. The waypoint contains: the lat/long of the waypoint, the rider involved, type of waypoint. This is returned only for shared rides, like uberPOOL. |
waypoints[].rider_id |
string |
The hashed rider uuid. A value of null means that the rider account associated with the rider_id has not authenticated with your app. |
waypoints[].latitude |
float |
Latitude of the waypoint. |
waypoints[].longitude |
float |
Longitude of the waypoint. |
waypoints[].type |
string |
The type of the waypoints. e.g., ‘pickup’, ‘dropoff’. |
¶ Completed trips responses
These fields are only populated when trips are active:
- driver
- vehicle
- location
- surge_multiplier
- pickup
- destination
- riders
- waypoints
An example response for a completed trip request:
Status-Code: 200 OK
{
"status": "completed",
"product_id": "a1111c8c-c720-46c3-8534-2fcdd730040d",
"request_id": "2b61e340-27bd-4937-8304-122009e4a393",
"driver": null,
"location": null,
"vehicle": null,
"shared": false
}
¶ Request Statuses
All possible statues of a Request’s life cycle.
Status | Description |
---|---|
processing |
The Request is matching to the most efficient available driver. |
no_drivers_available |
The Request was unfulfilled because no drivers were available. |
accepted |
The Request has been accepted by a driver and is “en route” to the start location (i.e. start_latitude and start_longitude ). This state can occur multiple times in case of a driver re-assignment. |
arriving |
The driver has arrived or will be shortly. |
in_progress |
The Request is “en route” from the start location to the end location. |
driver_canceled |
The Request has been canceled by the driver. |
rider_canceled |
The Request canceled by rider. |
completed |
Request has been completed by the driver. |