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
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,
})
- 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)
1–256 chars
typestring
Shape type:
circle or polygon. Default circle.values:
circle, polygondefault circlelatnumber
Center latitude for circle geofence (−90 to 90)
range ≥-90 .. ≤90
lngnumber
Center longitude for circle geofence (−180 to 180)
range ≥-180 .. ≤180
radius_mnumber
Circle radius in meters (1–100,000)
range ≥1 .. ≤100000
polygonarray
Array of
[lng, lat] coordinate tuples defining the polygon boundary (3–100 points)3–100 items
entity_typesstring[]
Entity types that trigger this geofence (each 1–64 chars, max 20 types)
max 20 items
metadataobject
Arbitrary key-value metadata
Error responses
401 Unauthorized
402 Insufficient tokens
429 Rate limited
List Geofences
GET
/logistics/geo/fences
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()
- 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 falsevalues:
true, falselimitinteger
Results per page (1–100). Default
25.range ≥1 .. ≤100default
25cursorstring
Pagination cursor from previous response
Error responses
401 Unauthorized
402 Insufficient tokens
429 Rate limited
Get Geofence
GET
/logistics/geo/fences/{fence_id}
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')
- 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
DELETE
/logistics/geo/fences/{fence_id}
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')
- 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
402 Insufficient tokens
404 Not found
429 Rate limited