GuidesAPI Reference
Guides

How to contribute GSM, WLAN, and GNSS info

📘

Note

HERE Network Positioning API v1 is in maintenance and is not actively developed. Use HERE Network Positioning API v2 to get the latest features and updates. To learn more, see the HERE Network Positioning API v2 Developer Guide.

User Story

The user wants to improve the responses for requests to the locate resource by contributing cellular and WLAN measurements from a known location.

Request

The code block below demonstrates a POST request to contribute the cellular and WLAN information in the POST body.

https://pos.ls.hereapi.com/positioning/v1/contribute?apiKey={YOUR_API_KEY}

You need to set request content type in the HTTP headers:

Content-Type: application/json

This POST request requires the following POST body.

{
  "client":{
    "manufacturer":"maker-of-the-device",
    "platform":"platform-of-the-device",
    "name":"client-name",
    "version":"1.1.10107",
    "model":"XYZ-123",
    "firmware": "1.2.3",
    "homenetwork": [
      {
        "mcc": 262,
        "mnc": 501
      }
    ]
  },
  "contributions":[
    {
      "gsm":[
        {
          "mcc":262,
          "mnc":501,
          "lac":29589,
          "cid":19373,
          "timestamp":"2016-06-30T14:10:34Z"
        }
      ],
      "wlan":[
        { 
          "mac": "52:67:51:28:37:a2", 
          "powrx": -87, 
          "band": 5,
          "timestamp":"2016-06-30T14:10:34Z" 
        },
        { 
          "mac": "72:8d:f7:bc:7c:58", 
          "powrx": -79, 
          "band": 2.4,
          "timestamp":"2016-06-30T14:10:34Z"
        },
        { 
          "mac": "02:09:4f:80:91:97", 
          "powrx": -75,
          "timestamp":"2016-06-30T14:10:34Z"
        }
      ],
      "position":{
        "type":"gnss",
        "lat":52.501608,
        "lng":13.403481,
        "accuracy":17,
        "alt":68,
        "altaccuracy":95,
        "speed": 5,
        "satellitecount": 8,
        "course": 53,
        "timestamp":"2016-06-30T14:10:32Z"
      }
    },
    {
      "gsm":[
        {
          "mcc":262,
          "mnc":501,
          "lac":29589,
          "cid":19374,
          "timestamp":"2016-06-30T14:15:34Z"
        }
      ],
      "wlan": [
        { 
          "mac": "52:67:51:28:37:a4", 
          "powrx": -87, 
          "band": 5,
          "timestamp":"2016-06-30T14:10:33Z"
        },
        { 
          "mac": "72:8d:f7:bc:7c:60", 
          "powrx": -79, 
          "band": 2.4,
          "timestamp":"2016-06-30T14:10:33Z" 
        }
      ],
      "position":{
        "type":"gnss",
        "lat":52.501608,
        "lng":13.403481,
        "accuracy": 8,
        "alt":15,
        "altaccuracy":102,
        "speed": 2,
        "satellitecount": 8,
        "course": 52,
        "timestamp":"2016-06-30T13:15:34Z"
      }
    }
  ]
}

Response

The response to the request contains the status of the POST request.

{
  "success": {
    "code": 200,
    "message": "OK",
    "description": "Data was received successfully"
  }
}

Related Information