[OPTIONAL] Custom Geo-Fence - Polygon

Adding a Geo-Fence Polygon

Fixed Location users now have the ability to send in a Fixed Location polygon to use as the geofence for their Fixed Locations. Similar to the radius, users will send these in on a location by location basis to override the organization geofence preference and use the polygon as the arrival polygon on locations. To create Fixed Locations with polygon geo-fence information, simply add the optional parameters below:

Parameter

Type

Description

GeofencePolygon

GeoJSON

Number of feet for the geofence radius.

• For custom polygons, users of the API will need to follow the GeoJSON standard which can be found at: https://tools.ietf.org/html/rfc7946 when utilizing this part of the API.

allowGeofenceRewind

Boolean

While the GeoJSON standard does follow the right-hand rule, we know that there are cases where certain software does not accommodate for the drawing of polygons without this rule. For those cases, users can utilize the geofenceRewind object.

Here is an example of a completely valid FixedLocation JSON Object with a custom geo-fence polygon:

{
  "FixedLocationName": "Location with FL Polygon",
  "FixedLocationCode" : "POLYGONGOEFENCE",
  "fixedLocationPoint": {
        "latitude": 40.020955497988496,
        "longitude": -105.24081587791443
    },
  "FixedLocationType":"1",
  "allowGeofenceRewind": false,
  "GeofencePolygon": {
       "type": "Feature",
       "properties": {},
        "geometry": {
           "coordinates": [
           	[
          [-105.2402526140213,
              40.02102122789605
            ],
            [
              -105.24127185344696,
              40.02127182258774
            ],
            [
              -105.24158835411072,
              40.020540576485615
            ],
            [
              -105.24045646190642,
              40.0203844667521
            ],
            [
              -105.2402526140213,
              40.02102122789605]
          ]
        ],
           "type": "Polygon"
       }
}
}

Success Response:

{
    "fixedLocationType": "Generic",
    "fixedLocationName": "Location with FL Polygon",
    "streetAddressLine1": null,
    "streetAddressLine2": null,
    "cityName": null,
    "stateCode": null,
    "postalCode": null,
    "countryCode": null,
    "fixedLocationPoint": {
        "latitude": 40.020955497988496,
        "longitude": -105.24081587791443
    },
    "fixedLocationCode": "POLYGONGOEFENCE",
    "organizationReferenceCode": "112222",
    "overrideDeliveryStatusFlag": false,
    "geofenceRadiusInFeet": null,
    "earlyShipmentStatusMinutes": null,
    "onTimeShipmentStatusMinutes": null,
    "inJeopardyShipmentStatusMinutes": null,
    "lateShipmentStatusMinutes": null,
    "hasEarlyStatusDefined": false,
    "hasInJeopardyStatusDefined": false,
    "dwellTimeMinutes": null,
    "isActiveFlag": false,
    "lastUpdatedDate": "2018-08-12T18:53:28.2568615+00:00",
    "geofencePolygon": {
        "type": "Feature",
        "geometry": {
            "type": "Polygon",
            "coordinates": [
                [
                    [
                        -105.24025,
                        40.02102
                    ],
                    [
                        -105.24127,
                        40.02127
                    ],
                    [
                        -105.24159,
                        40.02054
                    ],
                    [
                        -105.24046,
                        40.02038
                    ],
                    [
                        -105.24025,
                        40.02102
                    ]
                ]
            ]
        },
        "properties": null
    },
    "allowGeofenceRewind": false
}