Zum Inhalt springen
Web APIGeofences

Geofences

Areas of interest, the enter and exit events they produce, and the positions recorded inside them.

8 operationsBase https://api.locantra.de

Get one geofence

GEThttps://api.locantra.de/geofence
Permission geofences.read

Returns a single geofence of your organisation. Polygon is a GeoJSON MultiPolygon — {"type":"MultiPolygon","coordinates":[…]}, longitude first. A GeoJSON Polygon is accepted on write and read as a MultiPolygon of one.

Create a geofence

POSThttps://api.locantra.de/geofence
Permission geofences.manageIdempotent

Creates a geofence from a polygon. Polygon is a GeoJSON MultiPolygon — {"type":"MultiPolygon","coordinates":[…]}, longitude first. A GeoJSON Polygon is accepted on write and read as a MultiPolygon of one. A ring must be closed, its last pair repeating its first. Name must be unique within your organisation, and the area must not overlap another geofence on the same building floor — either is rejected with 409. FixedDevice is not accepted here: this operation creates polygon geofences only.

Update a geofence

PATCHhttps://api.locantra.de/geofence
Permission geofences.manage

Changes the name, the area, the building floor, the device anchor or the sharing of one geofence. Those are the only fields this operation can change; an omitted field is left unchanged, and a request that changes nothing is rejected with 400. Polygon is a GeoJSON MultiPolygon — {"type":"MultiPolygon","coordinates":[…]}, longitude first. A GeoJSON Polygon is accepted on write and read as a MultiPolygon of one. BuildingFloorID given as an empty string moves the geofence back to ground level; FixedDevice given as an empty string drops the device anchor together with its fixed position. A new Name must stay unique within your organisation, and a new area must not overlap another geofence on the same building floor — either is rejected with 409.

Delete a geofence

DELETEhttps://api.locantra.de/geofence
Permission geofences.manage

Deletes a geofence. The enter/exit events already recorded for it are kept and stay readable through GET /geofence/events.

List geofence enter and exit events

GEThttps://api.locantra.de/geofence/events
Permission geofences.read

Lists the recorded geofence crossings of your organisation, newest first. An exit event also carries the matching entry instant and the dwell duration. TransponderID is the physical chip code printed on the transponder, not a transponder assignment's ID. Results are paged with Limit (default 100, maximum 1000) and the opaque Cursor: pass the response envelope's Page.NextCursor back as Cursor, with the same filters, to read the next page; an absent NextCursor means the last page. Events are only available where the transition store is provisioned; where it is not, the operation answers 422.

Get the latest position per transponder inside a geofence

GEThttps://api.locantra.de/geofence/latest/pings
Permission geofences.read

Returns the most recent position recorded inside one geofence for each transponder currently seen there. Limit (default 100, maximum 1000) caps the rows returned; the response envelope's Page carries the applied Limit.

Get the positions recorded inside a geofence

GEThttps://api.locantra.de/geofence/pings
Permission geofences.read

Returns the positions recorded inside one geofence over time, newest first. Limit (default 100, maximum 1000) caps the positions returned; the response envelope's Page carries the applied Limit.

List geofences

GEThttps://api.locantra.de/geofences
Permission geofences.read

Lists the geofences of your organisation. Polygon is a GeoJSON MultiPolygon — {"type":"MultiPolygon","coordinates":[…]}, longitude first. A GeoJSON Polygon is accepted on write and read as a MultiPolygon of one. Results are paged with Limit (default 100, maximum 1000) and Offset; the response envelope's Page carries the applied Limit and the Total match count.