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,
})
- 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)
dest_lat requirednumber
Destination latitude (−90 to 90)
dest_lng requirednumber
Destination longitude (−180 to 180)
threshold_min requirednumber
ETA threshold in minutes (0.5–1440). A
breach webhook fires when driving ETA drops below this value.entity_typesstring[]
Entity types to monitor (each 1–64 chars, max 20). Null matches all types.
avg_speed_kmhnumber
Assumed average speed for heuristic ETA (1–300 km/h). Default
40.heuristic_multipliernumber
Multiplier applied to threshold for heuristic pre-filter (1–5). Default
1.5.metadataobject
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()
- 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 falselimitinteger
Results per page (1–100). Default
25.cursorstring
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')
- 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
GET
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
403 Forbidden
404 Not Found
429 Rate Limited