ZONES

Use the Zones API to:

  • Get a list of all zones and buffers
  • Get zones and buffers history
  • Get a single zone or buffer
  • Create a new zone or buffer
  • Edit a zone or buffer
  • Delete a zone or buffer
  • Get a list of zone types
  • Create a multi-tiered buffer
  • Delete a multi-tiered buffer

Note: The following terminology has changed:

Current Term Former Term Definition
Buffer Dynamic zone or circle zone A circular geofence with a defined radius. It is connected to a specific trackable and moves with it.
Multi-tiered buffer Multi-tiered zone A buffer that has escalating levels of severity defined by the distance from the connected trackable.

HTTP Headers

The HTTP headers used to access all RTLS APIs are listed below. Before submitting requests to the Zones API, set the following headers:

Header Name Example Value Description
X-User-Email admin@example.com Email of the user performing HTTP requests to the API.
X-User-Token Drv3yU7PdyqUMtr89erZ Token allowing user access to the API.
X-User-Project OfOgUA4kTs2HrmYYlFw6Jg Project identifier. Value of the project.uid field.
Set header X-USER-EMAIL

Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the email address returned in the response, set: X-USER-EMAIL = data.email

Set header X-USER-TOKEN

Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the authentication token returned in the response, set: X-USER-TOKEN = data.token

Set header X-USER-PROJECT

Send a request to get projects using GET api/projects/ described in the Projects API. You must send this request with headers X-USER-EMAIL and X-USER-TOKEN already set. Using the project UID returned in the response, set: X-USER-PROJECT = projects[i].uid

Zones Endpoints

Functionality Method Endpoint
get all zones and buffers GET api/zones
get zones and buffers history GET api/zones/?include_removed=true&sublocation_uid=<uid>&from=<ts>&to=<ts>
get single zone or buffer GET api/zones/{uid}
create zone POST api/zones
create buffer POST api/zones
edit zone or buffer PUT api/zones/{uid}
delete zone or buffer DELETE api/zones/{uid}
get zone types GET api/zonetypes
create multi tiered buffer POST api/multi_tiered_zone
delete multi tiered buffer DELETE api/multi_tiered_zone/{uid}

Endpoints

Get all zones and buffers

GET api/zones

Get all existing zones in your project.

Response Fields

Field Description
zones[].sublocation_id The identifier of the area in the context of the project. To retrieve the sublocation_id, use GET api/sublocations described in Sublocations API. If you enter null, the response returns the area's ID associated with the area UID entered.
zones[].zone_type_id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
zones[].depth Reserved field.
zones[].name The name of the zone or buffer.
zones[].created_at The time stamp of when the zone was created, in UTC.
zones[].updated_at The time stamp of when the zone was last updated, in UTC.
zones[].active Lists whether the zone is active. Inactive safety zones do not generate alarms.
  • true
  • false
zones[].apply_to Reserved field.
zones[].default_allowed A field that defines trackable behavior when interacting with zones.
  • For keep-out zones
    • true—All nodes are allowed in this zone unless they are on the special case list.
    • false—No nodes are allowed in this zone unless they are on the special case list.
  • For keep-in zones:
    • true—All nodes must stay out of this zone unless they are on the special case list.
    • false—All nodes must keep in this zone unless they are on the special case list.
zones[].priority Reserved field.
zones[].zone_alarm_level Indicates the level of the zone violation alarm.
  • Zones that generate alarms have alarm levels 1-4.
  • Information zones have alarm level 0.
zones[].uid Unique id of zone.
zones[].sublocation_uid The unique identifier of the area from which you want to pull information. To retrieve an area UID, use GET api/sublocations described in Sublocations API.
zones[].zone_type_name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zones[].zone_geometry A JSON object with information about the zone size and shape. You can have 3-12 objects in this array.
zones[].zone_geometry.positions A JSON array including the x and y coordinates of a polygon zone's vertices, in millimeters. Note:The vertex coordinates must be listed in the order so that they trace the boundaries of the geofence.
zones[].zone_geometry.positions.x The x coordinate of the vertex, in millimeters.
zones[].zone_geometry.positions.y The y coordinate of the vertex, in millimeters.
zones[].zone_geometry.positions.z The z coordinate of the vertex, in millimeters.
zones[].zone_geometry.radius The radius, in millimeters, that the buffer extends from the trackable around which it is centered. Used when the geofence is a buffer.
zones[].dynamic Whether the geofence can move.
  • For zones false.
  • For buffers true.
zones[].shape The shape of the geofence.
  • For zones, returns polygon.
  • For buffers, returns circle.
zones[].trackable_object_uid If the geofence is a buffer, the unique identifier of the trackable around which the buffer is centered. If the geofence is a zone, returns null. The buffer does not function if no trackable is specified. To retrieve a trackable UID, see GET api/trackable_objects described in Trackable Objects API.
zones[].removed_at The time stamp of when the zone or buffer was removed, in UTC.
zones[].project_uid The unique identifier of the project.
zones[].location_uid The unique identifier of the site.
zones[].user_params Zone prototype options that is required for zones 'stop_no_alert', 'slow_zone', 'custom_zone', 'mute_zone'
zones[].user_params.coupled Zone id of boundary zone. Used for zone type boundary_in and boundary_out, see get zone types.
zones[].zone_type There are three types of zones:
  • keep_in — 'Keep_in' zones are typically used for security.
    • For keep-in zones with default_allowed=false, an alarm is generated if the trackable exits the zone.
    • For keep-in zones, with default_allowed=true, an alarm is generated if the trackable enters the zone.
  • keep_out — 'Keep_out' zones are typically used for safety.
    • For keep_out zones with default_allowed=false, an alarm is generated if the trackable enters the zone.
    • For keep_out zones with default_allowed=true, an alarm is generated if the trackable exits the zone.
  • information — An information zone does not trigger alarms. It is used for data analytics.
zones[].zone_type.id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
zones[].zone_type.display_name Reserved field.
zones[].zone_type.name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zones[].zone_points_attributes A JSON array with information including the x, y and z coordinates about the vertices for a polygon zone. You can have 3-12 objects in this array Note:Deprecated and will be removed in 2021Q1. Use zone_geometry instead
zones[].zone_points_attributes.id The identifier for the vertex.
zones[].zone_points_attributes.position_x The x coordinate of the vertex, in millimeters.
zones[].zone_points_attributes.position_y The y coordinate of the vertex, in millimeters.
zones[].zone_points_attributes.position_z The z coordinate of the vertex, in millimeters.
zones[].zone_points_attributes.zone_id The identifier for the zone that includes this vertex.
zones[].zone_exceptions The trackable UID of 'special case' trackables that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zones[].zone_exceptions_groups The group UID of 'special case' groups that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zones[].zone_mode Set zone active state,
  • when zone_mode=ALWAYS_ACTIVE active=true
  • when zone_mode=DEACTIVATED active=false
  • when zone_mode=ON_SCHEDULE depends on schedule and current time
zones[].zone_id Unique per project zone identifier.
zones[].crc16 Reserved field.
zones[].schedule.start_time Cron string in format ' *' when zone will activated on zone_mode = ON_SCHEDULE
zones[].schedule.stop_time Cron string in format ' *' when zone will deactivated on zone_mode = ON_SCHEDULE
zones[].custom_info Information entered in the custom_info field of the request will display in this field.
zones[].trackables_in_zone Array of trackables that are currently in the zone.
zones[].trackables_in_zone.uid The unique id of the trackable.
zones[].trackables_in_zone.entered The information about trackables that are currently inside the zone.
zones[].trackables_in_zone.entered.time The time when trackable entered zone.
zones[].trackables_in_zone.entered.x The X coordinate of where the trackable entered the zone.
zones[].trackables_in_zone.entered.y The Y coordinate of where the trackable entered the zone.
zones[].trackables_in_zone.entered.z The Z coordinate of where the trackable entered the zone.

Example Response

{
    "zones": [
        {
            "sublocation_id": 31,
            "zone_type_id": 2,
            "zone_id": 15,
            "depth": null,
            "name": "Buffer1",
            "created_at": "2017-06-01T10:54:08.000Z",
            "updated_at": "2017-06-14T14:33:16.000Z",
            "active": true,
            "default_allowed": false,
            "priority": 0,
            "zone_alarm_level": 4,
            "uid": "b01MefooQqeIW81yMiQdtg",
            "sublocation_uid": "BAZWM3ExQpKWp_xBp8JSLw",
            "zone_type_name": "keep_out",
            "zone_geometry": {
                "radius": 5000
            },
            "dynamic": true,
            "shape": "circle",
            "trackable_object_uid": "c0000c0c0c000023umuY0A",
            "removed_at": "9999-12-31T23:59:59.000Z",
            "project_uid": "_2E2DIF5SAemIHbnIhLbGg",
            "location_uid": "tDhSspTDS66zxN1XumuY0A",
            "custom_info": "text",
            "zone_type": {
                "id": 2,
                "display_name": "Keep Out",
                "name": "keep_out"
            },
            "zone_exceptions": [],
            "zone_exceptions_groups": [],
            "zone_mode": "ON_SCHEDULE",
            "user_params": {},
            "schedule": {
                "start_time": "00 01 * * *",
                "stop_time": "00 02 * * *"
            },
            "trackables_in_zone": []
        },
        {
            "sublocation_id": 39,
            "zone_type_id": 2,
            "zone_id": 16,
            "depth": null,
            "name": "Zone2",
            "created_at": "2018-03-04T14:46:47.000Z",
            "updated_at": "2018-05-29T15:01:11.000Z",
            "active": false,
            "default_allowed": false,
            "priority": 0,
            "zone_alarm_level": 3,
            "uid": "Y6xQtUTKQ7CFe6blP7Z9YA",
            "sublocation_uid": "ZOex1jl71GfjKCnQ3QIpnV",
            "zone_type_name": "keep_out",
            "zone_geometry": {
                "positions": [
                    {
                        "x": -8991,
                        "y": -4016
                    },
                    {
                        "x": -8998,
                        "y": -1968
                    },
                    {
                        "x": -5830,
                        "y": -1963
                    },
                    {
                        "x": -5801,
                        "y": -4006
                    }
                ]
            },
            "dynamic": false,
            "shape": "polygon",
            "trackable_object_uid": null,
            "removed_at": "9999-12-31T23:59:59.000Z",
            "project_uid": "_2E2DIF5SAemIHbnIhLbGg",
            "location_uid": "4aEXSAN7PCSWRnbPEclEUu",
            "zone_type": {
                "id": 2,
                "display_name": "Keep Out",
                "name": "keep_out"
            },
            "zone_points_attributes": [
                {
                    "id": 2534,
                    "position_x": -8991,
                    "position_y": -4016,
                    "position_z": null,
                    "zone_id": 569
                },
                {
                    "id": 2535,
                    "position_x": -8998,
                    "position_y": -1968,
                    "position_z": null,
                    "zone_id": 569
                },
                {
                    "id": 2536,
                    "position_x": -5830,
                    "position_y": -1963,
                    "position_z": null,
                    "zone_id": 569
                },
                {
                    "id": 2537,
                    "position_x": -5801,
                    "position_y": -4006,
                    "position_z": null,
                    "zone_id": 569
                }
            ],
            "zone_exceptions": [],
            "zone_exceptions_groups": [],
            "zone_mode": "ALWAYS_ACTIVE", 
            "schedule": {
                "start_time": "00 01 * * *",
                "stop_time": "00 02 * * *"
            },
            "trackables_in_zone": []
        }
    ]
}

Get zones and buffers history

GET api/zones/?include_removed=true&sublocation_uid=<uid>&from=<ts>&to=<ts>

Get all zones existed in specified sublocation and period.

Request Fields

Field Required/Optional Type Description
include_removed required boolean The flag identifies if the information about the zones that have been removed should be included in the request.
sublocation_uid optional string The unique identifier of the area from which you want to pull information. To retrieve an area UID, use GET api/sublocations described in Sublocations API.
from required number The time stamp of the beginning of the time frame on which to be reported, in milliseconds.
to required number The time stamp of the end of the time frame on which to be reported, in milliseconds.

Response Fields

Field Description
zones[].sublocation_id The identifier of the area in the context of the project. To retrieve the sublocation_id, use GET api/sublocations described in Sublocations API. If you enter null, the response returns the area's ID associated with the area UID entered.
zones[].zone_type_id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
zones[].depth Reserved field.
zones[].name The name of the zone or buffer.
zones[].created_at The time stamp of when the zone was created, in UTC.
zones[].updated_at The time stamp of when the zone was last updated, in UTC.
zones[].active Lists whether the zone is active. Inactive safety zones do not generate alarms.
  • true
  • false
zones[].apply_to Reserved field.
zones[].default_allowed A field that defines trackable behavior when interacting with zones.
  • For keep-out zones
    • true—All nodes are allowed in this zone unless they are on the special case list.
    • false—No nodes are allowed in this zone unless they are on the special case list.
  • For keep-in zones:
    • true—All nodes must stay out of this zone unless they are on the special case list.
    • false—All nodes must keep in this zone unless they are on the special case list.
zones[].priority Reserved field.
zones[].zone_alarm_level Indicates the level of the zone violation alarm.
  • Zones that generate alarms have alarm levels 1-4.
  • Information zones have alarm level 0.
zones[].uid Unique id of zone.
zones[].sublocation_uid The unique identifier of the area from which you want to pull information. To retrieve an area UID, use GET api/sublocations described in Sublocations API.
zones[].zone_type_name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zones[].zone_geometry A JSON object with information about the zone size and shape. You can have 3-12 objects in this array.
zones[].zone_geometry.positions A JSON array including the x and y coordinates of a polygon zone's vertices, in millimeters. Note:The vertex coordinates must be listed in the order so that they trace the boundaries of the geofence.
zones[].zone_geometry.positions.x The x coordinate of the vertex, in millimeters.
zones[].zone_geometry.positions.y The y coordinate of the vertex, in millimeters.
zones[].zone_geometry.positions.z The z coordinate of the vertex, in millimeters.
zones[].zone_geometry.radius The radius, in millimeters, that the buffer extends from the trackable around which it is centered. Used when the geofence is a buffer.
zones[].dynamic Whether the geofence can move.
  • For zones false.
  • For buffers true.
zones[].shape The shape of the geofence.
  • For zones, returns polygon.
  • For buffers, returns circle.
zones[].trackable_object_uid If the geofence is a buffer, the unique identifier of the trackable around which the buffer is centered. If the geofence is a zone, returns null. The buffer does not function if no trackable is specified. To retrieve a trackable UID, see GET api/trackable_objects described in Trackable Objects API.
zones[].removed_at The time stamp of when the zone or buffer was removed, in UTC.
zones[].project_uid The unique identifier of the project.
zones[].location_uid The unique identifier of the site.
zones[].user_params Zone prototype options that is required for zones 'stop_no_alert', 'slow_zone', 'custom_zone', 'mute_zone'
zones[].user_params.coupled Zone id of boundary zone. Used for zone type boundary_in and boundary_out, see get zone types.
zones[].zone_type There are three types of zones:
  • keep_in — 'Keep_in' zones are typically used for security.
    • For keep-in zones with default_allowed=false, an alarm is generated if the trackable exits the zone.
    • For keep-in zones, with default_allowed=true, an alarm is generated if the trackable enters the zone.
  • keep_out — 'Keep_out' zones are typically used for safety.
    • For keep_out zones with default_allowed=false, an alarm is generated if the trackable enters the zone.
    • For keep_out zones with default_allowed=true, an alarm is generated if the trackable exits the zone.
  • information — An information zone does not trigger alarms. It is used for data analytics.
zones[].zone_type.id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
zones[].zone_type.display_name Reserved field.
zones[].zone_type.name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zones[].zone_points_attributes A JSON array with information including the x, y and z coordinates about the vertices for a polygon zone. You can have 3-12 objects in this array Note:Deprecated and will be removed in 2021Q1. Use zone_geometry instead
zones[].zone_points_attributes.id The identifier for the vertex.
zones[].zone_points_attributes.position_x The x coordinate of the vertex, in millimeters.
zones[].zone_points_attributes.position_y The y coordinate of the vertex, in millimeters.
zones[].zone_points_attributes.position_z The z coordinate of the vertex, in millimeters.
zones[].zone_points_attributes.zone_id The identifier for the zone that includes this vertex.
zones[].zone_exceptions The trackable UID of 'special case' trackables that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zones[].zone_exceptions_groups The group UID of 'special case' groups that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zones[].zone_mode Set zone active state,
  • when zone_mode=ALWAYS_ACTIVE active=true
  • when zone_mode=DEACTIVATED active=false
  • when zone_mode=ON_SCHEDULE depends on schedule and current time
zones[].zone_id Unique per project zone identifier.
zones[].crc16 Reserved field.
zones[].schedule.start_time Cron string in format ' *' when zone will activated on zone_mode = ON_SCHEDULE
zones[].schedule.stop_time Cron string in format ' *' when zone will deactivated on zone_mode = ON_SCHEDULE
zones[].custom_info Information entered in the custom_info field of the request will display in this field.
zones[].trackables_in_zone Array of trackables that are currently in the zone.
zones[].trackables_in_zone.uid The unique id of the trackable.
zones[].trackables_in_zone.entered The information about trackables that are currently inside the zone.
zones[].trackables_in_zone.entered.time The time when trackable entered zone.
zones[].trackables_in_zone.entered.x The X coordinate of where the trackable entered the zone.
zones[].trackables_in_zone.entered.y The Y coordinate of where the trackable entered the zone.
zones[].trackables_in_zone.entered.z The Z coordinate of where the trackable entered the zone.

Get single zone or buffer

GET api/zones/{uid}

Get a single zone with a specified zone UID. To retrieve a zone UID, see get all zones and buffers.

Response Fields

Field Description
zones[].sublocation_id The identifier of the area in the context of the project. To retrieve the sublocation_id, use GET api/sublocations described in Sublocations API. If you enter null, the response returns the area's ID associated with the area UID entered.
zones[].zone_type_id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
zones[].depth Reserved field.
zones[].name The name of the zone or buffer.
zones[].created_at The time stamp of when the zone was created, in UTC.
zones[].updated_at The time stamp of when the zone was last updated, in UTC.
zones[].active Lists whether the zone is active. Inactive safety zones do not generate alarms.
  • true
  • false
zones[].apply_to Reserved field.
zones[].default_allowed A field that defines trackable behavior when interacting with zones.
  • For keep-out zones
    • true—All nodes are allowed in this zone unless they are on the special case list.
    • false—No nodes are allowed in this zone unless they are on the special case list.
  • For keep-in zones:
    • true—All nodes must stay out of this zone unless they are on the special case list.
    • false—All nodes must keep in this zone unless they are on the special case list.
zones[].priority Reserved field.
zones[].zone_alarm_level Indicates the level of the zone violation alarm.
  • Zones that generate alarms have alarm levels 1-4.
  • Information zones have alarm level 0.
zones[].uid Unique id of zone.
zones[].sublocation_uid The unique identifier of the area from which you want to pull information. To retrieve an area UID, use GET api/sublocations described in Sublocations API.
zones[].zone_type_name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zones[].zone_geometry A JSON object with information about the zone size and shape. You can have 3-12 objects in this array.
zones[].zone_geometry.positions A JSON array including the x and y coordinates of a polygon zone's vertices, in millimeters. Note:The vertex coordinates must be listed in the order so that they trace the boundaries of the geofence.
zones[].zone_geometry.positions.x The x coordinate of the vertex, in millimeters.
zones[].zone_geometry.positions.y The y coordinate of the vertex, in millimeters.
zones[].zone_geometry.positions.z The z coordinate of the vertex, in millimeters.
zones[].zone_geometry.radius The radius, in millimeters, that the buffer extends from the trackable around which it is centered. Used when the geofence is a buffer.
zones[].dynamic Whether the geofence can move.
  • For zones false.
  • For buffers true.
zones[].shape The shape of the geofence.
  • For zones, returns polygon.
  • For buffers, returns circle.
zones[].trackable_object_uid If the geofence is a buffer, the unique identifier of the trackable around which the buffer is centered. If the geofence is a zone, returns null. The buffer does not function if no trackable is specified. To retrieve a trackable UID, see GET api/trackable_objects described in Trackable Objects API.
zones[].removed_at The time stamp of when the zone or buffer was removed, in UTC.
zones[].project_uid The unique identifier of the project.
zones[].location_uid The unique identifier of the site.
zones[].user_params Zone prototype options that is required for zones 'stop_no_alert', 'slow_zone', 'custom_zone', 'mute_zone'
zones[].user_params.coupled Zone id of boundary zone. Used for zone type boundary_in and boundary_out, see get zone types.
zones[].zone_type There are three types of zones:
  • keep_in — 'Keep_in' zones are typically used for security.
    • For keep-in zones with default_allowed=false, an alarm is generated if the trackable exits the zone.
    • For keep-in zones, with default_allowed=true, an alarm is generated if the trackable enters the zone.
  • keep_out — 'Keep_out' zones are typically used for safety.
    • For keep_out zones with default_allowed=false, an alarm is generated if the trackable enters the zone.
    • For keep_out zones with default_allowed=true, an alarm is generated if the trackable exits the zone.
  • information — An information zone does not trigger alarms. It is used for data analytics.
zones[].zone_type.id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
zones[].zone_type.display_name Reserved field.
zones[].zone_type.name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zones[].zone_points_attributes A JSON array with information including the x, y and z coordinates about the vertices for a polygon zone. You can have 3-12 objects in this array Note:Deprecated and will be removed in 2021Q1. Use zone_geometry instead
zones[].zone_points_attributes.id The identifier for the vertex.
zones[].zone_points_attributes.position_x The x coordinate of the vertex, in millimeters.
zones[].zone_points_attributes.position_y The y coordinate of the vertex, in millimeters.
zones[].zone_points_attributes.position_z The z coordinate of the vertex, in millimeters.
zones[].zone_points_attributes.zone_id The identifier for the zone that includes this vertex.
zones[].zone_exceptions The trackable UID of 'special case' trackables that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zones[].zone_exceptions_groups The group UID of 'special case' groups that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zones[].zone_mode Set zone active state,
  • when zone_mode=ALWAYS_ACTIVE active=true
  • when zone_mode=DEACTIVATED active=false
  • when zone_mode=ON_SCHEDULE depends on schedule and current time
zones[].zone_id Unique per project zone identifier.
zones[].crc16 Reserved field.
zones[].schedule.start_time Cron string in format ' *' when zone will activated on zone_mode = ON_SCHEDULE
zones[].schedule.stop_time Cron string in format ' *' when zone will deactivated on zone_mode = ON_SCHEDULE
zones[].custom_info Information entered in the custom_info field of the request will display in this field.
zones[].trackables_in_zone Array of trackables that are currently in the zone.
zones[].trackables_in_zone.uid The unique id of the trackable.
zones[].trackables_in_zone.entered The information about trackables that are currently inside the zone.
zones[].trackables_in_zone.entered.time The time when trackable entered zone.
zones[].trackables_in_zone.entered.x The X coordinate of where the trackable entered the zone.
zones[].trackables_in_zone.entered.y The Y coordinate of where the trackable entered the zone.
zones[].trackables_in_zone.entered.z The Z coordinate of where the trackable entered the zone.

Example Response

Using GET api/zones/Y6xQtUTKQ7CFe6blP7Z9YA:

{
    "zones": [
        {
            "sublocation_id": 39,
            "zone_type_id": 2,
            "depth": null,
            "name": "Zone2",
            "created_at": "2018-03-04T14:46:47.000Z",
            "updated_at": "2018-05-29T15:01:11.000Z",
            "active": false,
            "default_allowed": false,
            "priority": 0,
            "zone_alarm_level": 3,
            "uid": "Y6xQtUTKQ7CFe6blP7Z9YA",
            "sublocation_uid": "ZOex1jl71GfjKCnQ3QIpnV",
            "zone_type_name": "keep_out",
            "zone_geometry": {
                "positions": [
                    {
                        "x": -8991,
                        "y": -4016
                    },
                    {
                        "x": -8998,
                        "y": -1968
                    },
                    {
                        "x": -5830,
                        "y": -1963
                    },
                    {
                        "x": -5801,
                        "y": -4006
                    }
                ]
            },
            "dynamic": false,
            "shape": "polygon",
            "trackable_object_uid": null,
            "removed_at": "9999-12-31T23:59:59.000Z",
            "project_uid": "_2E2DIF5SAemIHbnIhLbGg",
            "location_uid": "4aEXSAN7PCSWRnbPEclEUu",
            "user_params": {},
            "custom_info": "",
            "zone_type": {
                "id": 2,
                "display_name": "Keep Out",
                "name": "keep_out"
            },
            "zone_points_attributes": [
                {
                    "id": 2534,
                    "position_x": -8991,
                    "position_y": -4016,
                    "position_z": null,
                    "zone_id": 569
                },
                {
                    "id": 2535,
                    "position_x": -8998,
                    "position_y": -1968,
                    "position_z": null,
                    "zone_id": 569
                },
                {
                    "id": 2536,
                    "position_x": -5830,
                    "position_y": -1963,
                    "position_z": null,
                    "zone_id": 569
                },
                {
                    "id": 2537,
                    "position_x": -5801,
                    "position_y": -4006,
                    "position_z": null,
                    "zone_id": 569
                }
            ],
            "zone_exceptions": [],
            "zone_exceptions_groups": [],
            "zone_mode": "ALWAYS_ACTIVE", 
            "schedule": {
                "start_time": "00 01 * * *",
                "stop_time": "00 02 * * *"
            },
            "trackables_in_zone": [],
            "crc16": 27017
        }
    ]
}

Create zone

POST api/zones

Create a new polygonal zone.

Request Fields

Field Required/Optional Values Type Description
zone_type_id required 1-3 number The identifier of the zone type. To retrieve a zone type ID, see get zone types.
name required - string The name of the zone or buffer.
default_allowed required
  • true
  • false
boolean A field that defines trackable behavior when interacting with zones.
  • For keep-out zones
    • true—All nodes are allowed in this zone unless they are on the special case list.
    • false—No nodes are allowed in this zone unless they are on the special case list.
  • For keep-in zones:
    • true—All nodes must stay out of this zone unless they are on the special case list.
    • false—All nodes must keep in this zone unless they are on the special case list.
priority optional 0 number Reserved field.
zone_alarm_level required 0-4 number Indicates the level of the zone violation alarm.
  • Zones that generate alarms have alarm levels 1-4.
  • Information zones have alarm level 0.
sublocation_uid required - string The unique identifier of the area from which you want to pull information. To retrieve an area UID, use GET api/sublocations described in Sublocations API.
zone_type_name required
  • keep_in
  • keep_out
  • information
string The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zone_geometry optional - object A JSON object with information about the zone size and shape. You can have 3-12 objects in this array.Note:If you are using the API to define the zone's coordinates, be sure to enter the zone's coordinates in the zone_geometry object and the zone_points_attributes array.
zone_geometry.positions optional - number A JSON array including the x and y coordinates of a polygon zone's vertices, in millimeters. Note:The vertex coordinates must be listed in the order so that they trace the boundaries of the geofence.
dynamic required false boolean Whether the geofence can move.
  • For zones false.
  • For buffers true.
shape required polygon string The shape of the geofence.
  • For zones, returns polygon.
  • For buffers, returns circle.
trackable_object_uid optional - string If the geofence is a buffer, the unique identifier of the trackable around which the buffer is centered. If the geofence is a zone, returns null. The buffer does not function if no trackable is specified. To retrieve a trackable UID, see GET api/trackable_objects described in Trackable Objects API.
zone_mode optional
  • ALWAYS_ACTIVE
  • DEACTIVATED
  • ON_SCHEDULE
enum Set zone active state,
  • when zone_mode=ALWAYS_ACTIVE active=true
  • when zone_mode=DEACTIVATED active=false
  • when zone_mode=ON_SCHEDULE depends on schedule and current time
zone_exceptions optional - string The trackable UID of 'special case' trackables that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_exceptions_groups optional - string The group UID of 'special case' groups that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_points_attributes optional - array A JSON array with information including the x, y and z coordinates about the vertices for a polygon zone. You can have 3-12 objects in this array Note:Deprecated and will be removed in 2021Q1. Use zone_geometry instead
zone_points_attributes.position.x optional - number The x coordinate of the vertex, in millimeters.
zone_points_attributes.position.y optional - number The y coordinate of the vertex, in millimeters.
zone_points_attributes.position.z optional - number The z coordinate of the vertex, in millimeters.
schedule.start_time optional - Cron string Cron string in format ' *' when zone will activated on zone_mode = ON_SCHEDULE
schedule.stop_time optional - Cron string Cron string in format ' *' when zone will deactivated on zone_mode = ON_SCHEDULE
custom_info optional - string(120 characters) Optionally, enter up to 120 characters of custom information for the zone.
user_params required/optional - string Zone prototype options that is required for zones 'stop_no_alert', 'slow_zone', 'custom_zone', 'mute_zone'
user_params.coupled optional - number Zone id of boundary zone. Used for zone type boundary_in and boundary_out, see get zone types.

Response Fields

Field Description
sublocation_id The identifier of the area in the context of the project. To retrieve the sublocation_id, use GET api/sublocations described in Sublocations API. If you enter null, the response returns the area's ID associated with the area UID entered.
zone_type_id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
depth Reserved field.
name The name of the zone or buffer.
created_at The time stamp of when the zone was created, in UTC.
updated_at The time stamp of when the zone was last updated, in UTC.
active Lists whether the zone is active. Inactive safety zones do not generate alarms.
  • true
  • false
apply_to Reserved field.
default_allowed A field that defines trackable behavior when interacting with zones.
  • For keep-out zones
    • true—All nodes are allowed in this zone unless they are on the special case list.
    • false—No nodes are allowed in this zone unless they are on the special case list.
  • For keep-in zones:
    • true—All nodes must stay out of this zone unless they are on the special case list.
    • false—All nodes must keep in this zone unless they are on the special case list.
priority Reserved field.
zone_alarm_level Indicates the level of the zone violation alarm.
  • Zones that generate alarms have alarm levels 1-4.
  • Information zones have alarm level 0.
uid Unique id of zone.
sublocation_uid The unique identifier of the area from which you want to pull information. To retrieve an area UID, use GET api/sublocations described in Sublocations API.
zone_type_name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zone_geometry A JSON object with information about the zone size and shape. You can have 3-12 objects in this array.
zone_geometry.positions A JSON array including the x and y coordinates of a polygon zone's vertices, in millimeters. Note:The vertex coordinates must be listed in the order so that they trace the boundaries of the geofence.
zone_geometry.positions.x The x coordinate of the vertex, in millimeters.
zone_geometry.positions.y The y coordinate of the vertex, in millimeters.
zone_geometry.positions.z The z coordinate of the vertex, in millimeters.
zone_geometry.radius The radius, in millimeters, that the buffer extends from the trackable around which it is centered. Used when the geofence is a buffer.
dynamic Whether the geofence can move.
  • For zones false.
  • For buffers true.
shape The shape of the geofence.
  • For zones, returns polygon.
  • For buffers, returns circle.
trackable_object_uid If the geofence is a buffer, the unique identifier of the trackable around which the buffer is centered. If the geofence is a zone, returns null. The buffer does not function if no trackable is specified. To retrieve a trackable UID, see GET api/trackable_objects described in Trackable Objects API.
removed_at The time stamp of when the zone or buffer was removed, in UTC.
project_uid The unique identifier of the project.
location_uid The unique identifier of the site.
user_params Zone prototype options that is required for zones 'stop_no_alert', 'slow_zone', 'custom_zone', 'mute_zone'
user_params.coupled Zone id of boundary zone. Used for zone type boundary_in and boundary_out, see get zone types.
zone_type There are three types of zones:
  • keep_in — 'Keep_in' zones are typically used for security.
    • For keep-in zones with default_allowed=false, an alarm is generated if the trackable exits the zone.
    • For keep-in zones, with default_allowed=true, an alarm is generated if the trackable enters the zone.
  • keep_out — 'Keep_out' zones are typically used for safety.
    • For keep_out zones with default_allowed=false, an alarm is generated if the trackable enters the zone.
    • For keep_out zones with default_allowed=true, an alarm is generated if the trackable exits the zone.
  • information — An information zone does not trigger alarms. It is used for data analytics.
zone_type.id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
zone_type.display_name Reserved field.
zone_type.name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zone_points_attributes A JSON array with information including the x, y and z coordinates about the vertices for a polygon zone. You can have 3-12 objects in this array Note:Deprecated and will be removed in 2021Q1. Use zone_geometry instead
zone_points_attributes.id The identifier for the vertex.
zone_points_attributes.position_x The x coordinate of the vertex, in millimeters.
zone_points_attributes.position_y The y coordinate of the vertex, in millimeters.
zone_points_attributes.position_z The z coordinate of the vertex, in millimeters.
zone_points_attributes.zone_id The identifier for the zone that includes this vertex.
zone_exceptions The trackable UID of 'special case' trackables that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_exceptions_groups The group UID of 'special case' groups that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_mode Set zone active state,
  • when zone_mode=ALWAYS_ACTIVE active=true
  • when zone_mode=DEACTIVATED active=false
  • when zone_mode=ON_SCHEDULE depends on schedule and current time
zone_id Unique per project zone identifier.
crc16 Reserved field.
schedule.start_time Cron string in format ' *' when zone will activated on zone_mode = ON_SCHEDULE
schedule.stop_time Cron string in format ' *' when zone will deactivated on zone_mode = ON_SCHEDULE
custom_info Information entered in the custom_info field of the request will display in this field.
trackables_in_zone Array of trackables that are currently in the zone.
trackables_in_zone.uid The unique id of the trackable.
trackables_in_zone.entered The information about trackables that are currently inside the zone.
trackables_in_zone.entered.time The time when trackable entered zone.
trackables_in_zone.entered.x The X coordinate of where the trackable entered the zone.
trackables_in_zone.entered.y The Y coordinate of where the trackable entered the zone.
trackables_in_zone.entered.z The Z coordinate of where the trackable entered the zone.

Example Request

{
            "sublocation_id": null,
            "zone_type_id": null,
            "name": "Test1",
            "default_allowed": false,
            "priority": 0,
            "zone_alarm_level": 1,
            "sublocation_uid": "qbzuXXVkzRjysOkyJr1xWb",
            "zone_type_name": "keep_out",
            "zone_geometry": {
                "positions": [
                    {
                        "x": "0",
                        "y": "0"
                    },
                    {
                        "x": "0",
                        "y": "100"
                    },
                    {
                        "x": "100",
                        "y": "100"
                    },
                    {
                        "x": "100",
                        "y": "0"
                    }
                ]
            },
            "dynamic": "false",
            "shape": "polygon",
            "trackable_object_uid": null,
            "zone_exceptions": [],
            "zone_points_attributes": [
                {
                    "position_x": 0,
                    "position_y": 0,
                    "position_z": null
                },
                {
                    "position_x": 0,
                    "position_y": 100,
                    "position_z": null
                },
                {
                    "position_x": 100,
                    "position_y": 100,
                    "position_z": null
                },
                {
                    "position_x": 100,
                    "position_y": 0,
                    "position_z": null
                }
            ],
            "custom_info": "text",
            "zone_mode": "ALWAYS_ACTIVE", 
            "schedule": {
                "start_time": "00 01 * * *",
                "stop_time": "00 02 * * *"
            }
        }

Example Response

{
    "sublocation_id": 39,
    "zone_type_id": 2,
    "depth": null,
    "name": "Test1",
    "created_at": "2018-05-29T18:08:58.000Z",
    "updated_at": "2018-05-29T18:08:58.000Z",
    "active": false,
    "default_allowed": false,
    "priority": 0,
    "zone_alarm_level": 1,
    "uid": "rO0TIsnblF4aIWikIPw9uO",
    "sublocation_uid": "qbzuXXVkzRjysOkyJr1xWb",
    "zone_type_name": "keep_out",
    "zone_geometry": {
        "positions": [
            {
                "x": 0,
                "y": 0
            },
            {
                "x": 0,
                "y": 100
            },
            {
                "x": 100,
                "y": 100
            },
            {
                "x": 100,
                "y": 0
            }
        ]
    },
    "dynamic": false,
    "shape": "polygon",
    "trackable_object_uid": null,
    "removed_at": "9999-12-31T23:59:59.000Z",
    "project_uid": "rHMwesF1vk0zwJwfO8Qv7e",
    "location_uid": "Qori5AZIV1aDapeTkSYxF4",
    "user_params": {},
    "zone_type": {        
        "id": 2,
        "display_name": "Keep Out",
        "name": "keep_out"
    },
    "zone_points_attributes": [
        {
            "id": 2538,
            "position_x": 0,
            "position_y": 0,
            "position_z": null,
            "zone_id": 916
        },
        {
            "id": 2539,
            "position_x": 0,
            "position_y": 100,
            "position_z": null,
            "zone_id": 916
        },
        {
            "id": 2540,
            "position_x": 100,
            "position_y": 100,
            "position_z": null,
            "zone_id": 916
        },
        {
            "id": 2541,
            "position_x": 100,
            "position_y": 0,
            "position_z": null,
            "zone_id": 916
        }
    ],
    "zone_exceptions": [],
    "zone_exceptions_groups": [],
    "custom_info": "text",
    "zone_mode": "ALWAYS_ACTIVE", 
    "schedule": {
        "start_time": "00 01 * * *",
        "stop_time": "00 02 * * *"
    },
    "trackables_in_zone": [],
    "crc16": 27017
}

Errors

Error Status Error Type Error Body Description
422 Unprocessable entity {"message":"Zone with shape 'polygon' should have 'sublocation_uid'"} The polygon-shaped one does not have an area UID.
422 Unprocessable entity {"message":"Sublocation with uid='....' not found'"} When a polygon shape has an area UID, but the area cannot be found.
422 Unprocessable entity {"message":"Zone with name '${data.name}' exists in sublocation '${data.sublocation_uid}'"} When a zone with the same name already exists in the area.
The zone should have at least 3 defined points and not exceed 12 in the 422 Unprocessable entity {"message":"Wrong format. zone_geometry for polygon shape should have positions array"} The zone_geometry parameter with a polygon shape must include an array, for example, {"positions": [{"x": 8053, "y": -25080},...{...}]}.
422 Unprocessable entity {"message":"Wrong format. zone_geometry for circle shape zone should have radius"} The zone_geometry parameter with a circle shape should have the format { "radius":3000 }.
422 Unprocessable entity {"message":"The zone should have at least 3 defined points and not exceed 12 in the zone_geometry field."} The zone_geometry.positions parameter must include at least 3 points but less then 12.
422 Unprocessable entity {"message":"The zone should have at least 3 defined points and not exceed 12 in the zone_points_attributes field."} The zone has the polygon shape, but does not have at least 3 defined points or exceeds 12 points.

Create buffer

POST api/zones Create a new buffer, or a circular zone that is attached to and moves with a specified trackable.

Request Fields

Field Required/Optional Values Type Description
zone_type_id required 1-3 number The identifier of the zone type. To retrieve a zone type ID, see get zone types.
name required - string The name of the zone or buffer.
default_allowed required
  • true
  • false
boolean A field that defines trackable behavior when interacting with zones.
  • For keep-out zones
    • true—All nodes are allowed in this zone unless they are on the special case list.
    • false—No nodes are allowed in this zone unless they are on the special case list.
  • For keep-in zones:
    • true—All nodes must stay out of this zone unless they are on the special case list.
    • false—All nodes must keep in this zone unless they are on the special case list.
priority optional 0 number Reserved field.
zone_alarm_level required 0-4 number Indicates the level of the zone violation alarm.
  • Zones that generate alarms have alarm levels 1-4.
  • Information zones have alarm level 0.
sublocation_uid required - string The unique identifier of the area from which you want to pull information. To retrieve an area UID, use GET api/sublocations described in Sublocations API.
zone_type_name required
  • keep_in
  • keep_out
  • information
string The name of the type of zone. To retrieve a zone_type_name, see get zone types.
dynamic required true boolean Whether the geofence can move.
  • For zones false.
  • For buffers true.
shape required circle string The shape of the geofence.
  • For zones, returns polygon.
  • For buffers, returns circle.
trackable_object_uid optional - string If the geofence is a buffer, the unique identifier of the trackable around which the buffer is centered. If the geofence is a zone, returns null. The buffer does not function if no trackable is specified. To retrieve a trackable UID, see GET api/trackable_objects described in Trackable Objects API.
zone_geometry optional - object A JSON object with information about the zone size and shape. You can have 3-12 objects in this array.Note:If you are using the API to define the zone's coordinates, be sure to enter the zone's coordinates in the zone_geometry object and the zone_points_attributes array.
zone_geometry.radius optional - number The radius, in millimeters, that the buffer extends from the trackable around which it is centered. Used when the geofence is a buffer.
zone_mode optional
  • ALWAYS_ACTIVE
  • DEACTIVATED
  • ON_SCHEDULE
enum Set zone active state,
  • when zone_mode=ALWAYS_ACTIVE active=true
  • when zone_mode=DEACTIVATED active=false
  • when zone_mode=ON_SCHEDULE depends on schedule and current time
zone_exceptions optional - string The trackable UID of 'special case' trackables that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_exceptions_groups optional - string The group UID of 'special case' groups that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
schedule.start_time optional - Cron string Cron string in format ' *' when zone will activated on zone_mode = ON_SCHEDULE
schedule.stop_time optional - Cron string Cron string in format ' *' when zone will deactivated on zone_mode = ON_SCHEDULE
custom_info optional - string(120 characters) Optionally, enter up to 120 characters of custom information for the zone.
user_params required/optional - string Zone prototype options that is required for zones 'stop_no_alert', 'slow_zone', 'custom_zone', 'mute_zone'
user_params.coupled optional - number Zone id of boundary zone. Used for zone type boundary_in and boundary_out, see get zone types.

Response Fields

Field Description
sublocation_id The identifier of the area in the context of the project. To retrieve the sublocation_id, use GET api/sublocations described in Sublocations API. If you enter null, the response returns the area's ID associated with the area UID entered.
zone_type_id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
depth Reserved field.
name The name of the zone or buffer.
created_at The time stamp of when the zone was created, in UTC.
updated_at The time stamp of when the zone was last updated, in UTC.
active Lists whether the zone is active. Inactive safety zones do not generate alarms.
  • true
  • false
apply_to Reserved field.
default_allowed A field that defines trackable behavior when interacting with zones.
  • For keep-out zones
    • true—All nodes are allowed in this zone unless they are on the special case list.
    • false—No nodes are allowed in this zone unless they are on the special case list.
  • For keep-in zones:
    • true—All nodes must stay out of this zone unless they are on the special case list.
    • false—All nodes must keep in this zone unless they are on the special case list.
priority Reserved field.
zone_alarm_level Indicates the level of the zone violation alarm.
  • Zones that generate alarms have alarm levels 1-4.
  • Information zones have alarm level 0.
uid Unique id of zone.
sublocation_uid The unique identifier of the area from which you want to pull information. To retrieve an area UID, use GET api/sublocations described in Sublocations API.
zone_type_name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zone_geometry A JSON object with information about the zone size and shape. You can have 3-12 objects in this array.
zone_geometry.positions A JSON array including the x and y coordinates of a polygon zone's vertices, in millimeters. Note:The vertex coordinates must be listed in the order so that they trace the boundaries of the geofence.
zone_geometry.positions.x The x coordinate of the vertex, in millimeters.
zone_geometry.positions.y The y coordinate of the vertex, in millimeters.
zone_geometry.positions.z The z coordinate of the vertex, in millimeters.
zone_geometry.radius The radius, in millimeters, that the buffer extends from the trackable around which it is centered. Used when the geofence is a buffer.
dynamic Whether the geofence can move.
  • For zones false.
  • For buffers true.
shape The shape of the geofence.
  • For zones, returns polygon.
  • For buffers, returns circle.
trackable_object_uid If the geofence is a buffer, the unique identifier of the trackable around which the buffer is centered. If the geofence is a zone, returns null. The buffer does not function if no trackable is specified. To retrieve a trackable UID, see GET api/trackable_objects described in Trackable Objects API.
removed_at The time stamp of when the zone or buffer was removed, in UTC.
project_uid The unique identifier of the project.
location_uid The unique identifier of the site.
user_params Zone prototype options that is required for zones 'stop_no_alert', 'slow_zone', 'custom_zone', 'mute_zone'
user_params.coupled Zone id of boundary zone. Used for zone type boundary_in and boundary_out, see get zone types.
zone_type There are three types of zones:
  • keep_in — 'Keep_in' zones are typically used for security.
    • For keep-in zones with default_allowed=false, an alarm is generated if the trackable exits the zone.
    • For keep-in zones, with default_allowed=true, an alarm is generated if the trackable enters the zone.
  • keep_out — 'Keep_out' zones are typically used for safety.
    • For keep_out zones with default_allowed=false, an alarm is generated if the trackable enters the zone.
    • For keep_out zones with default_allowed=true, an alarm is generated if the trackable exits the zone.
  • information — An information zone does not trigger alarms. It is used for data analytics.
zone_type.id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
zone_type.display_name Reserved field.
zone_type.name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zone_points_attributes A JSON array with information including the x, y and z coordinates about the vertices for a polygon zone. You can have 3-12 objects in this array Note:Deprecated and will be removed in 2021Q1. Use zone_geometry instead
zone_points_attributes.id The identifier for the vertex.
zone_points_attributes.position_x The x coordinate of the vertex, in millimeters.
zone_points_attributes.position_y The y coordinate of the vertex, in millimeters.
zone_points_attributes.position_z The z coordinate of the vertex, in millimeters.
zone_points_attributes.zone_id The identifier for the zone that includes this vertex.
zone_exceptions The trackable UID of 'special case' trackables that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_exceptions_groups The group UID of 'special case' groups that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_mode Set zone active state,
  • when zone_mode=ALWAYS_ACTIVE active=true
  • when zone_mode=DEACTIVATED active=false
  • when zone_mode=ON_SCHEDULE depends on schedule and current time
zone_id Unique per project zone identifier.
crc16 Reserved field.
schedule.start_time Cron string in format ' *' when zone will activated on zone_mode = ON_SCHEDULE
schedule.stop_time Cron string in format ' *' when zone will deactivated on zone_mode = ON_SCHEDULE
custom_info Information entered in the custom_info field of the request will display in this field.
trackables_in_zone Array of trackables that are currently in the zone.
trackables_in_zone.uid The unique id of the trackable.
trackables_in_zone.entered The information about trackables that are currently inside the zone.
trackables_in_zone.entered.time The time when trackable entered zone.
trackables_in_zone.entered.x The X coordinate of where the trackable entered the zone.
trackables_in_zone.entered.y The Y coordinate of where the trackable entered the zone.
trackables_in_zone.entered.z The Z coordinate of where the trackable entered the zone.

Example Request

{
    "zone_type_id": 2,
    "name": "Test buffer",
    "default_allowed": false,
    "priority": 0,
    "zone_alarm_level": 1,
    "sublocation_uid": "ZOex1jl71GfjKCnQ3QIpnV",
    "zone_type_name": "keep_out",
    "zone_geometry": 
    { 
        "radius": 5000
    },
    "shape": "circle",
    "dynamic": true,
    "trackable_object_uid": "4aEXSAN7PCSWRnbPEclEUu",
    "zone_mode": "ALWAYS_ACTIVE", 
    "schedule": {
        "start_time": "00 01 * * *",
        "stop_time": "00 02 * * *"
    }
}

Example Response

{
    "sublocation_id": null,
    "zone_type_id": 2,
    "depth": null,
    "name": "Test buffer",
    "created_at": "2018-05-29T18:22:10.000Z",
    "updated_at": "2018-05-29T18:22:10.000Z",
    "active": true,
    "default_allowed": false,
    "priority": 0,
    "zone_alarm_level": 1,
    "uid": "qbzuXXVkzRjysOkyJr1xWb",
    "sublocation_uid": "ZOex1jl71GfjKCnQ3QIpnV",
    "zone_type_name": "keep_out",
    "zone_geometry": {
        "radius": 5000
    },
    "dynamic": true,
    "shape": "circle",
    "trackable_object_uid": "4aEXSAN7PCSWRnbPEclEUu",
    "removed_at": "9999-12-31T23:59:59.000Z",
    "project_uid": "rO0TIsnblF4aIWikIPw9uO",
    "location_uid": "rHMwesF1vk0zwJwfO8Qv7e",
    "user_params": {},
    "custom_info": "",
    "zone_type": {
        "id": 2,
        "display_name": "Keep Out",
        "name": "keep_out"
    },
    "zone_id": 15,
    "zone_exceptions": [],
    "zone_exceptions_groups": [],
    "zone_mode": "ALWAYS_ACTIVE", 
    "schedule": {
        "start_time": "00 01 * * *",
        "stop_time": "00 02 * * *"
    },
    "trackables_in_zone": [],
    "crc16": 27017
}

Edit zone or buffer

PUT api/zones/{uid}

Edit a zone with a specified zone UID. To retrieve a zone UID, see get all zones and buffers.

Request Fields

The following fields can be edited using the PUT method. Fields can be removed from the request if you do not want to change them.

Field Required/Optional Values Type Description
zone_type_id required 1-3 number The identifier of the zone type. To retrieve a zone type ID, see get zone types.
name required - string The name of the zone or buffer.
default_allowed required
  • true
  • false
boolean A field that defines trackable behavior when interacting with zones.
  • For keep-out zones
    • true—All nodes are allowed in this zone unless they are on the special case list.
    • false—No nodes are allowed in this zone unless they are on the special case list.
  • For keep-in zones:
    • true—All nodes must stay out of this zone unless they are on the special case list.
    • false—All nodes must keep in this zone unless they are on the special case list.
zone_alarm_level required 0-4 number Indicates the level of the zone violation alarm.
  • Zones that generate alarms have alarm levels 1-4.
  • Information zones have alarm level 0.
zone_type_name required
  • keep_in
  • keep_out
  • information
string The name of the type of zone. To retrieve a zone_type_name, see get zone types.
location_uid optional - string The unique identifier of the site.
zone_geometry optional - object A JSON object with information about the zone size and shape. You can have 3-12 objects in this array.Note:If you are using the API to define the zone's coordinates, be sure to enter the zone's coordinates in the zone_geometry object and the zone_points_attributes array.
zone_geometry.positions optional/required - array A JSON array including the x and y coordinates of a polygon zone's vertices, in millimeters. Note:The vertex coordinates must be listed in the order so that they trace the boundaries of the geofence. Required for shape=polygon
zone_geometry.radius optional/required - number The radius, in millimeters, that the buffer extends from the trackable around which it is centered. Used when the geofence is a buffer. Required for shape=circle
dynamic required
  • true
  • false
boolean Whether the geofence can move.
  • For zones false.
  • For buffers true.
shape required
  • polygon
  • circle
string The shape of the geofence.
  • For zones, returns polygon.
  • For buffers, returns circle.
trackable_object_uid optional - string If the geofence is a buffer, the unique identifier of the trackable around which the buffer is centered. If the geofence is a zone, returns null. The buffer does not function if no trackable is specified. To retrieve a trackable UID, see GET api/trackable_objects described in Trackable Objects API.
zone_mode optional
  • ALWAYS_ACTIVE
  • DEACTIVATED
  • ON_SCHEDULE
enum Set zone active state,
  • when zone_mode=ALWAYS_ACTIVE active=true
  • when zone_mode=DEACTIVATED active=false
  • when zone_mode=ON_SCHEDULE depends on schedule and current time
zone_exceptions optional - string The trackable UID of 'special case' trackables that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_exceptions_groups optional - string The group UID of 'special case' groups that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_points_attributes optional - array A JSON array with information including the x, y and z coordinates about the vertices for a polygon zone. You can have 3-12 objects in this array Note:Deprecated and will be removed in 2021Q1. Use zone_geometry instead
zone_points_attributes.position.x optional - number The x coordinate of the vertex, in millimeters.
zone_points_attributes.position.y optional - number The y coordinate of the vertex, in millimeters.
zone_points_attributes.position.z optional - number The z coordinate of the vertex, in millimeters.
schedule.start_time optional - Cron string Cron string in format ' *' when zone will activated on zone_mode = ON_SCHEDULE
schedule.stop_time optional - Cron string Cron string in format ' *' when zone will deactivated on zone_mode = ON_SCHEDULE
custom_info optional - string(120 characters) Optionally, enter up to 120 characters of custom information for the zone.
user_params required/optional - string Zone prototype options that is required for zones 'stop_no_alert', 'slow_zone', 'custom_zone', 'mute_zone'
user_params.coupled optional - number Zone id of boundary zone. Used for zone type boundary_in and boundary_out, see get zone types.

Response Fields

Field Description
sublocation_id The identifier of the area in the context of the project. To retrieve the sublocation_id, use GET api/sublocations described in Sublocations API. If you enter null, the response returns the area's ID associated with the area UID entered.
zone_type_id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
depth Reserved field.
name The name of the zone or buffer.
created_at The time stamp of when the zone was created, in UTC.
updated_at The time stamp of when the zone was last updated, in UTC.
active Lists whether the zone is active. Inactive safety zones do not generate alarms.
  • true
  • false
apply_to Reserved field.
default_allowed A field that defines trackable behavior when interacting with zones.
  • For keep-out zones
    • true—All nodes are allowed in this zone unless they are on the special case list.
    • false—No nodes are allowed in this zone unless they are on the special case list.
  • For keep-in zones:
    • true—All nodes must stay out of this zone unless they are on the special case list.
    • false—All nodes must keep in this zone unless they are on the special case list.
priority Reserved field.
zone_alarm_level Indicates the level of the zone violation alarm.
  • Zones that generate alarms have alarm levels 1-4.
  • Information zones have alarm level 0.
uid Unique id of zone.
sublocation_uid The unique identifier of the area from which you want to pull information. To retrieve an area UID, use GET api/sublocations described in Sublocations API.
zone_type_name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zone_geometry A JSON object with information about the zone size and shape. You can have 3-12 objects in this array.
zone_geometry.positions A JSON array including the x and y coordinates of a polygon zone's vertices, in millimeters. Note:The vertex coordinates must be listed in the order so that they trace the boundaries of the geofence.
zone_geometry.positions.x The x coordinate of the vertex, in millimeters.
zone_geometry.positions.y The y coordinate of the vertex, in millimeters.
zone_geometry.positions.z The z coordinate of the vertex, in millimeters.
zone_geometry.radius The radius, in millimeters, that the buffer extends from the trackable around which it is centered. Used when the geofence is a buffer.
dynamic Whether the geofence can move.
  • For zones false.
  • For buffers true.
shape The shape of the geofence.
  • For zones, returns polygon.
  • For buffers, returns circle.
trackable_object_uid If the geofence is a buffer, the unique identifier of the trackable around which the buffer is centered. If the geofence is a zone, returns null. The buffer does not function if no trackable is specified. To retrieve a trackable UID, see GET api/trackable_objects described in Trackable Objects API.
removed_at The time stamp of when the zone or buffer was removed, in UTC.
project_uid The unique identifier of the project.
location_uid The unique identifier of the site.
user_params Zone prototype options that is required for zones 'stop_no_alert', 'slow_zone', 'custom_zone', 'mute_zone'
user_params.coupled Zone id of boundary zone. Used for zone type boundary_in and boundary_out, see get zone types.
zone_type There are three types of zones:
  • keep_in — 'Keep_in' zones are typically used for security.
    • For keep-in zones with default_allowed=false, an alarm is generated if the trackable exits the zone.
    • For keep-in zones, with default_allowed=true, an alarm is generated if the trackable enters the zone.
  • keep_out — 'Keep_out' zones are typically used for safety.
    • For keep_out zones with default_allowed=false, an alarm is generated if the trackable enters the zone.
    • For keep_out zones with default_allowed=true, an alarm is generated if the trackable exits the zone.
  • information — An information zone does not trigger alarms. It is used for data analytics.
zone_type.id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
zone_type.display_name Reserved field.
zone_type.name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zone_points_attributes A JSON array with information including the x, y and z coordinates about the vertices for a polygon zone. You can have 3-12 objects in this array Note:Deprecated and will be removed in 2021Q1. Use zone_geometry instead
zone_points_attributes.id The identifier for the vertex.
zone_points_attributes.position_x The x coordinate of the vertex, in millimeters.
zone_points_attributes.position_y The y coordinate of the vertex, in millimeters.
zone_points_attributes.position_z The z coordinate of the vertex, in millimeters.
zone_points_attributes.zone_id The identifier for the zone that includes this vertex.
zone_exceptions The trackable UID of 'special case' trackables that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_exceptions_groups The group UID of 'special case' groups that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_mode Set zone active state,
  • when zone_mode=ALWAYS_ACTIVE active=true
  • when zone_mode=DEACTIVATED active=false
  • when zone_mode=ON_SCHEDULE depends on schedule and current time
zone_id Unique per project zone identifier.
crc16 Reserved field.
schedule.start_time Cron string in format ' *' when zone will activated on zone_mode = ON_SCHEDULE
schedule.stop_time Cron string in format ' *' when zone will deactivated on zone_mode = ON_SCHEDULE
custom_info Information entered in the custom_info field of the request will display in this field.
trackables_in_zone Array of trackables that are currently in the zone.
trackables_in_zone.uid The unique id of the trackable.
trackables_in_zone.entered The information about trackables that are currently inside the zone.
trackables_in_zone.entered.time The time when trackable entered zone.
trackables_in_zone.entered.x The X coordinate of where the trackable entered the zone.
trackables_in_zone.entered.y The Y coordinate of where the trackable entered the zone.
trackables_in_zone.entered.z The Z coordinate of where the trackable entered the zone.

Example Request

Using PUT api/zones/ZOex1jl71GfjKCnQ3QIpnV:

{
    "zone_type_id": 2,
    "name": "Test1",
    "default_allowed": false,
    "priority": 0,
    "zone_alarm_level": 1,
    "sublocation_uid": "4aEXSAN7PCSWRnbPEclEUu",
    "zone_type_name": "keep_out",
    "dynamic": false,
    "shape": "polygon",
    "trackable_object_uid": null,
    "project_uid": "qbzuXXVkzRjysOkyJr1xWb",
    "location_uid": "rO0TIsnblF4aIWikIPw9uO",
    "zone_exceptions": [],
    "zone_exceptions_groups": [],
    "zone_mode": "ALWAYS_ACTIVE", 
    "custom_info": "test",
    "schedule": {
        "start_time": "00 01 * * *",
        "stop_time": "00 02 * * *"
    }
}

Example Response

{
    "sublocation_id": 39,
    "zone_type_id": 2,
    "depth": null,
    "name": "Test1",
    "created_at": "2018-05-29T18:37:04.000Z",
    "updated_at": "2018-05-29T18:59:06.000Z",
    "active": false,
    "default_allowed": false,
    "priority": 0,
    "zone_alarm_level": 1,
    "uid": "ZOex1jl71GfjKCnQ3QIpnV",
    "sublocation_uid": "4aEXSAN7PCSWRnbPEclEUu",
    "zone_type_name": "keep_out",
    "zone_geometry": {
        "positions": [
            {
                "x": 0,
                "y": 0
            },
            {
                "x": 0,
                "y": 100
            },
            {
                "x": 100,
                "y": 100
            },
            {
                "x": 100,
                "y": 0
            }
        ]
    },
    "dynamic": false,
    "shape": "polygon",
    "trackable_object_uid": null,
    "removed_at": "9999-12-31T23:59:59.000Z",
    "project_uid": "qbzuXXVkzRjysOkyJr1xWb",
    "location_uid": "rO0TIsnblF4aIWikIPw9uO",
    "user_params": {},
    "zone_type": {
        "id": 2,
        "display_name": "Keep Out",
        "name": "keep_out"
    },
    "zone_points_attributes": [
        {
            "id": 2542,
            "position_x": 0,
            "position_y": 0,
            "position_z": null,
            "zone_id": 918
        },
        {
            "id": 2543,
            "position_x": 0,
            "position_y": 100,
            "position_z": null,
            "zone_id": 918
        },
        {
            "id": 2544,
            "position_x": 100,
            "position_y": 100,
            "position_z": null,
            "zone_id": 918
        },
        {
            "id": 2545,
            "position_x": 100,
            "position_y": 0,
            "position_z": null,
            "zone_id": 918
        }
    ],
    "zone_id": 918,
    "zone_exceptions": [],
    "zone_exceptions_groups": [],
    "zone_mode": "ALWAYS_ACTIVE", 
    "custom_info": "test",
    "schedule": {
        "start_time": "00 01 * * *",
        "stop_time": "00 02 * * *"
    },
    "trackables_in_zone": [],
    "crc16": 27017
}

Errors

Error Status Error Type Error Body Description
404 Not Found {"message":"Zone '...' not found"} The polygon shape has an area UID specified, but the area cannot be found.
422 Unprocessable entity {"message":"Wrong format. zone_geometry for polygon shape should have positions array"} The zone_geometry parameter with a polygon shape must include an array, for example, {"positions": [{"x": 8053, "y": -25080},...{...}]}.
422 Unprocessable entity {"message":"Wrong format. zone_geometry for circle shape zone should have radius"} The zone_geometry parameter with a circle shape must have the format { "radius":3000 }.
422 Unprocessable entity {"message":"The zone should have at least 3 defined points and not exceed 12 in the zone_geometry field."} The zone_geometry.positions or zone_points_attributes parameter must include at least 3 points but not exceed 12.
422 Unprocessable entity {"message":"The zone should have at least 3 defined points and not exceed 12 in the zone_points_attributes field."} The zone_points_attributes parameter must include at least 3 points but not exceed 12.

Delete zone or buffer

DELETE api/zones{uid}

Delete a zone with a specified zone UID. To retrieve a zone or buffer UID, see get all zones and buffers.

Returns status 204.

Get zone types

GET api/zonetypes

Get a list of existing zone types.

Response Fields

Field Description
zone_types.id The identifier of the zone type.
zone_types.name The name of the zone type.
zone_types.created_at The time when the zone type was created.
zone_types.updated_at The time when the zone type was last updated.
zone_types.display_name The display name of the zone type.

Example Response

{
  "zone_types":[{
      "id":1,
      "name":"keep_in",
      "display_name":"Keep In",
      "created_at":"2016-09-07T21:53:38.000Z",
      "updated_at":"2016-09-07T21:53:38.000Z"
    }, {
      "id":2,
      "name":"keep_out",
      "display_name":"Keep Out",
      "created_at":"2016-09-07T21:53:38.000Z",
      "updated_at":"2016-09-07T21:53:38.000Z"
    }, {
      "id":3,
      "name":"information",
      "display_name":"Information",
      "created_at":"2016-09-07T21:53:38.000Z",
      "updated_at":"2016-09-07T21:53:38.000Z"
    }, {
      "id":22,
      "name":"stop_no_alert",
      "display_name":"Stop zone – no audio alert",
      "created_at":"2021-06-24T10:35:50.642Z",
      "updated_at":"2021-06-24T10:35:50.642Z"
    }, {
      "id":23,
      "name":"slow_zone",
      "display_name":"Slow zone",
      "created_at":"2021-06-24T10:35:51.826Z",
      "updated_at":"2021-06-24T10:35:51.826Z"
    }, {
      "id":24,
      "name":"custom_zone",
      "display_name":"Custom zone",
      "created_at":"2021-06-24T10:35:52.645Z",
      "updated_at":"2021-06-24T10:35:52.645Z"
    }, {
      "id":25,
      "name":"mute_zone",
      "display_name":"PIT to PED mute zone",
      "created_at":"2021-06-29T12:41:00.540Z",
      "updated_at":"2021-06-29T12:41:00.540Z"
      }, {
        "id": 26,
        "name": "wire_required",
        "display_name": "Wire guidance required zone",
        "created_at": "2021-11-02T16:56:01.879Z",
        "updated_at": "2021-11-02T16:56:01.879Z"
      }, {
        "id": 27,
        "name": "height_restriction",
        "display_name": "Height restriction zone",
        "created_at": "2021-11-03T11:42:31.162Z",
        "updated_at": "2021-11-03T11:42:31.162Z"
      }, {
        "id": 28,
        "name": "exit_restriction",
        "display_name": "Exit restriction zone",
        "created_at": "2021-11-03T11:42:42.106Z",
        "updated_at": "2021-11-03T11:42:42.106Z"
      }, {
        "id": 29,
        "name": "speed_restriction zone",
        "display_name": "Speed restriction",
        "created_at": "2021-11-03T11:49:26.647Z",
        "updated_at": "2021-11-03T11:49:26.647Z"
      }, {
        "id":30,
        "name":"maximum_occupancy",
        "display_name":"Maximum occupancy zone",
        "created_at":"2021-11-03T17:35:45.908Z",
        "updated_at":"2021-11-03T17:35:45.908Z"
  }]
}

Zone type names

Zone type name Zone type id Description
keep_in 1 Designates a space where trackables should not exit. Keep-in zones generate alarms.
keep_out 2 Designates a space where trackables should not enter. Keep-out zones generate alarms.
information 3 Tracks trackable movement in and out of the zone. Info zones do not generate alarms.
boundary_in 20 Zone that works exclusively with the presence of a "boundary_out" zone, in order to trigger an event that defines whether a trackable is inside/outside a proposed coverage area. (6)
boundary_out 21 Zone that works exclusively with the presence of a "boundary_in" zone, in order to trigger an event that defines whether a trackable is inside/outside a proposed coverage area. (6)
stop_no_alert 22 Vehicles that enter this zone type will be stopped. There will be no audio alert for the vehicle operator (1)
slow_zone 23 Vehicles that enter this zone type will be slowed down. There will be an audio alert for the vehicle operator (1)
mute_zone 25 Used to mute PWS alarms (proximity event) between a badge inside the zone and any devices outside of it (2)
wire_required 26 Special zone type to require that a truck be placed “on wire” by imposing a crawl speed limit (3)
height_restriction 27 A zone is placed in an area with overhead hazards to impose operational restrictions on a truck operating with elevated forklift (3)
exit_restriction 28 A zone is placed within x meter of an aisle ending (3)
speed_restriction 29 Special zone type to instruct trucks to travel at a constant slow speed (3)
maximum_occupancy 30 Special zone type to slow down all trucks in area when total number of tracks in area more thаn allowed capacity (4)
action_required_zone 31 Raymond would use the special zone type to instruct trucks to take a specific action that Redpoint is not privy to (3)
custom_zone_a 32 Specific custom zone type for Raymond (5)
custom_zone_b 33 Specific custom zone type for Raymond (5)
custom_zone_c 34 Specific custom zone type for Raymond (5)
custom_zone_d 35 Specific custom zone type for Raymond (5)
custom_zone_e 36 Specific custom zone type for Raymond (5)
custom_zone_f 37 Specific custom zone type for Raymond (5)
custom_zone_g 38 Specific custom zone type for Raymond (5)

(1) Addon rtls-addon-vehicle-restriction-zones is required

(2) Addon rtls-rtls-addon-mute-zone is required

(3) Addon rtls-addon-raymond-special-zones is required

(4) Addon rtls-addon-maximum-occupancy-zone is required

(5) Addon rtls-addon-custom-zones is required

(6) Addon rtls-addon-boundary-zones is required

Create multi-tiered buffer

POST api/multi_tiered_zone

Create a multi-tiered buffer, with more than one defined radius to create different geofence layers.

Note: Using POST api/multi_tiered_zone, you can only define the radius size and shape of the tiers. Creating a multi-tiered buffer effectively creates individual zones for each tier specified. Each tier has its own UID. To edit any characteristics for the tiers, use edit zone or buffer using the UID of the individual tier.

Request Fields

Field Required/Optional Values Type Description
name required - string The user-defined name of the zone.
trackable_object_uid required - string If the geofence is a buffer, the unique identifier of the trackable around which the buffer is centered. If the geofence is a zone, returns null. The buffer does not function if no trackable is specified. To retrieve a trackable UID, see GET api/trackable_objects described in Trackable Objects API.
tiers - - array A JSON array of objects that define the size and shape of the buffer's tiers.
tiers.shape required circle string The shape of the geofence.
  • For zones, returns polygon.
  • For buffers, returns circle.
tiers.radius optional - number The radius in millimeters of the buffer.
custom_info optional - string(120 characters) Optionally, enter up to 120 characters of custom information for the zone.

Response Fields

Field Description
sublocation_id The identifier of the area in the context of the project. To retrieve the sublocation_id, use GET api/sublocations described in Sublocations API. If you enter null, the response returns the area's ID associated with the area UID entered.
zone_type_id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
depth Reserved field.
name The user-defined name of the zone.
created_at The time stamp of when the zone was created, in UTC.
updated_at The time stamp of when the zone was last updated, in UTC.
active Lists whether the zone is active. Inactive safety zones do not generate alarms.
  • true
  • false
default_allowed A field that defines trackable behavior when interacting with zones.
  • For keep-out zones
    • true—All nodes are allowed in this zone unless they are on the special case list.
    • false—No nodes are allowed in this zone unless they are on the special case list.
  • For keep-in zones:
    • true—All nodes must stay out of this zone unless they are on the special case list.
    • false—All nodes must keep in this zone unless they are on the special case list.
apply_to Reserved field.
priority Reserved field.
zone_alarm_level Indicates the level of the zone violation alarm.
  • Zones that generate alarms have alarm levels 1-4.
  • Information zones have alarm level 0.
uid The unique identifier for the zone.
sublocation_uid The unique identifier of the area from which you want to pull information. To retrieve an area UID, use GET api/sublocations described in Sublocations API.
zone_type_name The name of the type of zone. To retrieve a zone_type_name, see get zone types.
zone_geometry A JSON object with information about the zone size and shape. You can have 3-12 objects in this array.
zone_geometry.positions A JSON array including the x and y coordinates of a polygon zone's vertices, in millimeters. Note:The vertex coordinates must be listed in the order so that they trace the boundaries of the geofence.
zone_geometry.radius The radius, in millimeters, that the buffer extends from the trackable around which it is centered. Used when the geofence is a buffer.
dynamic Whether the geofence can move.
  • For zones false.
  • For buffers true.
shape The shape of the geofence.
  • For zones, returns polygon.
  • For buffers, returns circle.
trackable_object_uid If the geofence is a buffer, the unique identifier of the trackable around which the buffer is centered. If the geofence is a zone, returns null. The buffer does not function if no trackable is specified. To retrieve a trackable UID, see GET api/trackable_objects described in Trackable Objects API.
removed_at The time stamp of when the zone or buffer was removed, in UTC.
project_uid The unique identifier of the project.
location_uid The unique identifier of the site.
user_params Zone prototype options that is required for zones 'stop_no_alert', 'slow_zone', 'custom_zone', 'mute_zone'
user_params.coupled Zone id of boundary zone. Used for zone type boundary_in and boundary_out, see get zone types.
zone_type There are three types of zones:
  • keep_in — 'Keep_in' zones are typically used for security.
    • For keep-in zones with default_allowed=false, an alarm is generated if the trackable exits the zone.
    • For keep-in zones, with default_allowed=true, an alarm is generated if the trackable enters the zone.
  • keep_out — 'Keep_out' zones are typically used for safety.
    • For keep_out zones with default_allowed=false, an alarm is generated if the trackable enters the zone.
    • For keep_out zones with default_allowed=true, an alarm is generated if the trackable exits the zone.
  • information — An information zone does not trigger alarms. It is used for data analytics.
zone_type.id The identifier of the zone type. To retrieve a zone type ID, see get zone types.
zone_type.display_name Reserved field.
zone_type.name The name of the type of zone.
  • keep_in
  • keep_out
  • information
zone_exceptions The trackable UID of 'special case' trackables that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_exceptions_groups The group UID of 'special case' groups that can ignore the rules of the safety zone. For more information, see the default_allowed definition.
zone_mode Set zone active state,
  • when zone_mode=ALWAYS_ACTIVE active=true
  • when zone_mode=DEACTIVATED active=false
  • when zone_mode=ON_SCHEDULE depends on schedule and current time
zone_id Unique per project zone identifier.
crc16 Reserved field.
uid Unique id of zone.
schedule.start_time Cron string in format ' *' when zone will activated on zone_mode = ON_SCHEDULE
schedule.stop_time Cron string in format ' *' when zone will deactivated on zone_mode = ON_SCHEDULE
custom_info Information entered in the custom_info field of the request will display in this field.
trackables_in_zone Array of trackables that are currently in the zone.
trackables_in_zone.uid The unique id of the trackable.
trackables_in_zone.entered The information about trackables that are currently inside the zone.
trackables_in_zone.entered.time The time when trackable entered zone.
trackables_in_zone.entered.x The X coordinate of where the trackable entered the zone.
trackables_in_zone.entered.y The Y coordinate of where the trackable entered the zone.
trackables_in_zone.entered.z The Z coordinate of where the trackable entered the zone.

Example Request

  {
    "name": "Test",
    "trackable_object_uid": "uuSRtbNHSMOsMSNJE2XCkA",
    "tiers": [
      {
        "shape": "circle",
        "radius": 2000
      },
      {
        "shape": "circle",
        "radius": 3000
      },
      {
        "shape": "circle",
        "radius": 4000
      }
    ]
  }

Example Response

{
    "zones": [
        {
            "sublocation_id": null,
            "zone_type_id": 2,
            "zone_id": 15,
            "depth": null,
            "name": "Dynamic Zone TRackA T[0]",
            "created_at": "2017-09-27T07:59:19.000Z",
            "updated_at": "2017-09-27T07:59:19.000Z",
            "active": true,
            "default_allowed": false,
            "priority": 0,
            "zone_alarm_level": 1,
            "uid": "5P9jl-duSam6Ux_8_mGxvQ",
            "sublocation_uid": null,
            "zone_type_name": "keep_out",
            "zone_geometry": {
                "radius": 2000
            },
            "dynamic": true,
            "shape": "circle",
            "trackable_object_uid": "uuSRtbNHSMOsMSNJE2XCkA",
            "project_uid": "_2E2DIF5SAemIHbnIhLbGg",
            "location_uid": null,
            "user_params": {},
            "zone_type": {
                "id": 2,
                "display_name": "Keep Out",
                "name": "keep_out"
            },
            "zone_exceptions": [],
            "zone_exceptions_groups": [],
            "zone_mode": "ALWAYS_ACTIVE", 
            "schedule": {
                "start_time": "00 01 * * *",
                "stop_time": "00 02 * * *"
            },
            "trackables_in_zone": [],
            "crc16": 27017
        },
        {
            "sublocation_id": null,
            "zone_type_id": 2,
            "zone_id": 16,
            "depth": null,
            "name": "Dynamic Zone TRackA T[1]",
            "created_at": "2017-09-27T07:59:19.000Z",
            "updated_at": "2017-09-27T07:59:19.000Z",
            "active": true,
            "default_allowed": false,
            "priority": 0,
            "zone_alarm_level": 1,
            "uid": "yU9zqYmzTKGCzBhBHUbj3g",
            "sublocation_uid": null,
            "zone_type_name": "keep_out",
            "zone_geometry": {
                "radius": 3000
            },
            "dynamic": true,
            "shape": "circle",
            "trackable_object_uid": "uuSRtbNHSMOsMSNJE2XCkA",
            "project_uid": "_2E2DIF5SAemIHbnIhLbGg",
            "location_uid": null,
            "user_params": {},
            "zone_type": {
                "id": 2,
                "display_name": "Keep Out",
                "name": "keep_out"
            },
            "zone_exceptions": [],
            "zone_exceptions_groups": [],
            "zone_mode": "ALWAYS_ACTIVE", 
            "schedule": {
                "start_time": "00 01 * * *",
                "stop_time": "00 02 * * *"
            },
            "trackables_in_zone": []
        },
        {
            "sublocation_id": null,
            "zone_type_id": 2,
            "zone_id": 17,
            "depth": null,
            "name": "Dynamic Zone TRackA T[2]",
            "created_at": "2017-09-27T07:59:19.000Z",
            "updated_at": "2017-09-27T07:59:19.000Z",
            "active": true,
            "default_allowed": false,
            "priority": 0,
            "zone_alarm_level": 1,
            "uid": "m9oswuobSCie42PT7iNMuA",
            "sublocation_uid": null,
            "zone_type_name": "keep_out",
            "zone_geometry": {
                "radius": 4000
            },
            "dynamic": true,
            "shape": "circle",
            "trackable_object_uid": "uuSRtbNHSMOsMSNJE2XCkA",
            "project_uid": "_2E2DIF5SAemIHbnIhLbGg",
            "location_uid": null,
            "user_params": {},
            "zone_type": {
                "id": 2,
                "display_name": "Keep Out",
                "name": "keep_out"
            },
            "zone_exceptions": [],
            "zone_exceptions_groups": [],
            "zone_mode": "ALWAYS_ACTIVE", 
            "schedule": {
                "start_time": "00 01 * * *",
                "stop_time": "00 02 * * *"
            },
            "trackables_in_zone": [],
            "crc16": 27017
        }


    ]
}

Delete multi-tiered buffer

DELETE api/multi_tiered_zone/{uid}

Delete a multi-tiered buffer by using the UID of the trackable to which it is associated. To retrieve the UID of the associated trackable, use get all zones and buffers to find the trackable UID in the trackable_object_uid field.

All responses return status 204.

results matching ""

    No results matching ""