Geo Fencing API를 사용하면 요청 또는 등록한 다각형 형태의 지리적 위치(Geo Fence)와 위치 좌표와의 관계를 분석할 수 있습니다. 위치 좌표가 해당 다각형 위치 경계 내에 있는지 확인합니다.
다각형 위치는 API에 직접 작성하여 요청할 수 있거나 또는 API를 통해 시스템에 업로드하여 필요 시 호출하여 사용할 수 있습니다.
1. Geo Fencing
1.1 Reqeust Parameter
curl --request GET \
--url 'https://data.vessellink.com/v1/geofence?lat=32.5388&long=-143.2332' \
--header 'Accept: application/json'
Parameter | Description | Type |
---|---|---|
| target latitude | (float) ISO 6709, decimal point |
| target longitude | (float) ISO 6709, decimal point |
| The geofencing geometry | (array object) list of lat, lon |
1.2 API Response
{
"meta": {
"code": 200,
"lat": 32.6733,
"long": 33.1743
},
"isEntered": true
}
Field | Description | Unit |
---|---|---|
| Response code | integer |
| target latitude | (float) ISO 6709, decimal point |
| target longitude | (float) ISO 6709, decimal point |
| Whether the specified location has entered the geofence | true or false |
2. Get Fence List
2.1 Request Parameter
curl --request GET \
--url https://api.vessellink.com/vi/geofence/fenceList \
--header 'Accept: application/json'
Parameter | Description | Type |
---|---|---|
N/A |
2.2 API Response
{
"meta": {
"code": 200,
"id": "[email protected]",
"fenceCount": 54
},
"geofences": [{
"id": "lab021-0001",
"timeRegisted": "2021-01-02T01:00:00Z",
"geofenceName": "HRA 1, Korea",
"geofenceGeometry": [
[
33.237083,
28.553278
],
[
34.018333,
27.504556
],
[
35.92529296875,
24.806681353852
]
]
},
{
"id": "lab021-0002",
"timeRegisted": "2021-01-02T01:00:00Z",
"geofenceName": "ECA 2, China",
"geofenceGeometry": [
[
32.714583,
29.448333
],
[
33.237083,
28.553278
],
[
34.018333,
27.504556
],
[
35.92529296875,
24.806681353852
]
]
}
]
}
Field | Description | Unit |
---|---|---|
| Response code | integer |
| Account id | string |
| Number of the fence registered at system | integer |
'geofences | Id of geofence registrated | string |
'geofences | The datetime of geofence registrated | sting |
'geofences | The geofencing name | string |
'geofences | The geofencing geometry | (array object) array of lat, lon |
3. Add Fence
3.1 Request Parameter
Parameter | Description | Type |
---|---|---|
| The geofence name to register | string |
| The geofence geometry to register | (array object) array of lat, lon |
3.2 API Response
{
"meta": {
"code": 200,
"geofenceName": "HRA1, Korea",
"fenceId": "lab021-0013"
},
"result": true,
"registedTime": "2021-01-01T00:00:00Z"
}
Field | Description | Unit |
---|---|---|
| Response code | integer |
| The geofence name registered | string |
| Id of geofence registrated | string |
| The geofence registration result | true or false |
| The datetime of geofence registration | (string) ISO 8601 date |
4. Delete Fence
4.1 Request Parameter
Parameter | Description | Type |
---|---|---|
| Geofence Id to delete | (string) uuid |
4.2 API Response
Field | Description | Unit |
---|---|---|
| Response code | integer |
| The geofence name deleted | string |
| Id of geofence deleted | string |
| Delete result | true of false |
| The date time deleted the fence | (string) ISO 8601 date |