Location API
This API is for searching the closest location to the entered latitude longitude.
Field component explanation:
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) |
Get Location Data object by locationName, latlong, distance, start and count
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 } |
Get Location Data object LocationInfo
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 } |
Add Locations
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 |
Response | { “status”: “success”, “data”: [], “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 0 } |
Last updated