Search docs ⌘K
esc
Type to search across all documentation pages
Logistics

Geofences

Define geographic boundaries that trigger events when entities enter or exit. Supports circular and polygon shapes. All routes live under /logistics/* and require a token with logistics:read or logistics:write scope.

Create Geofence

GET
typescript
await ss.logistics.geofences.create({
  name: 'Warehouse A',
  type: 'circle',
  lat: 40.7128, lng: -74.0060,
  radius_m: 500,
})
  1. Open Dashboard and select your project
  2. Go to Geofences in the sidebar
  3. Click Add Geofence and draw a circle or polygon on the map
  4. Name the geofence and click Create
Body field
Type
Description
name required
string
Geofence name (1–256 chars)
type
string
Shape type: circle or polygon. Default circle.
lat
number
Center latitude for circle geofence (−90 to 90)
lng
number
Center longitude for circle geofence (−180 to 180)
radius_m
number
Circle radius in meters (1–100,000)
polygon
array
Array of [lng, lat] coordinate tuples defining the polygon boundary (3–100 points)
entity_types
string[]
Entity types that trigger this geofence (each 1–64 chars, max 20 types)
metadata
object
Arbitrary key-value metadata
Error responses
400 Invalid body (validation error)
401 Unauthorized
402 Insufficient Tokens
403 Forbidden
429 Rate Limited

List Geofences

GET
typescript
const fences = await ss.logistics.geofences.list()
  1. Open Dashboard and select your project
  2. Go to Geofences to see all geofences rendered on the map
Query param
Type
Description
enabled
string
Filter by enabled status: true or false
limit
integer
Results per page (1–100). Default 25.
cursor
string
Pagination cursor from previous response
Error responses
401 Unauthorized
402 Insufficient Tokens
429 Rate Limited

Get Geofence

GET
typescript
const fence = await ss.logistics.geofences.get('fence_abc')
  1. Open Dashboard and select your project
  2. Go to Geofences and click on a geofence to view its shape, triggers, and metadata
Path param
Type
Description
fence_id required
string
Geofence ID
Error responses
401 Unauthorized
402 Insufficient Tokens
404 Not Found
429 Rate Limited

Delete Geofence

GET
typescript
await ss.logistics.geofences.delete('fence_abc')
  1. Open Dashboard and select your project
  2. Go to Geofences and click on the geofence
  3. Click Delete to remove it
Path param
Type
Description
fence_id required
string
Geofence ID to delete
Error responses
401 Unauthorized
403 Forbidden
404 Not Found
429 Rate Limited