Source: https://developers.woosmap.com/api-reference/indoor-api/get-indoor-directions-venue_id/

> For clean Markdown of any page, append `.md` to the page URL.

> For a complete documentation index, see https://developers.woosmap.com/llms.txt

# Directions



# 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`](#authorization-indoor-api-privatekeyauth)
apiKeyquery

[`X-Api-Key`](#authorization-indoor-api-privatekeyheaderauth)
apiKeyheader

[`key`](#authorization-indoor-api-publickeyauth)
apiKeyquery

### Path Parameters

[`venue_id`](#path-venue-id)
stringrequired

ID of the Venue

### Query Parameters

[`origin`](#query-origin)
stringrequired

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`](#query-destination)
stringrequired

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`](#query-language)
stringDefaults to `en`

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

[`units`](#query-units)
objectDefaults to `metric`

Unit System to use for response

[`waypoints`](#query-waypoints)
stringDefaults 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`](#query-optimize)
booleanDefaults 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`](#query-mode)
string

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

[`avoid_in`](#query-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

200application/json

OK

[`status`](#resp-200-status)
stringDefaults to `ok`

[`routes`](#resp-200-routes)
object[]required

#Show 2 propertiesHide 2 properties

routes.[`bounds`](#resp-200-routes-bounds)
arrayrequired

Bounding box of the route

routes.[`legs`](#resp-200-routes-legs)
object[]required

List of different legs of the journey

Show 6 propertiesHide 6 properties

routes.legs.[`distance`](#resp-200-routes-legs-distance)
objectrequired

Distance of this Leg

Show 2 propertiesHide 2 properties

routes.legs.distance.[`value`](#resp-200-routes-legs-distance-value)
numberrequired

Distance in metres

routes.legs.distance.[`text`](#resp-200-routes-legs-distance-text)
stringrequired

Distance as text based response with unit type

routes.legs.[`duration`](#resp-200-routes-legs-duration)
objectrequired

Duration of this Leg

Show 2 propertiesHide 2 properties

routes.legs.duration.[`value`](#resp-200-routes-legs-duration-value)
numberrequired

Duration in seconds

routes.legs.duration.[`text`](#resp-200-routes-legs-duration-text)
stringrequired

Duration as text based response with unit type

routes.legs.[`start_location`](#resp-200-routes-legs-start-location)
objectrequired

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`](#resp-200-routes-legs-start-location-lat)
numberrequired

routes.legs.start\_location.[`lng`](#resp-200-routes-legs-start-location-lng)
numberrequired

routes.legs.start\_location.[`level`](#resp-200-routes-legs-start-location-level)
integerrequired

routes.legs.[`end_location`](#resp-200-routes-legs-end-location)
objectrequired

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`](#resp-200-routes-legs-end-location-lat)
numberrequired

routes.legs.end\_location.[`lng`](#resp-200-routes-legs-end-location-lng)
numberrequired

routes.legs.end\_location.[`level`](#resp-200-routes-legs-end-location-level)
integerrequired

routes.legs.[`steps`](#resp-200-routes-legs-steps)
object[]required

List of different steps of this Leg

Show 10 propertiesHide 10 properties

routes.legs.steps.[`distance`](#resp-200-routes-legs-steps-distance)
objectrequired

Distance of this Step

Show 2 propertiesHide 2 properties

routes.legs.steps.distance.[`value`](#resp-200-routes-legs-steps-distance-value)
numberrequired

Distance in metres

routes.legs.steps.distance.[`text`](#resp-200-routes-legs-steps-distance-text)
stringrequired

Distance as text based response with unit type

routes.legs.steps.[`duration`](#resp-200-routes-legs-steps-duration)
objectrequired

Duration of this Step

Show 2 propertiesHide 2 properties

routes.legs.steps.duration.[`value`](#resp-200-routes-legs-steps-duration-value)
numberrequired

Duration in seconds

routes.legs.steps.duration.[`text`](#resp-200-routes-legs-steps-duration-text)
stringrequired

Duration as text based response with unit type

routes.legs.steps.[`poi_id`](#resp-200-routes-legs-steps-poi-id)
integer

If a POI exists, its ID is given.

routes.legs.steps.[`bearing_start`](#resp-200-routes-legs-steps-bearing-start)
numberrequired

TODO

routes.legs.steps.[`bearing_end`](#resp-200-routes-legs-steps-bearing-end)
numberrequired

TODO

routes.legs.steps.[`start_location`](#resp-200-routes-legs-steps-start-location)
objectrequired

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`](#resp-200-routes-legs-steps-start-location-lat)
numberrequired

routes.legs.steps.start\_location.[`lng`](#resp-200-routes-legs-steps-start-location-lng)
numberrequired

routes.legs.steps.start\_location.[`level`](#resp-200-routes-legs-steps-start-location-level)
integerrequired

routes.legs.steps.[`end_location`](#resp-200-routes-legs-steps-end-location)
objectrequired

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`](#resp-200-routes-legs-steps-end-location-lat)
numberrequired

routes.legs.steps.end\_location.[`lng`](#resp-200-routes-legs-steps-end-location-lng)
numberrequired

routes.legs.steps.end\_location.[`level`](#resp-200-routes-legs-steps-end-location-level)
integerrequired

routes.legs.steps.[`polyline`](#resp-200-routes-legs-steps-polyline)
array[]required

TODO

routes.legs.steps.[`instruction`](#resp-200-routes-legs-steps-instruction)
Instruction

A text based instruction for this step

routes.legs.steps.[`routing_profiles`](#resp-200-routes-legs-steps-routing-profiles)
string[]

routes.legs.[`waypoint`](#resp-200-routes-legs-waypoint)
string

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

### Errors

#400

Bad Request

 

`application/json`

[`detail`](#err-400-detail)
stringrequired

#401

Unauthorized

 

`application/json`

[`detail`](#err-401-detail)
stringrequired

#402

Payment Required

 

`application/json`

No properties defined

#403

Forbidden

 

`application/json`

No properties defined

#422

Unprocessable Entity

 

`application/json`

[`detail`](#err-422-detail)
object[]required

The validation errors.

[`context`](#err-422-context)
objectrequired

Context

```shell
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'
```

```python
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)
```

```javascript
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));
```

```json
{
  "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"
}
```
