GuidesAPI Reference
Guides

Get started with HERE Geofencing API v8

This section explains how to quickly get started using the HERE Geofencing API v8.

📘

Note

Geofencing is only available under asset-based licenses. For information on Geofencing licenses, please contact your HERE account executive.

For more detailed information on HERE account setup, app registration, and authentication, see the Identity and Access Management Developer Guide.

Get a HERE account

Obtain access to the HERE platform through your organization administrator's invitation or contact us to get started.

  • If your company has already established a HERE platform organization, contact your organization admin who can invite you to join the organization.
  • If your company hasn’t established a HERE platform organization yet, contact us.

Get an API key

To get an API key, follow these steps:

  1. Sign in to the HERE platform using your HERE account.
  2. Select the Access Manager from the launcher.
  3. Select the Apps tab and click Register new app.
  4. Enter a name for the app.
  5. Click Register. The HERE platform creates a new app with a unique app ID.
  6. On the Credentials tab, select API Keys and then click Create API key to generate a maximum of two API Keys for your application authentication credentials. The API key is created and displayed.

Send a request

View the following example to send a request.

Sample request: Test geocoordinates

This tests whether a set of geocoordinates are within a set of geoshapes available to the HERE Geofencing API v8.

📘

Note

This example uses a HERE API Key to authenticate your request. For the available authentication options, see the Identity and Access Management Developer Guide.

This example assumes you have uploaded the following shape file to the service.

Send the following GET request:

https://geofencing.hereapi.com/v8/geofence?apikey={YOUR_API_KEY}
&layers=ROAD_GEOM_FC1
&in=point:41.93,12.43;r=40000

The response to this request includes the following high level elements:

  • List of geoshapes (called geometries in the response) with the distance between the geocoordinate and the closest border of the geofence (a negative value indicates the position is inside, a positive value outside of the indicated shape).
  • Metadata about the request
{
    "geometries": [
        {
            "attributes": {
                "NAMES": "",
                "TUNNEL": "N",
                "START_OFFSET": "046572",
                "TOPOLOGY_ID": "181901328",
                "ELEVATION": ",,,,,,,,",
                "ZLEVEL": "1,,,,,,,,1",
                "LONG_HAUL": "Y",
                "BRIDGE": "Y",
                "NAME": "A90 / Circonvallazione Settentrionale",
                "END_OFFSET": "054948",
                "LINK_ID": "1046857210"
            },
            "distance": 4014.35,
            "nearestLat": 41.91914,
            "nearestLon": 12.38378,
            "layerId": "ROAD_GEOM_FC1",
            "geometry": "MULTILINESTRING((12.38415 41.91815,12.3841 41.91829,12.38405 41.91845,12.38399 41.91862,12.38392 41.9188,12.38385 41.91897,12.38378 41.91914,12.38371 41.9193,12.38366 41.9194))"
        },
  ]
}

Next steps