Routing

Optimal waypoint ordering.

Find the optimal visiting order over a set of waypoints (a travelling-salesman solve) and return a route that visits them in that order. The first and last locations stay fixed.

Quota cost: N units per call, where N is the number of locations. Capped at 20 locations; requests beyond that return 400 without charging quota.

post/optimized-route/v1

Request

  • Base URL: https://api.rijwind.com
  • URL: https://api.rijwind.com/optimized-route/v1
  • Auth: HTTP bearer

Request body

costing'auto' | 'bicycle' | 'pedestrian' required

Routing profile. auto (car), bicycle, or pedestrian (foot).

units'kilometers' | 'miles'

Example request

{
  "locations": [
    {
      "lat": 52.3676,
      "lon": 4.9041
    }
  ]
}

Response

Optimized route.

Example response

{
  "trip": {
    "language": "en-US",
    "legs": [
      {
        "maneuvers": [
          {
            "instruction": "Head north on Damrak."
          }
        ],
        "summary": {
          "length": 60.4,
          "time": 4810
        }
      }
    ],
    "statusMessage": "Found route between points",
    "summary": {
      "length": 60.4,
      "time": 4810
    },
    "units": "kilometers"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.