Point Intersection
Contents
Please see the Sites feature in our Places API if you are looking for predefined geofences around warehouses, distribution centers, and many other important trucking facilities in North America.
The Point Intersection API 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.
POST /Geofence/Intersection/Points
Request Element
The Point Intersection operation requires JSON format data in the POST body.
Element | Definition | Required |
---|---|---|
setIds
| An array of geofence set Ids to check the supplied points against. | N |
setNames
| An array of geofence set names to check the supplied points against. | N |
setTags
| An array of geofence set tags to check the supplied points against. | N |
intersectTime
| The 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 |
points
| An 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 Element | Description | Data Type | Value/Example |
---|---|---|---|
Type
| Indicates whether the error is an exception or warning |
Enum | Warning Exception |
Code
| Error code |
Enum | Please refer to Appendix for complete list |
LegacyErrorCode
| The legacy error code with is an integer valued code that would have been returned in PC*Miler Web Services v25 and earlier. |
int | |
Description
| The detailed error description. |
string |