POST api/Geofence/GeofenceList

Get geofence list of a specific device

Request Information

Body Parameters

parameter

GeofenceListModel
NameDescriptionTypeAdditional information
DeviceId

device id

integer

None.

MapType

map style

string

None.

FenceId

fence Id

integer

None.

Token

Get it after logging in Token

string

None.

Language

Language Option

string

None.

AppId

APP Application Identifier

string

None.

Request Formats

application/json, text/json

Sample:
{
  "DeviceId": 1,
  "MapType": "sample string 2",
  "FenceId": 3,
  "Token": "sample string 4",
  "Language": "sample string 5",
  "AppId": "sample string 6"
}

application/xml, text/xml

Sample:
<GeofenceListModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 6</AppId>
  <Language>sample string 5</Language>
  <Token>sample string 4</Token>
  <DeviceId>1</DeviceId>
  <FenceId>3</FenceId>
  <MapType>sample string 2</MapType>
</GeofenceListModel>

Response Information

Resource Description

geofence list
State code:
0. Success
100. no data
1100. device not exist

GeofenceListResult
NameDescriptionTypeAdditional information
Items

Fence information collection

Collection of FenceInfo

None.

State

status code

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Items": [
    {
      "FenceId": 1,
      "DeviceId": 2,
      "FenceName": "sample string 3",
      "Latitude": 4.0,
      "Longitude": 5.0,
      "Radius": 6.0,
      "FenceType": 7,
      "AlarmType": 8,
      "IsDeviceFence": true,
      "AlarmModel": 10,
      "DeviceFenceNo": 11,
      "Description": "sample string 12",
      "IMEIList": [
        "sample string 1",
        "sample string 2"
      ],
      "Points": [
        {
          "Lat": 1.0,
          "Lng": 2.0,
          "SortOrder": 3
        },
        {
          "Lat": 1.0,
          "Lng": 2.0,
          "SortOrder": 3
        }
      ],
      "Address": "sample string 13",
      "InUse": true,
      "StartTime": "sample string 15",
      "EndTime": "sample string 16"
    },
    {
      "FenceId": 1,
      "DeviceId": 2,
      "FenceName": "sample string 3",
      "Latitude": 4.0,
      "Longitude": 5.0,
      "Radius": 6.0,
      "FenceType": 7,
      "AlarmType": 8,
      "IsDeviceFence": true,
      "AlarmModel": 10,
      "DeviceFenceNo": 11,
      "Description": "sample string 12",
      "IMEIList": [
        "sample string 1",
        "sample string 2"
      ],
      "Points": [
        {
          "Lat": 1.0,
          "Lng": 2.0,
          "SortOrder": 3
        },
        {
          "Lat": 1.0,
          "Lng": 2.0,
          "SortOrder": 3
        }
      ],
      "Address": "sample string 13",
      "InUse": true,
      "StartTime": "sample string 15",
      "EndTime": "sample string 16"
    }
  ],
  "State": 1
}

application/xml, text/xml

Sample:
<GeofenceListResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>1</State>
  <Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ViewModel">
    <d2p1:FenceInfo>
      <d2p1:Address>sample string 13</d2p1:Address>
      <d2p1:AlarmModel>10</d2p1:AlarmModel>
      <d2p1:AlarmType>8</d2p1:AlarmType>
      <d2p1:Description>sample string 12</d2p1:Description>
      <d2p1:DeviceFenceNo>11</d2p1:DeviceFenceNo>
      <d2p1:DeviceId>2</d2p1:DeviceId>
      <d2p1:EndTime>sample string 16</d2p1:EndTime>
      <d2p1:FenceId>1</d2p1:FenceId>
      <d2p1:FenceName>sample string 3</d2p1:FenceName>
      <d2p1:FenceType>7</d2p1:FenceType>
      <d2p1:IMEIList xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:IMEIList>
      <d2p1:InUse>true</d2p1:InUse>
      <d2p1:IsDeviceFence>true</d2p1:IsDeviceFence>
      <d2p1:Latitude>4</d2p1:Latitude>
      <d2p1:Longitude>5</d2p1:Longitude>
      <d2p1:Points>
        <d2p1:Point>
          <d2p1:Lat>1</d2p1:Lat>
          <d2p1:Lng>2</d2p1:Lng>
          <d2p1:SortOrder>3</d2p1:SortOrder>
        </d2p1:Point>
        <d2p1:Point>
          <d2p1:Lat>1</d2p1:Lat>
          <d2p1:Lng>2</d2p1:Lng>
          <d2p1:SortOrder>3</d2p1:SortOrder>
        </d2p1:Point>
      </d2p1:Points>
      <d2p1:Radius>6</d2p1:Radius>
      <d2p1:StartTime>sample string 15</d2p1:StartTime>
    </d2p1:FenceInfo>
    <d2p1:FenceInfo>
      <d2p1:Address>sample string 13</d2p1:Address>
      <d2p1:AlarmModel>10</d2p1:AlarmModel>
      <d2p1:AlarmType>8</d2p1:AlarmType>
      <d2p1:Description>sample string 12</d2p1:Description>
      <d2p1:DeviceFenceNo>11</d2p1:DeviceFenceNo>
      <d2p1:DeviceId>2</d2p1:DeviceId>
      <d2p1:EndTime>sample string 16</d2p1:EndTime>
      <d2p1:FenceId>1</d2p1:FenceId>
      <d2p1:FenceName>sample string 3</d2p1:FenceName>
      <d2p1:FenceType>7</d2p1:FenceType>
      <d2p1:IMEIList xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:IMEIList>
      <d2p1:InUse>true</d2p1:InUse>
      <d2p1:IsDeviceFence>true</d2p1:IsDeviceFence>
      <d2p1:Latitude>4</d2p1:Latitude>
      <d2p1:Longitude>5</d2p1:Longitude>
      <d2p1:Points>
        <d2p1:Point>
          <d2p1:Lat>1</d2p1:Lat>
          <d2p1:Lng>2</d2p1:Lng>
          <d2p1:SortOrder>3</d2p1:SortOrder>
        </d2p1:Point>
        <d2p1:Point>
          <d2p1:Lat>1</d2p1:Lat>
          <d2p1:Lng>2</d2p1:Lng>
          <d2p1:SortOrder>3</d2p1:SortOrder>
        </d2p1:Point>
      </d2p1:Points>
      <d2p1:Radius>6</d2p1:Radius>
      <d2p1:StartTime>sample string 15</d2p1:StartTime>
    </d2p1:FenceInfo>
  </Items>
</GeofenceListResult>