GuidesAPI Reference
Guides

Action on Browse response

The application described in the parent page enables end-users to retrieve five nearby EV charging stations by tapping an icon associated with the place category 700-7600-0322.

Example: Browse Request

When an end-user taps the icon at position (52.5044, 13.33673), the application sends a request similar to:

curl -sD /dev/stderr "https://browse.search.hereapi.com/v1/browse?apiKey=$API_KEY
&at=52.5044,13.33673
&limit=5
&categories=700-7600-0322"
| jq .

The API responds with:

HTTP/1.1 200 OK
X-Correlation-ID: 26ff9c58-37b3-4a08-bc4e-a533a5ce3a15
(...)
{
  "items": [
    {
      "title": "chargecloud",
      "id": "here:pds:place:276u336xmvebu-aGVyZS1ldjpodWJqZWN0OjU5Mzc1ODE1Mg",
      "access": [{ "lat": 52.50286, "lng": 13.3339 }],
      ...
    },
    {
      "title": "E.ON",
      "id": "here:pds:place:276u336xtfpme-aGVyZS1ldjppbm5vZ3k6NTg3NzU5MjY1",
      "access": [{ "lat": 52.50363, "lng": 13.3399 }],
      ...

    },
    {
      "title": "E.ON",
      "id": "here:pds:place:276u336xmwd3s-aGVyZS1ldjppbm5vZ3k6NTkzNzMwNzgx",
      "access": [{ "lat": 52.50143, "lng": 13.33552 }],
      ...
    },
    {
      "title": "Compleo",
      "id": "here:pds:place:276u336xmw7yv-aGVyZS1ldjplY29tb3ZlbWVudDo1OTM3NzE4NTM",
      "access": [{ "lat": 52.50143, "lng": 13.33552 }],
      ...
    },
    {
      "title": "chargecloud",
      "id": "here:pds:place:276u336xqtkzk-aGVyZS1ldjpodWJqZWN0OjU5MDExNzE1MA",
      "access": [{ "lat": 52.50742, "lng": 13.334 }],
      ...
    ]
}

Note that the X-Correlation-ID value is unique for each API response.

Example: User Action on Browse Result

When the end-user selects the second result (E.ON charging station) and initiates navigation on Sat Dec 03 2022 at 07:56 CET, the application performs the following steps:

  1. Collect the necessary attributes from the previous response along with the action:

    fieldvalue
    timestamp1670050588832
    correlationId26ff9c58-37b3-4a08-bc4e-a533a5ce3a15
    resourceIdhere:pds:place:276u336xtfpme-aGVyZS1ldjppbm5vZ3k6NTg3NzU5MjY1
    rank1
    actionhere:gs:action:navigate-to
  2. Send a /signals request similar to:

    curl -sXPOST "https://signals.search.hereapi.com/v1/signals?apiKey=$API_KEY" -d @- << EOF
    version=1
    &timestamp=1670050588832
    &resourceId=here:pds:place:276u336xtfpme-aGVyZS1ldjppbm5vZ3k6NTg3NzU5MjY1
    &correlationId=26ff9c58-37b3-4a08-bc4e-a533a5ce3a15
    &rank=1
    &action=here:gs:action:navigate-to
    EOF

For a general overview of the /browse endpoint, see Browse.

📘

Note

The /signals endpoint is released as RESTRICTED. See the privilege section in the feature maturity topic for more information.