Actions Entrypoint
The Actions Entrypoint is used to send tracking actions so that they can be logged.
Providing tracking information is important for the reasons described in Client Tracking, in short, to improve Search and Discovery responses to users. Places (Search) API can track some actions based upon URLs that are requested. When this is not possible, the information must be provided by different means. The actions entrypoint can be used to provide this information.
The Actions Entrypoint is a Places (Search) API Core entrypoint and is deprecated.
Entrypoint URI
/actions
POST Method
The POST method allows a single action or a batch of actions to be uploaded in the post body. The request must have a Content-Type of application/json
, and the post body must match the action-post media type.
https://places.sit.ls.hereapi.com/places/v1/actions
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&pretty
{
"actions": [
{
"resource": "http://places.ls.hereapi.com/places/v1/places/276u33db-5e332e9253f94042a3f086a2c19ea4bb;context=Zmxvdy1pZD1kNTQwYzMzZC1kYmI1LTU2NDQtYmI5Yi1jZDZlZjY4NWY4NmJfMTQwOTMwMTcyMzc2N18wXzUxMjEmcmFuaz0w?apiKey={YOUR_API_KEY}",
"types": [
"urn:nlp-actions:placeselected",
"urn:nlp-actions:viewplaceonmap"
],
"timestamp": "2013-07-12T14:34:10.763+0100"
},
{
"resource": "http://places.ls.hereapi.com/places/v1/places/276u33db-2c192376ea8541419d3e26bc4aa4f7f9;context=Zmxvdy1pZD1kNTQwYzMzZC1kYmI1LTU2NDQtYmI5Yi1jZDZlZjY4NWY4NmJfMTQwOTMwMTcyMzc2N18wXzUxMjEmcmFuaz0x?apiKey={YOUR_API_KEY}",
"types": [
"urn:nlp-actions:placeselected",
"urn:nlp-actions:drivingdirections"
],
"timestamp": "2013-07-12T14:38:10.763+0100"
}
]
}
GET Method
If an application is not able to use the POST method, it can also trigger a GET request. In this case, only a single action can be submitted per request. The request consists of various query parameters—resource, client, timestamp and type. These fields are identical to those described in the action-post media type's Action sub-object.
parameters
parameter field is supported only for the POST method. https://places.sit.ls.hereapi.com/places/v1/actions
?resource=https%3a%2f%2fplaces.cit.api.here.com%2fplaces%2fv1%2fplaces%2f250u09tu-4561b8da952f4fd79c4e1998c3fcf032%3bcontext%3dZmxvdy1pZD04YWYwMDY2MC00MzZmLTU1ZWItYTdhOC1hZDU3YTE4MmMwMjdfMTQwOTA2NjUxOTQwMV8wXzYxMjYmcmFuaz0w%3fapp_id%3d{YOUR_APP_ID}&app_code%3d{YOUR_APP_CODE}
&types=urn:nlp-actions:phonenumberclicked
×tamp=2012-07-01T12%3A13%3A14.123%2B0200
&app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&pretty
Action Type URNs
The following is a list of action type URNs that we suggest to use for some of the actions that we expect to be made with Places (Search) API places. This list is not intended to be exhaustive.
Type | Description |
---|---|
urn:nlp-actions:viewplaceonmap | View place on map. |
urn:nlp-actions:emailclicked | Click on place e-mail. |
urn:nlp-actions:websitelinkclicked | Click on place website URL. |
urn:nlp-actions:phonenumberclicked | Click on place phone number. |
urn:nlp-actions:pinnedtohomescreen | Pin place to home screen. |
urn:nlp-actions:shareplace | Share place to external service. |
urn:nlp-actions:addplacetocollection | Add place to collection/favourites. |
urn:nlp-actions:walkingdirections | Generate walking directions to/via place. |
urn:nlp-actions:drivingdirections | Generate driving directions to/via place. |
urn:nlp-actions:publictransportdirections | Generate public transport directions to/via place. |