Point Intersection

The /Geofence/Intersection/Points POST request returns all of the geofences the given array of points intersects with. You can additionally filter by Geofence SetId, Geofence SetName, Geofence SetTag, or Geofence Name to check if your points intersect with a specific fence or set of fences. For each point supplied, the service will return an array of geofences that the point is inside.

Request

POST https://pcmiler.alk.com/apis/rest/v1.0/Service.svc/Geofence/Intersection/Points

Request Element

The Point Intersection operation requires JSON format data in the POST body.

ElementDefinitionRequired
setIdsAn array of geofence set Ids to check the supplied points against.N
setNamesAn array of geofence set names to check the supplied points against.N
setTagsAn array of geofence set tags to check the supplied points against.N
intersectTimeThe time to use against the startTime and endTime windows of geofences and geofence sets when checking if the geofence is active. If not supplied, the current UTC time is used. The time should be formatted according to the ISO 8601 Standard (YYYY-MM-DDTHH:MM:SSZ)N
pointsAn array of latitude and longitudes.Y

Sample JSON Post Body

[
  {
    setIds: [1, 57, 1013],
    setNames: ["mySet"],
    setTags: ["tag1", "tag2", "tag3"],
    intersectTime: "2016-10-13T16:20:00Z",
    points: [
      [-74.654724, 40.388249],
      [-74.654628, 40.388176],
      [-74.653763, 40.386752],
      [-74.654199, 40.386108],
      [-74.654184, 40.384804],
      [-74.65358, 40.382148],
      [-74.655096, 40.380683],
      [-74.656543, 40.378925],
      [-74.657097, 40.375468],
      [-74.659289, 40.372397],
      [-74.65942, 40.37082],
      [-74.657863, 40.368598],
      [-74.657378, 40.368399],
      [-74.656268, 40.368067],
      [-74.655551, 40.367482]
    ]
  }
];

Response

[
  {
    "results": [
      [
        {
          "fenceId": 23,
          "name": "ALK Office",
          "setId": 3
        }
      ],
      [
        {
          "fenceId": 23,
          "name": "ALK Office",
          "setId": 3
        },
        {
          "fenceId": 3,
          "name": "Princeton",
          "setId": 2
        }
      ]
    ....
    ]
  }
]

Errors

Data ElementDescriptionData TypeValue/Example
TypeIndicates whether the error is an exception or warningEnumWarning Exception
CodeError codeEnumPlease refer to Appendix for complete list
LegacyErrorCodeThe legacy error code with is an integer valued code that would have been returned in PC*MILER Web Services v25 and earlier.int
DescriptionThe detailed error description.string