Search docs ⌘K
esc
Type to search across all documentation pages
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
logistics:write0.0000053 tokens

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,
})
  1. Open Dashboard and select your project
  2. Go to ETA Fences in the sidebar
  3. Click Create ETA Fence and set the destination, threshold, and speed
  4. Click on the map to set the destination point, then click Create
Body field
Type
Description
name required
string
ETA fence name (1–256 chars)
1–256 chars
dest_lat required
number
Destination latitude (−90 to 90)
range ≥-90 .. ≤90
dest_lng required
number
Destination longitude (−180 to 180)
range ≥-180 .. ≤180
threshold_min required
number
ETA threshold in minutes (0.5–1440). A breach webhook fires when driving ETA drops below this value.
range ≥0.5 .. ≤1440
entity_types
string[]
Entity types to monitor (each 1–64 chars, max 20). Null matches all types.
max 20 items
avg_speed_kmh
number
Assumed average speed for heuristic ETA (1–300 km/h). Default 40.
range ≥1 .. ≤300default 40
heuristic_multiplier
number
Multiplier applied to threshold for heuristic pre-filter (1–5). Default 1.5.
range ≥1 .. ≤5default 1.5
metadata
object
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
logistics:read0.0000008 tokens

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()
  1. Open Dashboard and select your project
  2. Go to ETA Fences to see all ETA fences with their destinations 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 ETA Fence

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

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')
  1. Open Dashboard and select your project
  2. Go to ETA Fences and click on a fence to view its destination, threshold, and metadata
Path param
Type
Description
fence_id required
string
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}
logistics:admin

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')
  1. Open Dashboard and select your project
  2. Go to ETA Fences and click the delete icon on the fence
Path param
Type
Description
fence_id required
string
ETA fence ID to delete
Error responses
401 Unauthorized
402 Insufficient tokens
404 Not found
429 Rate limited