GET request endpoint results rider_id is null

61 views Asked by At

why is it that the riders have a null rider_id in the example? but the description says otherwise? riders[].rider_id : The hashed rider uuid. It doesnt say anything about it being may be null. Else what's the point of returning it. GET request

or is just an example, and the actual response has all of these ids not null

{
  "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": "(555)555-5555",
    "sms_number": "(555)555-5555",
    "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": {
    "latitude": 37.3303463,
    "longitude": -121.8890484,
    "eta": 5
  },
  "destination": {
    "latitude": 37.6213129,
    "longitude": -122.3789554,
    "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
    }
  ]
}
1

There are 1 answers

0
Charlyn G On BEST ANSWER

The riders array, as specified in the GET /request/{request_id} reference page, is returned only for shared rides (uberPOOL rides). You will only be able to get a non-null rider_id if that rider account has already authenticated with your developer app.

This means that if any rider_id in the riders array is null, the rider account associated with that rider_id has not authenticated with your app.