Positioning API (beta)

Overview

IndoorAtlas Positioning REST API allows rough-accuracy tracking of any devices that are able to scan their surrounding Wi-Fi environment. This service is ideal for devices that are not able to run the full IndoorAtlas SDK such as wearables, IoT devices or even PCs.

For tracking of mobile phones, it is highly recommended to use the IndoorAtlas SDKs for better accuracy.

Prerequisites

  • The relevant premises are mapped with Map Creator 2
  • The API key used is created with Positioning API scope enabled.

Example

To use the positioning API, the application must be able to read a Wi-Fi scan from the device. It is a list of observed Wi-Fi access point MAC addresses (BSSIDs) and the corresponding signal strengths (RSSIs in dBm).

To find the location of the device, the Wi-Fi scan is sent to the /locate endpoint of the API as the JSON payload of an HTTP POST request, for example:

curl -X POST "https://positioning-api.indooratlas.com/v1/locate?key=$APIKEY" \
  -H "Content-Type: application/json" \
  -d '{"wifis":[
    {"macAddress":"06:18:d6:c1:c0:89","signalStrength":-55},
    {"macAddress":"de:99:ad:37:be:1c","signalStrength":-82}
  ]}'

which returns the corresponding coordinates, floor number and accuracy (uncertainty radius):

{
  "location": {
    "floorNumber": 7,
    "coordinates": {
      "lat": 60.17066855531062,
      "lon": 24.945905116025607
    },
    "accuracy": 10
  },
  "context": {
    "indooratlas": {
      "floorPlanId": "a314b673-d27d-4bd1-a9bf-bc0cdbd7147c",
      "venueId": "9760790b-4069-41d0-949a-3ed28ad2dbe8"
    }
  }
}

The response also includes the associated floor plan and location contexts as floorPlanId and venueId. The full metadata corresponding to these IDs can also be fetched from the API: See full API reference here.