Guides
Guides

How to submit feedback with media attachments

In this tutorial, the user is visiting wego.here.com and notices that a restaurant in Chicago is missing. To prove the existence of that place at the mentioned location, the feedback is to contain an image.

HTTP header fields

Map Feedback API POST requests require the following HTTP header fields: Option 1: APIKEY authentication

Auth-Service-Id: here_app
Auth-Identifier: apikey
Auth-Secret: {YOUR_APIKEY}
Content-Type: application/vnd.here.layerObjectList+json; charset=UTF-8

Option 2: APP_ID / APP_CODE authentication (deprecated)

Auth-Service-Id: here_app
Auth-Identifier: {YOUR_APP_ID}
Auth-Secret: {YOUR_APP_CODE}
Content-Type: application/vnd.here.layerObjectList+json; charset=UTF-8

Request

https://maphub.api.here.com/feedback/

The POST request requires the following for the POST body:

  • Set the body edit mode in Postman to Key-Value Edit.
  • Enter feedback as a Key and {"coordinates":[0,0,0],"type":"Point","properties":{"error": 0}} as its value.
  • Enter myfile (or another label for your file) and click Choose Files to browse for your file.

Response

The response includes the attachment properties.

[
    {
        "layerId": "wikvaya/feedback/main",
        "lastUpdateTS": 1498572240282,
        "coordinates": [
            0,
            0,
            0
        ],
        "guid": "41ff48e8363ff623ec0d35bf3fdb671decc62dd5",
        "id": -302601,
        "type": "Point",
        "createdTS": 1498572240282,
        "nodeId": "feedback",
        "properties": {
            "attachments": [
                {
                    "name": "F08B87B7.PNG",
                    "type": "image/png"
                }
            ],
            "error": 0
        }
    }
]