Plan a route
GET
/routesPlans a route between two places. Mordor is not a valid destination for walking.
Request
Example request
cURL
curl -X GET 'https://api.middle-earth.example/v3/routes?from=<from>&to=<to>'Response
The planned route.
Body
Example response
application/json
Json
{
"waypoints": [
{
"place": "Hobbiton",
"day": 0
},
{
"place": "Bree",
"day": 4,
"hazards": [
"black riders"
]
},
{
"place": "Weathertop",
"day": 9,
"hazards": [
"nazgul"
]
},
{
"place": "Rivendell",
"day": 17
}
],
"total_days": 17,
"warning": "Avoid the main road after dark."
}