Location API
Last updated
Last updated
Field Name
Description
Authorization
Generated token id
CollName
Collection which is used to store locations
fieldName
Field is used to store the location of the place.
latlong
latitude longitude usually separated using “;” (For example : -6.31082;106.81402)
d
Distance (closest location search distance)
Method
GET
Media Type
application/json
URL
http://[server]/dolphin/apiv1/graph/location/locationData?collName=[collName]&fieldName=[fieldName]&latlong=[latlong]&d=[d]&start=0&count=2
Header
Authorization : Bearer [generatedToken] collName : [collName] fieldName : [fieldName] latlong : [latitude;longitude] d : [distance] count : [count]
Body
Status
200
Response
{ “status”: “success”, “data”: [ { “id”: “[id]”, “branch_code”: “[branch_code]”, “branch_name”: “[branch_name]”, “branch_address”: “[branch_address]”, “longitude”: [longitude], “latitude”: [latitude], “google_map”: [ [latitude], [longitude]” ] “province_id”: “[province_id]”, “regencycity_id”: “[regencycity_id]”, “isaoallowed”: “1”, “_version_”: 1676781750912548900 }, { “id”: “[id]”, “branch_code”: “[branch_code]”, “branch_name”: “[branch_name]”, “branch_address”: “[branch_address]”, “longitude”: [longitude], “latitude”: [latitude], “google_map”: [ [latitude], [longitude]” ] “province_id”: “[province_id]”, “regencycity_id”: “[regencycity_id]”, “isaoallowed”: “1”, “_version_”: 1676781751104438300 } ], “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 0 }
Method
POST
Media Type
application/json
URL
http://[server]/dolphin/apiv1/graph/location/geocode
Header
Authorization : Bearer [generatedToken]
Body
{ “collname”: “[collName]”, “locationName”: “[locationName]”, “latlong”: “[latitude;longitude]”, “distance”: [distance], “start”: 0, “count”: 2, “sort”: true }
Status
200
Response
{ “status”: “success”, “data”: [ { “id”: “[id]”, “branch_code”: “[branch_code]”, “branch_name”: “[branch_name]”, “branch_address”: “[branch_address]”, “longitude”: [longitude], “latitude”: [latitude], “google_map”: [ [latitude], [longitude]” ] “province_id”: “[province_id]”, “regencycity_id”: “[regencycity_id]”, “isaoallowed”: “1”, “_version_”: 1676781750944006100 }, ], “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 0 }
Method
POST
Media Type
application/json
URL
http://[server]/dolphin/apiv1/graph/location/locationData/add/location
Header
Authorization : Bearer [generatedToken] collName : [collName]
Body
{ “longitude”:[longitude], “latitude”:[latitude], }
Status
200