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,
})
- Open Dashboard and select your project
- Go to Geofences in the sidebar
- Click Add Geofence and draw a circle or polygon on the map
- Name the geofence and click Create
Body field
Type
Description
name requiredstring
Geofence name (1–256 chars)
typestring
Shape type:
circle or polygon. Default circle.latnumber
Center latitude for circle geofence (−90 to 90)
lngnumber
Center longitude for circle geofence (−180 to 180)
radius_mnumber
Circle radius in meters (1–100,000)
polygonarray
Array of
[lng, lat] coordinate tuples defining the polygon boundary (3–100 points)entity_typesstring[]
Entity types that trigger this geofence (each 1–64 chars, max 20 types)
metadataobject
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()
- Open Dashboard and select your project
- Go to Geofences to see all geofences rendered on the map
Query param
Type
Description
enabledstring
Filter by enabled status:
true or falselimitinteger
Results per page (1–100). Default
25.cursorstring
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')
- Open Dashboard and select your project
- Go to Geofences and click on a geofence to view its shape, triggers, and metadata
Path param
Type
Description
fence_id requiredstring
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')
- Open Dashboard and select your project
- Go to Geofences and click on the geofence
- Click Delete to remove it
Path param
Type
Description
fence_id requiredstring
Geofence ID to delete
Error responses
401 Unauthorized
403 Forbidden
404 Not Found
429 Rate Limited