linxio-js
SDK Reference

Geofences

Area and area-group lifecycle methods, including create, update, archive, restore, and delete.

Note

Linxio calls geofences areas in the REST API.

This SDK uses linxio.geofences to make that domain clearer.

geofences.list()

GET

List geofences

/areaslinxio.geofences.list(params)

Loads one page of geofence areas.

Important

If your tenant has many complicated geofences, or many geofence areas, the API can return extremely large response payloads. Consider whether using geofences.list() in production implementations is appropriate for your use case.

Input

object
optional
Object parameter. Expand to see child parameters.
Show child parameters
number
optional
Number of geofences to request.
number
optional
Page number to request.
Default: 1
string
optional
Sort expression accepted by Linxio.
string[]
optional
Optional field projection.

Returns

optional
Geofence records for the requested page.
Show child fields
string | null
optional
Display color.
optional
Polygon/polyline/rectangle coordinates.
LinxioId
required
Geofence identifier.
string
required
Geofence display name.
number | null
optional
Circle radius when the geofence is circular.
GeofenceType
optional
Geofence shape type.
Possible enum values
circle

Circular geofence.

polygon

Polygon geofence.

polyline

Polyline geofence.

rectangle

Rectangular geofence.

optional
Pagination metadata.
Show child fields
number
required
Page size.
number
required
Current page number.
number
required
Total matching record count.
optional
Typed SDK error when the page fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.iterate()

GET

Load all geofences

/areaslinxio.geofences.iterate(params)

Auto-paginates geofence pages into one result object.

Important

If your tenant has many complicated geofences, or many geofence areas, the API can return extremely large response payloads. Avoid using geofences.iterate() in production implementations.

Input

Same parameters as geofences.list().
Show child parameters
string[]
optional
Optional geofence field projection accepted by Linxio.
number
optional
Maximum records to request per page.
number
optional
Page number to request.
Default: 1
string
optional
Sort expression accepted by Linxio for that endpoint.
QueryValue
optional
Additional endpoint-specific filters forwarded as query parameters.

Returns

optional
Flat array containing every loaded geofence.
Show child fields
string | null
optional
Display color.
optional
Polygon/polyline/rectangle coordinates.
LinxioId
required
Geofence identifier.
string
required
Geofence display name.
number | null
optional
Circle radius when the geofence is circular.
GeofenceType
optional
Geofence shape type.
Possible enum values
circle

Circular geofence.

polygon

Polygon geofence.

polyline

Polyline geofence.

rectangle

Rectangular geofence.

optional
Typed SDK error if any page fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.stream()

GET

Stream geofences

/areaslinxio.geofences.stream(params)

Streams geofences lazily across pages.

Input

Same parameters as geofences.list().
Show child parameters
string[]
optional
Optional geofence field projection accepted by Linxio.
number
optional
Maximum records to request per page.
number
optional
Page number to request.
Default: 1
string
optional
Sort expression accepted by Linxio for that endpoint.
QueryValue
optional
Additional endpoint-specific filters forwarded as query parameters.

Returns

optional
One geofence at a time.
Show child fields
string | null
optional
Display color.
optional
Polygon/polyline/rectangle coordinates.
LinxioId
required
Geofence identifier.
string
required
Geofence display name.
number | null
optional
Circle radius when the geofence is circular.
GeofenceType
optional
Geofence shape type.
Possible enum values
circle

Circular geofence.

polygon

Polygon geofence.

polyline

Polyline geofence.

rectangle

Rectangular geofence.

optional
Thrown if a page request fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.get()

GET

Get a geofence

/areas/{areaId}linxio.geofences.get(areaId)

Fetches one geofence by Linxio area ID.

Input

LinxioId
required
Geofence area identifier.

Returns

optional
Geofence record.
Show child fields
string | null
optional
Display color.
optional
Polygon/polyline/rectangle coordinates.
LinxioId
required
Geofence identifier.
string
required
Geofence display name.
number | null
optional
Circle radius when the geofence is circular.
GeofenceType
optional
Geofence shape type.
Possible enum values
circle

Circular geofence.

polygon

Polygon geofence.

polyline

Polyline geofence.

rectangle

Rectangular geofence.

optional
Typed SDK error when the geofence cannot be loaded.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.create()

POST

Create a geofence

/areaslinxio.geofences.create(payload)

Creates a geofence area.

Input

object
optional
Object parameter. Expand to see child parameters.
Show child parameters
string
required
Display name.
GeofenceType
required
Geometry type.
Possible enum values
circle

Circular geofence.

polygon

Polygon geofence.

polyline

Polyline geofence.

rectangle

Rectangular geofence.

optional
Geometry coordinates. Circles typically use one centre point.
number
optional
Radius in metres for circle geofences.
string
optional
Display colour accepted by Linxio.

Returns

optional
Created geofence.
Show child fields
string | null
optional
Display color.
optional
Polygon/polyline/rectangle coordinates.
LinxioId
required
Geofence identifier.
string
required
Geofence display name.
number | null
optional
Circle radius when the geofence is circular.
GeofenceType
optional
Geofence shape type.
Possible enum values
circle

Circular geofence.

polygon

Polygon geofence.

polyline

Polyline geofence.

rectangle

Rectangular geofence.

optional
Typed SDK error when creation fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.update()

PATCH

Update a geofence

/areas/{areaId}linxio.geofences.update(areaId, payload)

Updates a geofence area.

Input

LinxioId
required
Geofence area identifier.
required
Partial geofence payload containing fields to change.
Show child parameters
string
optional
Display color.
optional
Polygon/polyline/rectangle coordinates.
string
required
Geofence display name.
number
optional
Circle radius.
GeofenceType
required
Geofence shape type.
Possible enum values
circle

Circular geofence.

polygon

Polygon geofence.

polyline

Polyline geofence.

rectangle

Rectangular geofence.

Returns

optional
Updated geofence.
Show child fields
string | null
optional
Display color.
optional
Polygon/polyline/rectangle coordinates.
LinxioId
required
Geofence identifier.
string
required
Geofence display name.
number | null
optional
Circle radius when the geofence is circular.
GeofenceType
optional
Geofence shape type.
Possible enum values
circle

Circular geofence.

polygon

Polygon geofence.

polyline

Polyline geofence.

rectangle

Rectangular geofence.

optional
Typed SDK error when update fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.archive()

PATCH

Archive a geofence

/areas/{areaId}/archivelinxio.geofences.archive(areaId)

Soft-archives a geofence area.

Input

LinxioId
required
Geofence area identifier.

Returns

void
optional
Undefined on success.
optional
Typed SDK error when archive fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.restore()

PATCH

Restore a geofence

/areas/{areaId}/restorelinxio.geofences.restore(areaId)

Restores a previously archived geofence area.

Input

LinxioId
required
Archived geofence area identifier.

Returns

void
optional
Undefined on success.
optional
Typed SDK error when restore fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.delete()

DELETE

Delete a geofence

/areas/{areaId}linxio.geofences.delete(areaId)

Permanently deletes a geofence area. Use archive() instead when you need a reversible operation.

Input

LinxioId
required
Geofence area identifier.

Returns

void
optional
Undefined on success.
optional
Typed SDK error when delete fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.listGroups()

GET

List geofence groups

/area-groupslinxio.geofences.listGroups()

Lists area groups.

Input

void
optional
listGroups() does not take parameters.

Returns

optional
Area group records.
Show child fields
LinxioId
required
Area-group identifier.
string
required
Area-group display name.
optional
Typed SDK error when groups cannot be loaded.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.getGroup()

GET

Get a geofence group

/area-groups/{groupId}linxio.geofences.getGroup(groupId)

Fetches one area group by ID.

Input

LinxioId
required
Area group identifier.

Returns

optional
Area group record.
Show child fields
LinxioId
required
Area-group identifier.
string
required
Area-group display name.
optional
Typed SDK error when the group cannot be loaded.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.createGroup()

POST

Create a geofence group

/area-groupslinxio.geofences.createGroup(payload)

Creates an area group.

Input

object
optional
Object parameter. Expand to see child parameters.
Show child parameters
string
required
Area group display name.

Returns

optional
Created area group.
Show child fields
LinxioId
required
Area-group identifier.
string
required
Area-group display name.
optional
Typed SDK error when group creation fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.updateGroup()

PATCH

Update a geofence group

/area-groups/{groupId}linxio.geofences.updateGroup(groupId, payload)

Updates an area group.

Input

LinxioId
required
Area group identifier.
object
optional
Object parameter. Expand to see child parameters.
Show child parameters
string
optional
New group name.

Returns

optional
Updated area group.
Show child fields
LinxioId
required
Area-group identifier.
string
required
Area-group display name.
optional
Typed SDK error when group update fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.archiveGroup()

PATCH

Archive a geofence group

/area-groups/{groupId}/archivelinxio.geofences.archiveGroup(groupId)

Soft-archives an area group.

Input

LinxioId
required
Area group identifier.

Returns

void
optional
Undefined on success.
optional
Typed SDK error when group archive fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.restoreGroup()

PATCH

Restore a geofence group

/area-groups/{groupId}/restorelinxio.geofences.restoreGroup(groupId)

Restores a previously archived area group.

Input

LinxioId
required
Archived area group identifier.

Returns

void
optional
Undefined on success.
optional
Typed SDK error when group restore fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

geofences.deleteGroup()

DELETE

Delete a geofence group

/area-groups/{groupId}linxio.geofences.deleteGroup(groupId)

Permanently deletes an area group. Prefer archiveGroup() when the action should be reversible.

Input

LinxioId
required
Area group identifier.

Returns

void
optional
Undefined on success.
optional
Typed SDK error when group delete fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

On this page