For the complete documentation index, see llms.txt. This page is also available as Markdown.

Geofence point

The points that give a polygon or sausage geofence its shape, read and replaced separately from the geofence.

The points of a geofence define its shape. A polygon is bounded by its points, and a sausage runs along them. A circle has none and rejects any that are sent.

Points are handled separately from the geofence itself because one geofence can carry hundreds of them, which is why zone/list and zone/read leave them out unless with_points is set. The two operations here read and replace them directly.

Point object structure

API actions

API base path: /zone/point.


List geofence points

post
/zone/point/list

Return the points of a geofence.

Points are handled separately from the geofence itself because they arrive as large arrays. zone/read with with_points returns the same data alongside the geofence.

Also accepts GET with the same parameters as query-string values.

Authorizations
AuthorizationstringRequired

Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.

Body
zone_idinteger · min: 1Required

ID of the geofence.

countintegerOptional

Optional. Simplify the returned list down to about this many points.

Responses
200

The geofence points

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/zone/point/list
POST /v2/zone/point/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "zone_id": 1,
  "count": 1
}
{
  "success": true,
  "list": [
    {
      "lat": 1,
      "lng": 1,
      "node": true
    }
  ]
}

Errors

These errors come in addition to the general error codes:

  • 201 - Not found in the database, when no geofence has the given ID or it belongs to another user.

  • 230 - Not supported for this entity type, when the geofence cannot hold points at all, such as a circle.


Required sub-user rights: zone_update.

Update geofence points

post
/zone/point/update

Replace the points of a geofence.

This is a replacement, not a merge: the array given becomes the geofence's points.

A polygon needs at least 3 points and allows at most 500. A sausage needs at least 2 and allows at most 1024. A circle takes no points at all.

Requires the zone_update right.

Authorizations
AuthorizationstringRequired

Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.

Body
zone_idinteger · min: 1Required

ID of the geofence.

Responses
200

Points updated

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/zone/point/update
POST /v2/zone/point/update HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "zone_id": 1,
  "points": [
    {
      "lat": 1,
      "lng": 1,
      "node": true
    }
  ]
}
{
  "success": true
}

Errors

These errors come in addition to the general error codes:

  • 201 - Not found in the database, when no geofence has the given ID or it belongs to another user.

  • 202 - Too many points in a geofence, when the points array exceeds the limit for the geofence's type. A polygon allows at most 500 points and a sausage at most 1024.

  • 230 - Not supported for this entity type, when the geofence cannot hold points at all, such as a circle.

  • 284 - Not enough points for the geofence. A polygon needs at least 3 points and a sausage at least 2.

Last updated

Was this helpful?