Positioning API Developer's Guide

Constructing a Request

A typical request to the Positioning API includes the basic elements shown in the following table and, in addition, it may contain resource-specific parameters or data.

Table 1. Basic request elements
Element Value/Example Description
Base URL https://pos.api.here.com Production environment only
Path /positioning/v1/  
Resource

locate

HTTPS POST only, submit data in the body of the request

HTTP header field Content-Type=application/json Used in both requests and responses.
HTTP header field Content-Encoding=gzip Optional header, indicates gzip encoded request body content
Application Code &app_code={YOUR_APP_CODE} Substitute your own unique app_code
Application Id &app_id={YOUR_APP_ID} Substitute your own unique app_id
Here is an example of locate request, which uses the HTTP POST method:
https://pos.api.here.com/positioning/v1/locate
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
The POST body is as follows

{
  "wlan": [{
  "mac": "36:68:95:1A:36:93",
  "powrx": -74
  }, {
  "mac": "18:64:72:B7:BC:B2",
  "powrx": -75
  },{
  "mac": "18:64:72:B7:89:21",
  "powrx": -76
  },{
  "mac": "18:64:72:B7:BC:B1",
  "powrx": -77
  },{
  "mac": "18:64:72:B7:B1:63",
  "powrx": -79
  }]
}