Logistics
ETA Fences
Define destination points with time thresholds. Receive breach/cleared webhooks when a tracked entity's estimated driving time drops below the configured threshold.
Create ETA Fence
POST
/logistics/geo/eta-fences
Define a destination point and time threshold. When a tracked entity's driving ETA drops below the threshold, a logistics.eta_fence.breach webhook fires.
curl
curl -X POST https://api.saasignal.saastemly.com/logistics/geo/eta-fences \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"name":"example","dest_lat":1,"dest_lng":1,"threshold_min":1}'
json — 201 Created
{ "status": "ok" }
typescript
await ss.logistics.etaFences.create({
name: 'Depot Arrival',
dest_lat: 40.7128, dest_lng: -74.0060,
threshold_min: 30,
avg_speed_kmh: 50,
})
- Open Dashboard and select your project
- Go to ETA Fences in the sidebar
- Click Create ETA Fence and set the destination, threshold, and speed
- Click on the map to set the destination point, then click Create
Body field
Type
Description
name requiredstring
ETA fence name (1–256 chars)
1–256 chars
dest_lat requirednumber
Destination latitude (−90 to 90)
range ≥-90 .. ≤90
dest_lng requirednumber
Destination longitude (−180 to 180)
range ≥-180 .. ≤180
threshold_min requirednumber
ETA threshold in minutes (0.5–1440). A
breach webhook fires when driving ETA drops below this value.range ≥0.5 .. ≤1440
entity_typesstring[]
Entity types to monitor (each 1–64 chars, max 20). Null matches all types.
max 20 items
avg_speed_kmhnumber
Assumed average speed for heuristic ETA (1–300 km/h). Default
40.range ≥1 .. ≤300default
40heuristic_multipliernumber
Multiplier applied to threshold for heuristic pre-filter (1–5). Default
1.5.range ≥1 .. ≤5default
1.5metadataobject
Arbitrary key-value metadata (max 8 KB)
Error responses
401 Unauthorized
402 Insufficient tokens
429 Rate limited
List ETA Fences
GET
/logistics/geo/eta-fences
List all ETA fences for the project.
curl
curl https://api.saasignal.saastemly.com/logistics/geo/eta-fences \
-H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
const fences = await ss.logistics.etaFences.list()
- Open Dashboard and select your project
- Go to ETA Fences to see all ETA fences with their destinations 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 ETA Fence
GET
/logistics/geo/eta-fences/{fence_id}
Retrieve a single ETA fence.
curl
curl https://api.saasignal.saastemly.com/logistics/geo/eta-fences/{fence_id} \
-H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
const fence = await ss.logistics.etaFences.get('etaf_abc')
- Open Dashboard and select your project
- Go to ETA Fences and click on a fence to view its destination, threshold, and metadata
Path param
Type
Description
fence_id requiredstring
ETA fence ID
Error responses
401 Unauthorized
402 Insufficient tokens
404 Not found
429 Rate limited
Delete ETA Fence
DELETE
/logistics/geo/eta-fences/{fence_id}
Permanently removes an ETA fence.
curl
curl -X DELETE https://api.saasignal.saastemly.com/logistics/geo/eta-fences/{fence_id} \
-H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
await ss.logistics.etaFences.delete('etaf_abc')
- Open Dashboard and select your project
- Go to ETA Fences and click the delete icon on the fence
Path param
Type
Description
fence_id requiredstring
ETA fence ID to delete
Error responses
401 Unauthorized
402 Insufficient tokens
404 Not found
429 Rate limited