Modify Geolocation by ID
The Modify Geolocation by ID API modifies the details of a geolocation using the provided geolocation ID.
Use Case
Here are some sample scenarios where the Modify Geolocations by ID API can update the location details and customize user experience by taking their location into account.
- While seeking late night cab service, the cab service websites can locate where you are.
- News sites like cnn.com include customized local headlines and weather on their front page.
- Online shopping stores like bigbasket.com inform whether products are in stock at local retailers.
- Real estate sites like 99acres.com presents an average house prices in a particular area.
URL
The HTTP URL for Modify 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.
Method
PUT
Header
The payload's request header includes Content-Type for JSON as application/json
Input Parameters
The following fields are input parameters:
Sample Request
{ "name":"Lexington Ave", "description":"Best Luxury Hotels in New York City", "latitude":15.23, "longitude":15.22, "altitude":20.1, "miles":1.1 "clientAction":"customLogic/localNotification/notifyEngagementServer", "customLogic": "sdasd", "locationTags": ["tag1", "tag2", "tag3"], "metadata": [{ "key": "metaData1", "value": "metaValue1" }, { "key": "metaData2", "value": "metaValue2" }] }
Output Parameters
The following fields are output parameters:
Output Parameter | Type | Description |
---|---|---|
message | string | Message associated with response status code |
id | long | Unique transaction ID |
Sample Response
{ "message" : "Details updated successfully", "id" : "134" }
Response Status
Code | Description |
---|---|
Status 200 | Details updated successfully |
Status 400 | Invalid location ID provided or no location found with the ID Name is required Latitude is required, Longitude is required, Location Miles is required |
Status 401 | Unauthorized request |
Status 500 | Server failure to process request |