The Routing OSM API supports different waypoint types and attributes in order to support different use cases.
By choosing the appropriate waypoint type the route will actually reach the location off the road, stop on the road close to the location or just pass by a location at a given distance.
The route from or to an off-road waypoint starts or ends at the given location, and the distance to the match point on the nearest possible road will be included in the route as well as in its polyline. The travel time for this part is calculated using an average vehicle-specific speed.
This waypoint type should be used when the route ends rather at the front door than at the road, for example for routings from house to house or for delivery services. Use this waypoint type when recalculating a route from the Route Optimization API.
For several exact addresses with street and house number, the Geocoding API provides an additional roadAccessPosition which is on that road from which the house can be accessed. This is not necessarily the nearest road.
The route from or to an on-road waypoint starts or ends on the road which is nearest to the given location and which can be used by the selected vehicle.
This waypoint type should be used when the distance from the given location to the match point on the road is not significant, for example when calculating the distance between city centers or click-points on the map.
The total number of waypoints in a request is limited to 25.
For bicycle and pedestrian routes, the air-line distance of all waypoints in a request is limited to 1000 km.
Try it in the Waypoints code sample.