GET /requests/current
¶ Ride Request - Current
The Ride Request endpoint allows retrieving real-time details for an ongoing trip.
This endpoint behaves similarly to the GET /requests/{request_id} endpoint, except you do not need to provide a request_id
. If there is no trip in progress the endpoint will result in a 404 not found error. This endpoint will only work for trips requested through your app unless you have the all_trips
scope.
By default, only details about trips your app requested will be returned. 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/current
¶ Authorization
OAuth 2.0 user access token with the all_trips
or request
scope.
¶ 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/current'
¶ 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": "(415)555-1212",
"sms_number": "(415)555-1212",
"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 formatted phone number for calling a driver. Note, this may be different from driver.sms_number. |
driver.sms_number |
string |
The 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/lng 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’. |
¶ 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. |
¶ HTTP Error Codes
Below is a list of the HTTP error codes this endpoint could return.
HTTP Status | Code | Description |
---|---|---|
403 | forbidden | Forbidden |
404 | no_current_trip | User is not currently on a trip. |