Directions

GET
https://api.woosmap.com/indoor/directions/{venue_id}

Returns the directions to go from an Origin to a Destination. Routing Configuration must be done before this endpoint will work.

Rate limit: 20/1s

Authorization

private_key
apiKey query
X-Api-Key
apiKey header
key
apiKey query

Path Parameters

venue_id
string required

ID of the Venue

Query Parameters

origin
string required

A string defining the origin of the route, in the format of lat,lng,level, poi_id (identifier of a POI), or ref:poi_ref (ref of a POI starting with 'ref:').

Examples:

  • lat,lng,level: 48.8818546,2.3572283,0
  • poi: 123456
  • ref: ref:entrance
Example: 48.8818546,2.3572283,0
destination
string required

A string defining the destination of the route, in the format of lat,lng,level, poi_id (identifier of a POI), or ref:poi_ref (ref of a POI starting with 'ref:').

Examples:

  • lat,lng,level: 48.8818546,2.3572283,0
  • poi: 123456
  • ref: ref:entrance
Example: 123456
language
string Defaults to en

A supported language as an ISO 639-1 2 letter code.

units
object Defaults to metric

Unit System to use for response

waypoints
string Defaults to ""

A list of points by which the route should pass seperated by |. Waypoints can be of the format: lat,lng,level, poi_id, ref:poi_ref

Example: 48.8818546,2.3572283,0|123456|48.8818546,2.3572283,0|ref:main_exit
optimize
boolean Defaults to false

If true and set with the waypoints parameter. The provided route is optimized by rearranging the waypoints in a more efficient order

mode
string

The mode to use to calculate the path (depends on the modes which were used to digitize the venue)

avoid_in
string

A list of Bounding Boxes which the routing should avoid seperated by |. A Bounding Box has a format of level;lat,lng;lat,lng;lat,lng;lat,lng;

Example: 1;48.8818546,2.3572283;48.8818547,2.3572282;48.8818548,2.3572281;48.8818549,2.3572280

Response

200 application/json

OK

status
string Defaults to ok
routes
object[] required
Show 2 propertiesHide 2 properties
routes. bounds
array required

Bounding box of the route

routes. legs
object[] required

List of different legs of the journey

Show 6 propertiesHide 6 properties
routes.legs. distance
object required

Distance of this Leg

Show 2 propertiesHide 2 properties
routes.legs.distance. value
number required

Distance in metres

routes.legs.distance. text
string required

Distance as text based response with unit type

routes.legs. duration
object required

Duration of this Leg

Show 2 propertiesHide 2 properties
routes.legs.duration. value
number required

Duration in seconds

routes.legs.duration. text
string required

Duration as text based response with unit type

routes.legs. start_location
object required

Starting Location of this Leg, as a Lat,Lng pair with a floor level number.

Show 3 propertiesHide 3 properties
routes.legs.start_location. lat
number required
routes.legs.start_location. lng
number required
routes.legs.start_location. level
integer required
routes.legs. end_location
object required

End Location of this Leg, as a Lat,Lng pair with a floor level number.

Show 3 propertiesHide 3 properties
routes.legs.end_location. lat
number required
routes.legs.end_location. lng
number required
routes.legs.end_location. level
integer required
routes.legs. steps
object[] required

List of different steps of this Leg

Show 10 propertiesHide 10 properties
routes.legs.steps. distance
object required

Distance of this Step

Show 2 propertiesHide 2 properties
routes.legs.steps.distance. value
number required

Distance in metres

routes.legs.steps.distance. text
string required

Distance as text based response with unit type

routes.legs.steps. duration
object required

Duration of this Step

Show 2 propertiesHide 2 properties
routes.legs.steps.duration. value
number required

Duration in seconds

routes.legs.steps.duration. text
string required

Duration as text based response with unit type

routes.legs.steps. poi_id
integer

If a POI exists, its ID is given.

routes.legs.steps. bearing_start
number required

TODO

routes.legs.steps. bearing_end
number required

TODO

routes.legs.steps. start_location
object required

Starting Location of this Step, as a Lat,Lng pair with a floor level number.

Show 3 propertiesHide 3 properties
routes.legs.steps.start_location. lat
number required
routes.legs.steps.start_location. lng
number required
routes.legs.steps.start_location. level
integer required
routes.legs.steps. end_location
object required

End Location of this Step, as a Lat,Lng pair with a floor level number.

Show 3 propertiesHide 3 properties
routes.legs.steps.end_location. lat
number required
routes.legs.steps.end_location. lng
number required
routes.legs.steps.end_location. level
integer required
routes.legs.steps. polyline
array[] required

TODO

routes.legs.steps. instruction
Instruction

A text based instruction for this step

routes.legs.steps. routing_profiles
string[]
routes.legs. waypoint
string

If waypoints were provided, this gives the input waypoint for this leg.

Errors

400

Bad Request

application/json
detail
string required
401

Unauthorized

application/json
detail
string required
402

Payment Required

application/json

No properties defined

403

Forbidden

application/json

No properties defined

422

Unprocessable Entity

application/json
detail
object[] required

The validation errors.

context
object required

Context

        curl -L -X GET 'https://api.woosmap.com/indoor/directions/west_pal?language=en&units=metric&origin=3623024&destination=3625106&key=YOUR_PUBLIC_API_KEY' \
-H 'Referer: http://localhost'

    
        import requests

url = "https://api.woosmap.com/indoor/directions/west_pal?language=en&units=metric&origin=3623024&destination=3625106&key=YOUR_PUBLIC_API_KEY"

payload={}
headers = {
    'Referer': 'http://localhost'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)


    
        var requestOptions = {
  method: 'GET',
  redirect: 'follow'
};

fetch("https://api.woosmap.com/indoor/directions/west_pal?language=en&units=metric&origin=3623024&destination=3625106&key=YOUR_PUBLIC_API_KEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

    
        
{
"routes": [
{
"bounds": [
-0.12493997331,
51.498230882255,
-0.12456220772511746,
51.49992534993494
],
"legs": [
{
"distance": {
"text": "217 meters",
"value": 217.48
},
"duration": {
"text": "218 seconds",
"value": 218
},
"end_location": {
"lat": 51.499924944345,
"level": 1,
"lng": -0.12461392044974706
},
"start_location": {
"lat": 51.498230882255,
"level": 1,
"lng": -0.12456220772511746
},
"steps": [
{
"bearing_end": -84.2851734177303,
"bearing_start": -84.2851734177303,
"distance": {
"text": "2 meters",
"value": 2.07
},
"duration": {
"text": "2 seconds",
"value": 2
},
"end_location": {
"lat": 51.4982349155,
"level": 1,
"lng": -0.12461111274
},
"instruction": {
"instruction_type": "walk_straight_walk_past",
"summary": "Walk straight past Toilets"
},
"poi_id": 3623024,
"polyline": [
[
-0.12458141958,
51.49823306561
],
[
-0.12461111274,
51.4982349155
]
],
"routing_profiles": [],
"start_location": {
"lat": 51.49823306561,
"level": 1,
"lng": -0.12458141958
}
},
{
"bearing_end": -81.48387948754326,
"bearing_start": -84.28520875361633,
"distance": {
"text": "1 meters",
"value": 1.47
},
"duration": {
"text": "2 seconds",
"value": 2
},
"end_location": {
"lat": 51.49823646981,
"level": 1,
"lng": -0.12463215818
},
"instruction": {
"instruction_type": "walk_straight_walk_past",
"summary": "Walk straight past Lord Chamberlain's Private Office"
},
"poi_id": 3624060,
"polyline": [
[
-0.12461111274,
51.4982349155
],
[
-0.12462429286,
51.49823573662
],
[
-0.12463215818,
51.49823646981
]
],
"routing_profiles": [],
"start_location": {
"lat": 51.4982349155,
"level": 1,
"lng": -0.12461111274
}
}
]
}
]
}
],
"status": "ok"
}
Was this helpful?