Location:

Geofence Management

Create Cricle Fence

Service Introduction

You can create a circular fence with this request.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/create_circle_fence

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

See the following table for instructions on creating a circular fence:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

latitude

string

latitude

Yes

longitude

string

longitude

Yes

radius

string

Circular fence radius

Yes

Unit: meter, value range (0,5000]

coord_type

string

Coordinate type

No

gcj02

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

0

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

1

Value range:
0: disabled;
1: able

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

fence_id

string

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Unique identification of the fence

Latest fence name

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

latitude

string

latitude

Yes

longitude

string

longitude

Yes

radius

string

Circular fence radius

Yes

Unit: meter, value range (0,5000]

coord_type

string

Coordinate type

No

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Run


                        

Create Polygon Fence

Service Introduction

You can create a polygonal fence with this request.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/create_polygon_fence

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

See the following table for instructions on creating a polygon fence:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

vertexes

string

Polygon fence shape point

Yes

Rule: longitude in front, latitude in back, separated by ","; ";" is used for each group of longitude and latitude separate; The order of vertices can be arranged clockwise or counterclockwise.
Note: the value range of the number of coordinate points: [3,100], and the external rectangular area is less than 1000 square kilometers.

coord_type

string

Coordinate type

No

gcj02

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

0

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

1

Value range:
0: disabled;
1: able

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

fence_id

string

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Unique identification of the fence

Latest fence name

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

vertexes

string

Polygon fence shape point

Yes

Rule: longitude in front, latitude in back, separated by ","; ";" is used for each group of longitude and latitude separate; The order of vertices can be arranged clockwise or counterclockwise.
Note: the value range of the number of coordinate points: [3,100], and the external rectangular area is less than 1000 square kilometers.

coord_type

string

Coordinate type

No

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Run


                        

Create Polyline Fence

Service Introduction

You can create a linear fence with this request.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/create_polyline_fence

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

See the following table for instructions on creating a polygon fence:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

vertexes

string

polyline fence points

Yes

Rule: longitude in front, latitude in back, separated by ","; ";" is used for each group of longitude and latitude separate; The order of vertices can be arranged clockwise or counterclockwise.
Note: the total length of the line is less than 500km, and the value range of the number of coordinate points is [2,100].

offset

int

Deviation distance, range: [0,200].

Yes

If the deviation exceeds the discount distance, an alarm will be given

coord_type

string

Coordinate type

No

gcj02

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

0

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

1

Value range:
0: disabled;
1: able

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

fence_id

string

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Unique identification of the fence

Latest fence name

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

vertexes

string

polyline fence points

Yes

Rule: longitude in front, latitude in back, separated by ","; ";" is used for each group of longitude and latitude separate; The order of vertices can be arranged clockwise or counterclockwise.
Note: the total length of the line is less than 500km, and the value range of the number of coordinate points is [2,100].

offset

int

Deviation distance, range: [0,200].

Yes

If the deviation from the broken line exceeds this distance, an alarm will be given.

coord_type

string

Coordinate type

No

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Run


                        

Create District Fence

Service Introduction

You can create an administrative fence through this request.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/create_district_fence

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

Please refer to the following table for instructions on creating administrative fence:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

keyword

string

Administrative Region keyword, supporting the name of province, city, district / county.

Yes

Notes:
If the entered administrative region name matches multiple administrative regions, the fence creation will fail
Combined administrative region search is not supported. Example: Beijing / Hunan Province / Yuhua District.

coord_type

string

Coordinate type

No

gcj02

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

0

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

1

Value range:
0: disabled;
1: able

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

fence_id

string

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Unique identification of the fence

Latest fence name

district

string

Structured administrative division description

This field is returned when the fence is created successfully

district_list

array

List of administrative regions returned when keyword matches multiple administrative regions

This field is returned when fence creation fails

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

keyword

string

Administrative Region keyword, supporting the name of province, city, district / county.

Yes

Notes:
If the entered administrative region name matches multiple administrative regions, the fence creation will fail
Combined administrative region search is not supported. Example: Beijing / Hunan Province / Yuhua District.

coord_type

string

Coordinate type

No

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Run


                        

Import Fence

Service Introduction

Through this request, you can batch import circles, polygons, lines and administrative geographic fences in an interface

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/import

Request method

POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

See the following table for instructions on importing Fences:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

coord_type

string

Coordinate type

No

gcj02

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

circle_fences

array

Circular fence parameters

No

null

latitude

string

latitude

Yes

longitude

string

longitude

Yes

radius

string

Circular fence radius

Yes

Unit: meter, value range (0,5000]

fence_name

string

Fence name

No

denoise

int

Fence denoising parameters

No

0

polygon_fences

array

Polygon fence parameters

No

null

vertexes

string

Polygon fence shape point

Yes

Rule: longitude in front, latitude in back, separated by ","; ";" is used for each group of longitude and latitude separate; The order of vertices can be arranged clockwise or counterclockwise.
Note: the value range of the number of coordinate points: [3,100], and the external rectangular area is less than 1000 square kilometers.

fence_name

string

Fence name

No

denoise

int

Fence denoising parameters.

No

0

polyline_fences

array

Linear fence parameters

No

null

offset

int

offset distance

Yes

If the deviation exceeds the discount distance, an alarm will be given

vertexes

string

Linear fence shape point

Yes

Rule: longitude in front, latitude in back, separated by ","; ";" is used for each group of longitude and latitude separate; The order of vertices can be arranged clockwise or counterclockwise.
Note: the total length of the line is less than 500km, and the value range of the number of coordinate points is [2,100].

fence_name

string

Fence name

No

denoise

int

Fence denoising parameters.

No

0

district_fences

array

Administrative fence parameters

No

null

keyword

string

Administrative Region keyword, supporting the name of province, city, district / county.

Yes

Notes:
If the entered administrative region name matches multiple administrative regions, the fence creation will fail
Combined administrative region search is not supported. Example: Beijing / Hunan Province / Yuhua District.

fence_name

string

Fence name

No

denoise

int

Fence denoising parameters.

No

0

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

success_num

int

Number of fences successfully imported

circle_fences

array

Return result of importing circular fence

fence_id

int

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Fence name

Fence name passed in at import

polygon_fences

array

Import polygon fence return results

fence_id

int

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Fence name

Fence name passed in at import

polyline_fences

array

Import polyline fence return results

fence_id

int

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Fence name

Fence name passed in at import

district_fences

array

Return result of importing Administrative Region fence

fence_id

int

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Fence name

Fence name passed in at import

district

string

Structured administrative division description

This field is returned when the fence is created successfully

district_list

array

List of administrative regions returned when keyword matches multiple administrative regions

This field is returned when fence creation fails

Parameter example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

Export Fence

Service Introduction

Through this request, you can batch export the information of circle, polygon, linear and administrative geographic fence in an interface.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/export

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

See the following table for instructions on importing Fences:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

coord_type

string

Coordinate type

No

gcj02

gcj02: GCJ02 Coordinates

fence_type

string

Fence type

No

0

0: all
1: Indicates a circular geographic fence;
2: Represents a polygonal geofence;
3: Indicates linear geofencing;
4: Indicates the geographical fence of the administrative region.

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

coord_type

string

Coordinate type

gcj02: GCJ02 Coordinates

data

object

return results

circle_fences

array

Circular fence parameters

fence_name

string

Fence name

denoise

int

Fence denoising parameters

longitude

string

longitude

latitude

string

latitude

raduis

int

Circular fence radius

polygon_fences

array

Polygon fence parameters

fence_name

string

Fence name

denoise

int

Fence denoising parameters

vertexes

string

Polygon fence shape point

polyline_fences

array

Linear fence parameters

fence_name

string

Fence name

denoise

int

Fence denoising parameters

vertexes

string

polyline fence points

offset

int

offset distance

district_fences

array

Administrative fence parameters

fence_name

string

Fence name

denoise

int

Fence denoising parameters

keyword

string

行政区关键字

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

coord_type

string

Coordinate type

No

fence_type

string

Fence type

No

0: all;
1: Indicates a circular geographic fence;
2: Represents a polygonal geofence;
3: Indicates linear geofencing;
4: Indicates the geographical fence of the administrative region.

Run


                        

Update Cricle Fence

Service Introduction

The circular fence can be updated with this request.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/update_circle_fence

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

See the following table for instructions on updating the circular fence:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence, which specifies the updated fence ID. Not updatable.

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

latitude

string

latitude

No

Note: when updating the coordinates of the center point of the circular fence, the longitude and latitude shall be entered in combination

longitude

string

latitude

No

Note: when updating the coordinates of the center point of the circular fence, the longitude and latitude shall be entered in combination

radius

string

Circular fence radius

No

Unit: meter, value range (0,5000]

coord_type

string

Coordinate type

No

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200].

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

fence_id

int

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Unique identification of the fence

Latest fence name

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence, which specifies the updated fence ID. Not updatable.

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

latitude

string

latitude

No

Note: when updating the coordinates of the center point of the circular fence, the longitude and latitude need to be entered in combination.

longitude

string

latitude

No

Note: when updating the coordinates of the center point of the circular fence, the longitude and latitude need to be entered in combination.

radius

string

Circular fence radius

No

Unit: meter, value range (0,5000]

coord_type

string

Coordinate type

No

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Run


                        

Update Polygon Fence

Service Introduction

You can update the polygon fence with this request.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/update_polygon_fence

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

For instructions on updating polygon fences, see the following table:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence, which specifies the updated fence ID. Not updatable.

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

vertexes

string

Polygon fence shape point

No

Rule: longitude in front, latitude in back, separated by ","; ";" is used for each group of longitude and latitude separate; The order of vertices can be arranged clockwise or counterclockwise.
Note: the value range of the number of coordinate points: [3,100], and the external rectangular area is less than 1000 square kilometers.

coord_type

string

Coordinate type

No

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200].

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

fence_id

int

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Unique identification of the fence

Latest fence name

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence, which specifies the updated fence ID. Not updatable.

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

vertexes

string

Polygon fence shape point

Yes

Rule: longitude in front, latitude in back, separated by ","; ";" is used for each group of longitude and latitude separate; The order of vertices can be arranged clockwise or counterclockwise.
Note: the value range of the number of coordinate points: [3,100], and the external rectangular area is less than 1000 square kilometers.

coord_type

string

Coordinate type

No

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Run


                        

Update Polyline Fence

Service Introduction

You can update the linear fence with this request

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/update_polyline_fence

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

See the following table for instructions on creating a polygon fence:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence, which specifies the updated fence ID. Not updatable.

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

vertexes

string

polyline fence points

No

Rule: longitude in front, latitude in back, separated by ","; ";" is used for each group of longitude and latitude separate; The order of vertices can be arranged clockwise or counterclockwise.
Note: the total length of the line is less than 500km, and the number of coordinate points is within the value range[2,100]。

offset

int

Deviation distance, range: [0,200].

No

If the deviation exceeds the discount distance, an alarm will be given

coord_type

string

Coordinate type

No

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200].

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

fence_id

int

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Unique identification of the fence

Latest fence name

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence, which specifies the updated fence ID. Not updatable.

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

vertexes

string

polyline fence points

No

Rule: longitude in front, latitude in back, separated by ","; ";" is used for each group of longitude and latitude separate; The order of vertices can be arranged clockwise or counterclockwise.
Note: the total length of the line is less than 500km, and the number of coordinate points is within the value range[2,100]

offset

int

Deviation distance, range: [0,200].

No

If the deviation from the broken line exceeds this distance, an alarm will be given.

coord_type

string

Coordinate type

No

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Run


                        

Update District Fence

Service Introduction

You can create an administrative fence through this request.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/update_district_fence

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

Please refer to the following table for the description of updating the administrative area fence:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence, which specifies the updated fence ID. Not updatable.

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

keyword

string

Administrative Region keyword, supporting the name of province, city, district / county.

No

Notes:
If the entered administrative region name matches multiple administrative regions, the fence creation will fail
Combined administrative region search is not supported. Example: Beijing / Hunan Province / Yuhua District.

coord_type

string

Coordinate type

No

gcj02

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200].

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

fence_id

int

Unique identification of the fence

fence id is automatically generated by the system and is incremented by a positive integer

fence_name

string

Unique identification of the fence

Latest fence name

district

string

Structured administrative division description

This field is returned when the fence is created successfully

district_list

array

List of administrative regions returned when keyword matches multiple administrative regions

This field is returned when fence creation fails

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence, which specifies the updated fence ID. Not updatable.

Yes

fence_name

string

Fence name

No

monitored_terminal

string

Fence monitoring object

No

instructions:
1. Private fences, (a terminal can create up to 100 private fences, and the total number of private fences in the service is unlimited) monitor a terminal.
rules:monitored_terminal=HuaweiMate10
2. Public fences (the total number of public fences under a single service cannot exceed 1000), and monitor all terminals under the specified service_id.
rules:monitored_terminal= {allterminal}

keyword

string

Administrative Region keyword, supporting the name of province, city, district / county.

No

Notes:
If the entered administrative region name matches multiple administrative regions, the fence creation will fail
Combined administrative region search is not supported. Example: Beijing / Hunan Province / Yuhua District.

coord_type

string

Coordinate type

No

wgs84: WGS84 Coordinates
gcj02: GCJ02 Coordinates

denoise

int

Unit: meter. The value range is [0,200], and the default value is 0 without denoising.

No

Each track point has a positioning error radius radius. The larger this value is, the more inaccurate the positioning is, which may be noise. During fence calculation, if noise is also involved in the calculation, it will cause false alarm. Setting denoise can be controlled. When the positioning error radius of the track point is greater than the set value, the track point will be regarded as noise and will not participate in the fence calculation.

fence_status

int

Use status of fence.

No

Value range:
0: disabled;
1: able

Run


                        

Delete Fence

Service Introduction

You can delete the fence with this request.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/delete

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

See the following table for instructions on deleting Fences:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_ids

string

Supports batch deletion of fences, and multiple fence IDs are separated by ",". Up to 1000 fences can be deleted at one time. Note: fence_ IDS and monitored_ Terminal passes in at least one of them.

No

monitored_terminal

string

Fence monitoring object

No

1. Fill in monitored only_ Terminal field: delete the fence according to the monitoring object. It is only applicable to delete the fence created by the specified terminal and delete all fences on the terminal
2. Fill in fence only_ IDS field: deleted according to fence ID;
3. Fill in both fields: delete according to the specified fence on the monitoring object

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

fence_ids

array

Fence ID list

Returns the list of fence id successfully deleted

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_ids

string

Supports batch deletion of fences, and multiple fence IDs are separated by ","; Up to 1000 fences can be deleted at one time. Note: fence_ IDS and monitored_ Terminal passes in at least one of them.

No

monitored_terminal

string

Fence monitoring object

No

1. Fill in monitored only_ Terminal field: delete the fence according to the monitoring object. It is only applicable to delete the fence created by the specified terminal and delete all fences on the terminal
2. Fill in fence only_ IDS field: deleted according to fence ID;
3. Fill in both fields: delete according to the specified fence on the monitoring object

Run


                        

Query Fence

Service Introduction

You can query fence information through this request.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/query

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

Please refer to the following table for the description of query fence:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_ids

int

Batch query of fences is supported, and multiple fence IDs are separated by ","; Up to 1000 fences can be deleted at one time. Note: fence_ IDS and monitored_ Terminal passes in at least one of them.

Yes/No

monitored_terminal

string

Fence monitoring object

Yes/No

Fill in monitored only_ Terminal field: query the fence according to the monitoring object. Three query methods are supported:
1) Enter a terminal_ Name queries all fences on the monitoring object;
2) Enter {allterminal} to query and monitor the public fence of all terminals;
3) Enter {part of terminal} to query the public fence of the monitoring part terminal (except {allterminal}).
2. Fill in fence only_ IDS field: query by fence ID, and page_ Size and page_ The index does not take effect
3. Fill in both fields: query according to the specified fence on the monitoring object

coord_type_output

string

Output coordinate type

No

page_index

int

Returns the number of page numbers.

No

1

value range:[1,5000]

page_size

int

Number of paper page.

No

100

value range:[1,1000]。

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

total

int

Total number of query results

size

int

Number of results returned on this page

fences

array

Fence list

fence_id

int

Unique identification of fence

fence_name

string

Fence name

fence_status

int

Use status of fence.

Fence status:
0: disabled;
1: able

monitored_terminal

string

Monitoring object of fence

1. When the fence monitors only one terminal, return to terminal_ name
2. When the fence monitors all terminals under the service, it returns: {allterminal}
3. When the fence monitors part of the terminal under the service, it returns: {part of terminal}

shape

string

Fence shape

Four shapes of fence:
circle:circle
polygon:polygon
polyline:polyline
district:district

longitude

double

longitude

Return when shape = circle

latitude

double

latitude

Return when shape = circle

radius

double

radius

Return when shape = circle,
Unit:meter

vertexes

string

Vertex lists for polygon and linear fences

Returns when shape = polygon or shape = polyline.eg:"40.020664,116.351592;40.02083,116.358779;40.018178,116.35885;40.01757,116.350586"

offset

double

offset

The offset distance is returned only when shape = polyline (if the offset distance exceeds this distance, an alarm will be given),
Unit: meter.

coord_type

string

Coordinate type returned

denoise

int

Fence drying parameters

Unit: meter

district

string

Administrative division description

Returned when shape = district.

create_time

string

Fence creation time

Format time.
eg: 2020-02-20 05:16:39

modify_time

string

Fence modification time

Format time.
eg: 2020-02-20 05:16:39

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_ids

string

Batch query of fences is supported, and multiple fence IDs are separated by ","; Up to 1000 fences can be deleted at one time. Note: fence_ IDS and monitored_ Terminal passes in at least one of them.

Yes/No

monitored_terminal

string

Fence monitoring object

Yes/No

Fill in monitored only_ Terminal field: query the fence according to the monitoring object. Three query methods are supported:
1) Enter a terminal_ Name queries all fences on the monitoring object;
2) Enter {allterminal} to query and monitor the public fence of all terminals;
3) Enter {part of terminal} to query the public fence of the monitoring part terminal (except {allterminal}).
2. Fill in fence only_ IDS field: query by fence ID, and page_ Size and page_ The index does not take effect
3. Fill in both fields: query according to the specified fence on the monitoring object

coord_type_output

string

Output coordinate type

No

gcj02:GCJ02 coordinates

page_index

int

Returns the number of page numbers

No

Value range:[1,5000]

page_size

int

Records per page

No

value range:[1,1000]

Run


                        

Add Terminal

Service Introduction

Through this request, the terminal for fence monitoring can be added

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/add_monitored_terminal

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

See the following table for the description of adding fence monitoring terminal:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence, which specifies the updated fence ID. Not updatable.

Yes

monitored_terminal

string

Fence monitoring object

Yes

It supports adding multiple terminals to the fence at the same time_ Name is separated by "," and;
The maximum number of terminal added each time is 100
eg:monitored_terminal=terminal_name1,terminal_name2,terminal_name3

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence

Yes

monitored_terminal

string

terminal_name

Yes

It supports adding multiple terminals to the fence at the same time_ Name is separated by "," and;
The maximum number of terminal added each time is 100
eg:monitored_terminal=terminal_name1,terminal_name2,terminal_name3

Run


                        

Delete Terminal

Service Introduction

You can delete the monitored terminal through this request.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/delete_monitored_terminal

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

Please refer to the following table for the description of the terminal that can be monitored by deleting the fence:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence

Yes

monitored_terminal

string

Fence monitoring object

Yes

Supports deleting a terminal from the terminal list to the fence.
1. Batch deletion is supported: the maximum number of terminals to be deleted each time is 100, and there are multiple terminals_ Names are separated by "," and ".
eg:monitored_terminal=terminal_name1,terminal_name2,terminal_name3。
2. Delete all monitored objects: {clearterminal}
eg:monitored_terminal={clearterminal}

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence

Yes

monitored_terminal

string

terminal_name

Yes

Supports deleting a terminal from the terminal list to the fence.
1. Batch deletion is supported: the maximum number of terminals to be deleted each time is 100, and there are multiple terminals_ Names are separated by "," and ".
eg:monitored_terminal=terminal_name1,terminal_name2,terminal_name3。
2. Delete all monitored objects: {clearterminal}
eg:monitored_terminal={clearterminal}

Run


                        

Query Terminal

Service Introduction

All terminals monitored by the fence can be queried through this request.

Interface address

https://lbs.navinfo.com/open-api/geofence/v1/fence/query_monitored_terminal

Request method

GET/POST
The post request parameters should be transmitted in x-www-form-urlencoded mode

Request parameters

Please refer to the following table for the description of all terminals for fence monitoring:

Parameter Type Meaning Required Default Remarks

ak

string

Developer Key

Yes

your ak

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence

Yes

page_index

int

Returns the number of page numbers.

No

1

value range:[1,5000]

page_size

int

Number of paper page.

No

100

value range:[1,1000]。

Response data

Return Value Type Meaning Remarks

code

int

return status

message

string

Return status description

data

object

return results

total

int

Total number of query monitoring terminals

size

int

Number of terminal returned on this page

monitored_terminal

array

Terminal list

Service example

Parameter Type Meaning Required Default Remarks

ak

your ak

string

Developer Key

Yes

Click to apply

service_id

int

The service ID returned when creating the service

Yes

fence_id

int

Unique identification of the fence

Yes

page_index

int

Returns the number of page numbers.

No

value range:[1,5000]

page_size

int

Number of paper page.

No

value range:[1,1000]。

Run


                        
TOP