CMSV6Help Center
/
839 DOCS · 213 VIDEOS中文

platform electronic fence rules api calling method

Author daiweiqiangUpdated 2026-08-12 11:52:08Doc ID 27012,398 words · 10 min readView original ↗

1、 function description

platform electronic fence rules api calling method

2、 operating instructions

2.1 Add, delete, check and modify fence area

2.1.1 Added zone information

Brief description:
Request URL:

http://192.168.1.207:8089/MapMarkerAction_addMark.action

Request method: instance code

POST

// Test instance
var param = {
'color': 'FF0000 ',
'jingDu': 108.332244,
'mapType': 3,
'markerType': 10,
'name': 'Round ',
'radius': 61,
'mark': 'description ',
'share': 0,
'type': 5,
'weiDu': 22.799517
};
$.ajax ({
// Several parameters need attention
type: "POST",// method type
dataType: "json",// expected data type returned by the server
url: "http://192.168.1.207:8089/MapMarkerAction_addMark.action?jsession=f1388c76640c476cbdb2e33f5be04eb5" ,//url
data: {json: JSON.stringify(param)}
success: function (result) {
console.log(result);// Print data returned by the server (for debugging)
if (result.resultCode == 200) {
alert("SUCCESS");
}
},
error : function() {
alert("exception! ");
}
});

Parameters:
Parameter Name Required Type Description
jsession is the string session number
name is the string area tag name
jingDu is the string longitude coordinate (guaranteed to match the number of latitudes, the coordinates are formed in order)
WeiDu is the string latitude coordinate (guaranteed to match the number of latitudes, and the coordinates are formed in sequence)
mapType is the number coordinate map type [1 Google map 3 Baidu map 4 Gaud map 7 Baidu offline 8 Google offline 9 bing map 10 osm tile 11 Google tile]]
markerType is the number area marker type [1; Point 2; Rectangle 3; Polygon 4; Route 10; Circle]]
Radius is the mark radius of number area [mark type is 10; When a circle passes the parameter radius (unit m), otherwise it can pass 0]]
color is the string area fill color (hexadecimal color code)
share is number 0 does not share 1 group share 2 global share
Type is number 2 village 3 factory 4 construction site 5 warehouse 6 dock 7 logistics park 8 toll station 9 tracking point 10 working area 11 inspection area 12 other 13 consumption area 14 dangerous road section
Remark No string Area tag description information

Return Example

{
result:0
markId:1000062
}

Return parameter description (mainly describes the fields used by the platform report list)
Parameter Name Type Description
MarkId number area marker ID
Remarks

For more return error codes, please see the error code description on the home page.

2.1.2 Modify zone information

Brief description:

Revised zone information.

Request URL:

http://192.168.1.207:8089/MapMarkerAction_editMark.action

Request method: instance code

POST

// Test instance
var param = {
id:1000062
'color': '000000 ',
'jingDu': 108.332244,
'mapType': 3,
'markerType': 10,'name': 'Round 2 ','radius': 800,'remark': 'Description', 'share': 0,'type': 5,'weiDu': 22.799517
};
$.ajax ({
// Several parameters need attention
type: "POST",// method type
dataType: "json",// expected data type returned by the server
url: "http://192.168.1.207:8089/MapMarkerAction_editMark.action?jsession=f1388c76640c476cbdb2e33f5be04eb5" ,//url
data: {json: JSON.stringify(param)}
success: function (result) {
console.log(result);// Print data returned by the server (for debugging)
if (result.resultCode == 200) {
alert("SUCCESS");
}
},
error : function() {
alert("exception! ");
}
});

Parameters:
Parameter Name Required Type Description
jsession is the string session number
id is the number area tag id
name is the string area tag name
jingDu is the string longitude coordinate (guaranteed to match the number of latitudes, the coordinates are formed in order)
WeiDu is the string latitude coordinate (guaranteed to match the number of latitudes, and the coordinates are formed in sequence)
mapType is the number coordinate map type [1 Google map 3 Baidu map 4 Gaud map 7 Baidu offline 8 Google offline 9 bing map 10 osm tile 11 Google tile]]
markerType is the number area marker type [1; Point 2; Rectangle 3; Polygon 4; Route 10; Circle]]
Radius is the mark radius of number area [mark type is 10; When a circle passes the parameter radius (unit m), otherwise it can pass 0]]
color is the string area fill color (hexadecimal color code)
share is number 0 does not share 1 group share 2 global share
Type is number 2 village 3 factory 4 construction site 5 warehouse 6 dock 7 logistics park 8 toll station 9 tracking point 10 working area 11 inspection area 12 other 13 consumption area 14 dangerous road section
Remark No string Area tag description information

Return Example

{
result: 0
}

Remarks

For more return error codes, please see the error code description on the home page.

2.1.3 Viewing Area Information

Brief description:

View area information

Request URL:

http://192.168.1.207:8089/MapMarkerAction_findMark.action

Request Method:

POST

// Test instance
$.ajax ({
// Several parameters need attention
type: "POST",// method type
dataType: "json",// expected data type returned by the server
url: "http://192.168.1.207:8089/MapMarkerAction_findMark.action?jsession=f1388c76640c476cbdb2e33f5be04eb5&id=1000062" ,//url
data: {}
success: function (result) {
console.log(result);// Print data returned by the server (for debugging)
if (result.resultCode == 200) {
alert("SUCCESS");
}
},
error : function() {
alert("exception! ");
}
});

Parameters:

Parameter Name Required Type Description
jsession is the string session number
id is the number area tag id

Return Example

{
"result":0
"marker":{"a":null,"m":10,"p":0,"tp":5,"mt":3,"c":1,"s":0,"t":0,"u":- 1,"I":1000062,"n":"circle 82","j":"108.332244","r":800,"w":"22.799517","cl":"000000"}}

Return parameter description (mainly describes the fields used by the platform report list)

Reference: api interface- > area information- > user area information [return instructions]]
Remarks

For more return error codes, please see the error code description on the home page.

2.1.4 Delete zone information

Brief description:

Delete zone information

Request URL:

http://192.168.1.207:8089/MapMarkerAction_deleteMark.action

Request Method:

POST

// Test instance
$.ajax ({
// Several parameters need attention
type: "POST",// method type
dataType: "json",// expected data type returned by the server
url: "http://192.168.1.207:8089/MapMarkerAction_deleteMark.action?jsession=f1388c76640c476cbdb2e33f5be04eb5&id=1000062" ,//url
data: {}
success: function (result) {
console.log(result);// Print data returned by the server (for debugging)
if (result.resultCode == 200) {
alert("SUCCESS");
}
},
error : function() {
alert("exception! ");
}
});

Parameters:

Parameter Name Required Type Description
jsession is the string session number
id is the number area tag id

Return Example

{
"result":0
}

Remarks

For more return error codes, please see the error code description on the home page.

2.2 Add, Delete, Check and Change Platform Rules

2.2.1 Forbidden Rules Forbidden Rules: (Query and Delete Direct Reference api Interface Query Linkage Alarm (type = 2 or type = 3) Delete Linkage Alarm)

(1) New: // 192.168.1.207:8088/http
Parameter description:
jsession=649b7687- 6792- 41a2- b9be- 7806f2a0d3fa
name = 12345 // rule name
type = 2 // Rule type 2 Forbidden rule 3 Forbidden rule
text = text // Alarm voice
param=1000046,,,1,1100000000000000,180,0110000000000000,18281861559|18281861557|tempId,491317311@qq.com,6,1,2
markId = 1000046 // region id (custom region)
alarmType = 0 // Direct transfer to 0
begintime = 12:00:00 // Time Range
endtime = 14:00:00 // Time Range
// Passing parameters only supported by the mainline version
When parentId = 99231 // markId administrative region id, the parent id (ParentID in the map_marker table)
matchAllVehi = 1 // matches all vehicles 0 no 1 yes
repeatReminder = 8 // unit minute (1- 30,0 means not repeated)
globalShare = 1 // Global Share 0 No 1 Yes
notifyVehicleContact = 1 // Whether to notify the vehicle contact person (bit0: SMS notification bit1: voice notification)

param parameter details::::::

1000046,// region id
, // maximum speed (not transmitted directly)
, // minimum speed (not transmitted directly)
, // offset width (not transmitted directly)
1, // whether to take pictures
1100000000000000, // Photo Channel: Channel 1, Channel 2
180,// recording duration (seconds)
0110000000000000,// video channel: channel 2, channel 3
18281861559 | 18281861557 | tempId, // SMS and email (mobile phone number, please use if multiple; separated) | phone notification (mobile phone number, please use if multiple; separated) | phone notification (voice template ID)
491317311@qq.com,// SMS and mail (email address)
6,// IO serial number 0 has no 1- 6 corresponding to 1- 6
1,// IO status 1 on 0 off
2 // lid opening/lifting status 0 none 1 lid opening 2 lifting

(2) Modify http:// 192.168.1.207:8088/

// Parameter transfer is only supported in the mainline version. (For other parameters, see Alarm Linkage of the API. For more information, see New Parameter Description.)
When parentId = 99231 // markId administrative region id, the parent id (ParentID in the map_marker table)
matchAllVehi = 1 // matches all vehicles 0 no 1 yes
repeatReminder = 8 // unit minute (1- 30,0 means not repeated)
globalShare = 1 // Global Share 0 No 1 Yes
notifyVehicleContact = 1 // Whether to notify the vehicle contact person (bit0: SMS notification bit1: voice notification)

2.2.2 Route Offset Rules: (Query and Delete Direct Reference API Interface Query Linkage Alarm (type = 7) Delete Linkage Alarm)

(1) New: // 192.168.1.207:8088/http
Parameter description:
jsession=649b7687- 6792- 41a2- b9be- 7806f2a0d3fa
name = 12345 // rule name
type = 2 // Rule Type 7 Route Offset Rule
text = text // Alarm voice
param=1000041,88,9,50,1,0100000000000000,88,0000000001000000,18281861559|18281861559|id,491317311@qq.com,588
markId = 1000041 // region id (custom region)
alarmType = 0 // Direct transfer to 0
begintime = 12:00:00 // Time Range
endtime = 14:00:00 // Time Range
// Passing parameters only supported by the mainline version
parentId = 99231 // Administrative region is not supported. When markId is an administrative region id, the parent id (ParentID in the map_marker table)
matchAllVehi = 1 // matches all vehicles 0 no 1 yes
repeatReminder = 8 // unit minute (1- 30,0 means not repeated)
globalShare = 1 // Global Share 0 No 1 Yes
notifyVehicleContact = 1 // Whether to notify the vehicle contact person (bit0: SMS notification bit1: voice notification)

param parameter details::::::

1000041,// region id
88, // maximum speed km/h(0 means unlimited)
9, // minimum speed km/h(0 means unlimited)
50, // offset width m (20- 999)
1, // whether to take pictures
1100000000000000, // Photo Channel: Channel 1, Channel 2
88,// Video duration (seconds)
0110000000000000,// video channel: channel 2, channel 3
18281861559 | 18281861557 | tempId, // SMS and email (mobile phone number, please use if multiple; separated) | phone notification (mobile phone number, please use if multiple; separated) | phone notification (voice template ID)
491317311@qq.com,// SMS and mail (email address)
588//overspeed duration unit seconds (0- 600,0 means no judgment)

(2) Modify http:// 192.168.1.207:8088/

// Parameter transfer is only supported in the mainline version. (For other parameters, see Alarm Linkage of the API. For more information, see New Parameter Description.)
When parentId = 99231 // markId administrative region id, the parent id (ParentID in the map_marker table)
matchAllVehi = 1 // matches all vehicles 0 no 1 yes
repeatReminder = 8 // unit minute (1- 30,0 means not repeated)
globalShare = 1 // Global Share 0 No 1 Yes
notifyVehicleContact = 1 // Whether to notify the vehicle contact person (bit0: SMS notification bit1: voice notification)

2.2.3 Key Point Rules: (Query and Delete Direct Reference api Interface Query Linkage Alarm (type = 12) Delete Linkage Alarm)

(1) New: // 192.168.1.207:8088/http
Parameter description:
jsession=649b7687- 6792- 41a2- b9be- 7806f2a0d3fa
name = 12345 // rule name
type = 12 // Rule type 12 Key point rule
text = text // Alarm voice
param=1,1000042,121.201317,28.099647,50,0,1,1000000000000000,88,0000010000000000,18281861559|18281861557|9988,491317311@qq.com
// param=4,1000041,121.199448,28.093720,50,0,1,1000000000000000,88,0000010000000000,18281861559|18281861557|9988,491317311@qq.com

markId = 1000042 // region id (custom region)
alarmType = 0 // Direct transfer to 0
begintime = 12:00:00 // Time Range
endtime = 14:00:00 // Time Range
// Passing parameters only supported by the mainline version
parentId = 99231 // Administrative region is not supported. When markId is an administrative region id, the parent id (ParentID in the map_marker table)
matchAllVehi = 1 // matches all vehicles 0 no 1 yes
repeatReminder = 8 // unit minute (1- 30,0 means not repeated)
globalShare = 1 // Global Share 0 No 1 Yes
notifyVehicleContact = 1 // Whether to notify the vehicle contact person (bit0: SMS notification bit1: voice notification)

param parameter details::::::

1, // key point type 1 key point 4 line
1000042, // key point id or line id
121.201317, // longitude
28.099647, // latitude
50, // m (20- 999)
0, // 1 did not leave 0 did not arrive
1,// whether to take pictures
1000000000000000,// Photo Channel: Channel 1
88,// Video duration (seconds)
0000010000000000,// video channel: channel 5
18281861559 | 18281861557 | 9988,// SMS and mail (mobile phone number, please use if multiple; separated) | phone notification (mobile phone number, please use if multiple; separated) | phone notification (voice template ID)
491317311@qq.com // SMS and mail (email address)

(2) Modify http:// 192.168.1.207:8088/

// Parameter transfer is only supported in the mainline version. (For other parameters, see Alarm Linkage of the API. For more information, see New Parameter Description.)
When parentId = 99231 // markId administrative region id, the parent id (ParentID in the map_marker table)
matchAllVehi = 1 // matches all vehicles 0 no 1 yes
repeatReminder = 8 // unit minute (1- 30,0 means not repeated)
globalShare = 1 // Global Share 0 No 1 Yes
notifyVehicleContact = 1 // Whether to notify the vehicle contact person (bit0: SMS notification bit1: voice notification)

2.2.4 Parking Timeout Rules: (Query and Delete Direct Reference api Interface Query Linkage Alarm (type = 6) Delete Linkage Alarm)

(1) New: // 192.168.1.207:8088/http
Parameter description:
jsession=649b7687- 6792- 41a2- b9be- 7806f2a0d3fa
name = 12345 // rule name
type = 6 // Rule type 6 Parking timeout rule
text = text // Alarm voice
param=60,1,1000000000000000,88,0000000001000000,18281861559|18281861557|778899,491731@qq.com
markId = 1000046 // region id (custom region)
alarmType = 0 // ACC Status 0 All 1 ACC On 2ACC Off
begintime = 12:00:00 // Time Range
endtime = 14:00:00 // Time Range
//Passing parameters only supported by mainline version
When parentId = 99231 // markId administrative region id, the parent id (ParentID in the map_marker table)
matchAllVehi = 1 // matches all vehicles 0 no 1 yes
repeatReminder = 8 // unit minute (1- 30,0 means not repeated)
globalShare = 1 // Global Share 0 No 1 Yes
notifyVehicleContact = 1 // Whether to notify the vehicle contact person (bit0: SMS notification bit1: voice notification)

param parameter details::::::
60, //parking time seconds (60- 9999)
1,// whether to take pictures
1000000000000000,// Photo Channel: Channel 1
88,// Video duration (seconds)
0000000001000000,// video channel
18281861559 | 18281861557 | 778899,// SMS and mail (mobile phone number, please use if multiple; separated) | phone notification (mobile phone number, please use if multiple; separated) | phone notification (voice template ID)
491731@qq.com // SMS and mail (email address)

(2) Modify http:// 192.168.1.207:8088/

// Parameter transfer is only supported in the mainline version. (For other parameters, see Alarm Linkage of the API. For more information, see New Parameter Description.)
When parentId = 99231 // markId administrative region id, the parent id (ParentID in the map_marker table)
matchAllVehi = 1 // matches all vehicles 0 no 1 yes
repeatReminder = 8 // unit minute (1- 30,0 means not repeated)
globalShare = 1 // Global Share 0 No 1 Yes
notifyVehicleContact = 1 // Whether to notify the vehicle contact person (bit0: SMS notification bit1: voice notification)

2.3 Refer to the following documents for the association relationship between 2.3 vehicle and platform rules.

Source help.cmsv7.com
839 documents · 213 videos · docs.alwaycare.com