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

POST
/logistics/geo/fences
logistics:write0.0000053 tokens

Define a named zone (circle or polygon) for enter/exit detection.

curl
curl -X POST https://api.saasignal.saastemly.com/logistics/geo/fences \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"example"}'
json — 201 Created
{ "status": "ok" }
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)
1–256 chars
type
string
Shape type: circle or polygon. Default circle.
values: circle, polygondefault circle
lat
number
Center latitude for circle geofence (−90 to 90)
range ≥-90 .. ≤90
lng
number
Center longitude for circle geofence (−180 to 180)
range ≥-180 .. ≤180
radius_m
number
Circle radius in meters (1–100,000)
range ≥1 .. ≤100000
polygon
array
Array of [lng, lat] coordinate tuples defining the polygon boundary (3–100 points)
3–100 items
entity_types
string[]
Entity types that trigger this geofence (each 1–64 chars, max 20 types)
max 20 items
metadata
object
Arbitrary key-value metadata
Error responses
401 Unauthorized
402 Insufficient tokens
429 Rate limited

List Geofences

GET
/logistics/geo/fences
logistics:read0.0000008 tokens

List all geofences for the project.

curl
curl https://api.saasignal.saastemly.com/logistics/geo/fences \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
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
values: true, false
limit
integer
Results per page (1–100). Default 25.
range ≥1 .. ≤100default 25
cursor
string
Pagination cursor from previous response
Error responses
401 Unauthorized
402 Insufficient tokens
429 Rate limited

Get Geofence

GET
/logistics/geo/fences/{fence_id}
logistics:read0.0000008 tokens

Retrieve a single geofence.

curl
curl https://api.saasignal.saastemly.com/logistics/geo/fences/{fence_id} \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
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

DELETE
/logistics/geo/fences/{fence_id}
logistics:admin

Permanently removes a geofence.

curl
curl -X DELETE https://api.saasignal.saastemly.com/logistics/geo/fences/{fence_id} \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
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
402 Insufficient tokens
404 Not found
429 Rate limited