Search code examples
uber-api

Which waypoints are returned by API and in what order?


Which waypoints are returned by API? I need to know if it will include only waypoints between moment where passenger is picked up and dropped off, or will it also include waypoints before passenger is picked up?

Also, are the waypoints returned in correct order? Is there plans to add estimated ETA's to each waypoint?


Solution

  • The waypoints include any upcoming pickup or dropoff stops scheduled before your user’s final destination. We don't include waypoints about the other POOL rider after your user's destination, since from your user's perspective, the trip is over.

    As the documentation states, the waypoint indicates whether it is a pickup or dropoff type and which rider it is associated with. The waypoints themselves are ordered and update as the trip progresses.

    So, consider a situation where your user gets picked up at Home and dropped off at Gym, and is matched with another rider will be picked up in the middle of your user's trip at Downtown then dropped off Somewhere after your user finishes their trip.

    The waypoints before your user gets picked up would show:

    [Home, Downtown, Gym]

    Once your user is picked up, the waypoints would update to show:

    [Downtown, Gym]

    Since the Home waypoint has passed. Note we never return Somewhere since that is after your user's dropoff.