GuidesAPI Reference
Guides

How to get weather alerts for a single car location

This section provides an example of a request to get actual weather warnings for single location (car position) and a width (circular area).

📘

Note

Each request is authenticated and requires a valid bearer token to be included in HTTP Authorization header. For more information about obtaining credentials, see the Identity and Access Management Developer Guide.

Request

The code block below demonstrates the complete request.

POST /v3/alerts HTTP/1.1
Host: weather.hereapi.com
Authorization: Bearer eyJhbGceOyJSAMPLEiIsImN0eSISAMPLEt7VTFIllwIM0cKNCjN2WCCTqlwEEmk-t3gx1BpqUFoeBSAMPLEvhj8nl-RBGcyoljY...
Cache-Control: no-cache
Accept: application/json
Content-Type: application/json
{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    11.0653,
                    51.2885
                ]
            },
            "properties": {
                "width": 100000
            }
        }
    ]
}

Response

In case of a successful request the HTTP status code is 200 and the payload of the response contains an all weather alerts that affects the specified area.

Sample response on the map can looks like this:

Weather alerts for car location with circle diameter 15 km

The circular area and all alerts that intersects this area are displayed.