Location API
Last updated
Last updated
Nama Field
Deskripsi
Authorization
Token ID yang dihasilkan.
CollName
Collection yang digunakan untuk menyimpan lokasi.
fieldName
Field yang digunakan untuk menyimpan lokasi tempat.
latlong
garis lintang dan garis bujur biasanya dipisahkan menggunakan “;” (Misalnya: -6.31082; 106.81402).
d
Jarak (jarak pencarian lokasi terdekat).
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
Response
{ “status”: “success”, “data”: [], “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 0 }