Regions

The following schemas represent ways to target by location, region, or geofence.

Geofence object

A Geofence object describes a geographical boundary corresponding to a physical location of relevance to the application or application owner. The geofence type can be a polygon, a circle, or provided by a confidential source.

Jump to examples ↓

One of
  • Polygon Geofence object object

    A Geofence subtype describing a polygon.

    OBJECT PROPERTIES
    • points arrayREQUIRED

      An ordered array of Points that correspond to the vertices of the polygon on the globe.

    • type stringREQUIRED

      The key type indicating a polygon geofence subtype.

      Possible values: POLYGON

  • Circle Geofence object object

    A Geofence subtype describing a circle.

    OBJECT PROPERTIES
    • center object<Point object>REQUIRED

      A single Point indicating the center fo the circle.

      A Point object is a simple JSON object corresponding to a point on the globe, consisting of only two keys: latitude and longitude.

    • radius integerREQUIRED

      An integer indicating the size (in meters) of the radius of the circle whose edge is the geofence boundary.

    • type stringREQUIRED

      The key type indicating a circle geofence subtype.

      Possible values: CIRCLE

  • Confidential Geofence object object

    A confidential Geofence subtype.

    OBJECT PROPERTIES
    • id stringREQUIRED

      The source-specific identifier for this geofence.

    • source stringREQUIRED

      The name of the company providing the geofence.

    • type stringREQUIRED

      The key type indicating a confidential geofence subtype.

      Possible values: CONFIDENTIAL

    • version stringREQUIRED

      The version number for the source of this geofence.

Used in:

Examples

Polygon Geofence

{
    "type": "POLYGON",
    "points": [
        {
            "latitude": 1.000,
            "longitude": 90
        },
        {
            "latitude": 2.000,
            "longitude": 90
        },
        {
            "latitude": 3.000,
            "longitude": 0
        }
    ]
}

Circle Geofence

{
    "type": "CIRCLE",
    "center": {
        "latitude": 0,
        "longitude": 0
    },
    "radius": 1000
}

Confidential Geofence

{
    "type": "CONFIDENTIAL",
    "source": "Maponics",
    "version": "1.0.17-BETA",
    "id": "TheLouvreMuseumFloodZoneParis"
}

Point object

A Point object is a simple JSON object corresponding to a point on the globe, consisting of only two keys: latitude and longitude.

Jump to examples ↓

OBJECT PROPERTIES
  • latitude numberREQUIRED

    Decimal with maximum 6 digits of decimal precision in the range [-90,90].

  • longitude numberREQUIRED

    Decimal with maximum 6 digits of decimal precision in the range of [0, 180)

Used in:

Examples

Coordinate point example

{
    "latitude": 45,
    "longitude": 179.999999
}

Region object

A Region object describes a geographical boundary or set of hardware identifiers and associated attributes that correspond to a physical location of relevance to the application or application owner.

Jump to examples ↓

OBJECT PROPERTIES
  • attributes object

    An attribute object is an object containing the customer-provided region attributes associated with a particular region.

  • beacons array[object]

    An array of beacon objects.

  • created_at stringREQUIRED

    The creation date-time for the region.

  • geofence object<Geofence object>

    A Geofence object describes a geographical boundary corresponding to a physical location of relevance to the application or application owner. The geofence type can be a polygon, a circle, or provided by a confidential source.

  • name string

    A human-readable name for the region.

  • region_id stringREQUIRED

    A string containing a UUID that is the canonical identifier for this object, elsewhere referred to as region_id.

  • source_info object

    A Source Info object is a simple JSON object providing the details about the origin of the region data.

    OBJECT PROPERTIES
    • region_id stringREQUIRED

      Internal identifier used by source for this region.

    • source stringREQUIRED

      Name of the company who originated the region data.

    • vendor_href string

      URI indicating the location of the original source of this region data.

  • updated_at stringREQUIRED

    The last updated date-time for the region.

Used in:

Examples

Example polygon-type Geofence imported from Gimbal

{
    "region_id": "abe5deb3-00d0-446e-8c5d-94b6421a01e0",
    "name": "My Favorite Place",
    "created_at": "2020-06-09T12:34:56",
    "updated_at": "2020-06-09T12:34:56",
    "geofence": {
        "type": "POLYGON",
        "points": [
            {
                "latitude": 90.0,
                "longitude": 180.0
            },
            {
                "latitude": 90.0,
                "longitude": 180.0
            },
            {
                "latitude": 0.0,
                "longitude": 0.0
            }
        ]
    },
    "beacons": [
        {
            "name": "entryway",
            "id": "VLSHLAOEXOFCMLDVTKFQ"
        },
        {
            "name": "Exhibit A",
            "id": "ZAQQMNOZKRFCRPYEUCZI"
        }
    ],
    "attributes": {
        "store_name": "REI"
    },
    "source_info": {
        "source": "GIMBAL",
        "region_id": "4BPSFLKJSDFLKJSDFLKJ",
        "vendor_href": "http://api.gimbal.com/2/places/4BPSFLKJSDFLKJSDFLKJ"
    }
}