Get Geolocation by ID
The Get Geolocation by ID API uses the geolocation ID as an input parameter and returns the location details.
Use Case
The user would like to get the details of a geoboundary that is associated with an ATM location. The user already retrieved the geolocation IDs in his/her application. Because the geolocation ID uniquely identifies a geolocation in the engagement server, the user can then invoke this API to retrieve the details.
URL
The HTTP URL for Get Geolocation by ID API is:
http://<host>:<port>/api/v1/geolocations/{id}
This API is protected and implements Gateway Filter for Authentication to authenticate access of the API by a user.
NOTE: <id>: Here, id refers to an id that is used to map a geolocation with internal data record.
Method
GET
Input Parameters
The following fields are input parameters:
Input Parameter | Required | Type | Description |
---|---|---|---|
id | Yes | long | The id is used to map a geolocation with an internal data record in the engagement server. |
Output Parameters
The following fields are output parameters:
Sample Response
{ "id" : 1, "name" : "New York", "description" : "New York City Shopping Area", "latitude" : 40.7324, "longitude" : -73.8248, "altitude" : 20.0, "miles" : 50.0, "lastModifiedBy" : "admin", "createdBy" : "admin", "clientAction" : "local notification" "message" : "Sample notification message" "lastModifiedDateStr" : "06/21/2016 06:19:01 PM IST", "createdDateStr" : "06/21/2016 05:21:49 PM IST" "locationTags" : ["Times Square", "Manhattan"], "metadata" : [ { "key" : "nycKey1", "value" : "nycKey2" }] }
Response Status
Code | Description |
---|---|
Status 200 | Array of geolocation details |
Status 400 | Invalid location ID provided or no location found with the ID |
Status 401 | Unauthorized request |
Status 500 | Server failure to process request |