Regions

Regions are polygons with some metadata attached. They are used throughout the system and are required for sending messages, creating segments and viewing statistics. The properties of a region are:

PropertyTypeDescription
idStringThe region ID. This is not required (and will be ignored) on creation. It is used when updating regions.
nameString (required)The name of the region
areaTypeString (required)The type of the region. For example: Bar, Stage, etc.
surfaceIdString (required)The ID of the surface the region is on*
points2-D Array of Numbers (optional as long as latlngs is present)Cartesian coordinates of each point of the polygon. For example: [[0,0],[0,10],[10,10],[0,0]] (the first and last point must be the same). Generally latlngs will be used instead of points. The coordinate system is specified in the surface definition.
latlngs2-D Array of Numbers (optional as long as points is present)Latitude / Longitude coordinates of each point of the polygon. For example: [[51.2,-0.61],[51.3,-0.62],[51.4,-0.63],[51.2, -0.61]] (the first and last point must be the same)

For standard outdoor deployments there is only one surface, WorldSurface. You can get the ID by using:

GET on /v2/surfaces

This will return one item with an ID. For these deployments the coordinate system used for points is World Mercator (EPSG reference 3395)

See API Docs for path and method options.