Back to Documentation Overview

Pickup/Dropoff API

The Pickup/Dropoff API can be used to retrieve ideal pick-up and drop-off locations resulting in a more accurate and optimal routing and ultimately an enhanced user experience.

For example, imagine a passenger or a delivery partner requesting a pick-up from a shopping center. This may lead to the origin coordinates being inside the building instead of the road. Moreover, the nearest road to this pick-up location may not be desirable as it might redirect the user to a back alley that's not accessible from the shopping center.

The Pickup/Dropoff API solves this problem by intelligently snapping the input location to a more optimized location on the road. For each input position, the GetRoutablePositions endpoint returns an associated position that is accessible by foot. Vehicles can then drive to these positions to pick up and drop off passengers or delivery items.

# Pick-up location inside a shopping center
curl --request POST https://api.rideos.ai/pudo/v1/GetRoutablePositions \
--header "Content-Type: application/json" \
--header "X-Api-Key: $RIDEOS_API_KEY" \
--data '{
          "positions": [
            {
              "latitude": 32.867243,
              "longitude": -96.774325
            }
          ]
        }'
# Response with the optimized pick-up location
{
  "routablePositions": [
    {
      "latitude": 32.8665703,
      "longitude": -96.77414320000001
    }
  ]
}