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

GET
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)
dest_lat required
number
Destination latitude (−90 to 90)
dest_lng required
number
Destination longitude (−180 to 180)
threshold_min required
number
ETA threshold in minutes (0.5–1440). A breach webhook fires when driving ETA drops below this value.
entity_types
string[]
Entity types to monitor (each 1–64 chars, max 20). Null matches all types.
avg_speed_kmh
number
Assumed average speed for heuristic ETA (1–300 km/h). Default 40.
heuristic_multiplier
number
Multiplier applied to threshold for heuristic pre-filter (1–5). Default 1.5.
metadata
object
Arbitrary key-value metadata (max 8 KB)
Error responses
400 Invalid body or max 50 ETA fences per project
401 Unauthorized
402 Insufficient Tokens
403 Forbidden
429 Rate Limited

List ETA Fences

GET
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
limit
integer
Results per page (1–100). Default 25.
cursor
string
Pagination cursor from previous response
Error responses
401 Unauthorized
402 Insufficient Tokens
429 Rate Limited

Get ETA Fence

GET
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

GET
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
403 Forbidden
404 Not Found
429 Rate Limited