Zones
The Zone object
idstringoptionalPublic zone identifier.
namestringoptionalZone display name.
descriptionstringoptionalZone description.
centerobjectoptionalCenter point for the zone.
borderobjectoptionalZone border geometry.
colorstringoptionalFill color used when rendering the zone.
stroke_colorstringoptionalStroke color used when rendering the zone.
statusstringoptionalZone status.
updated_attimestampoptionalTimestamp when the zone was last updated.
created_attimestampoptionalTimestamp when the zone was created.
{
"id": "zone_7YqM3KpL2n",
"name": "Downtown",
"description": "Downtown delivery zone",
"center": {
"latitude": 1.3521,
"longitude": 103.8198
},
"border": [],
"color": "#1f78ff",
"stroke_color": "#0b4fc4",
"status": "active",
"updated_at": "2026-05-07T08:30:00.000000Z",
"created_at": "2026-05-07T08:30:00.000000Z"
}/v1/zonesCreate a Zone
Creates a zone inside a service area. Provide either a GeoJSON boundary or a center point with radius, and Fleetbase will store the zone for geofencing and service coverage checks.
namestringrequiredZone display name.
service_areastringrequiredService area ID the zone belongs to.
borderobjectoptionalZone polygon border. Required on create unless a point location or latitude/longitude is supplied.
locationobjectoptionalResolvable point used to create a circular zone.
latitudenumberoptionalDecimal latitude for a circular zone. Required with longitude.
longitudenumberoptionalDecimal longitude for a circular zone. Required with latitude.
radiusnumberoptionalDefault: 500Radius in meters when creating a circular zone.
descriptionstringoptionalZone description.
colorstringoptionalFill color used when rendering the zone.
stroke_colorstringoptionalStroke color used when rendering the zone.
statusenumoptionalZone status. One of active, inactive.
trigger_on_entrybooleanoptionalWhether entering this zone should trigger geofence events.
trigger_on_exitbooleanoptionalWhether exiting this zone should trigger geofence events.
dwell_threshold_minutesintegeroptionalMinutes inside the zone before dwell behavior is triggered.
speed_limit_kmhintegeroptionalSpeed limit in kilometers per hour for geofence events.
/v1/zonescurl -X POST https://api.fleetbase.io/v1/zones \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{
"name": "Center of Singapore",
"service_area": "{{service_area_id}}",
"color":"#66e0ff",
"stroke_color":"#00bfff",
"border": {
"type":"Polygon",
"bbox":[103.867493,1.35085,103.912125,1.383113],
"coordinates":[
[
[103.907661,1.362863],
[103.892555,1.357714],
[103.891525,1.353252],
[103.883629,1.35085],
[103.874702,1.351193],
[103.870583,1.358744],
[103.867493,1.368354],
[103.870926,1.377621],
[103.875732,1.38174],
[103.886032,1.383113],
[103.900452,1.383113],
[103.909721,1.381397],
[103.912125,1.374189],
[103.907661,1.362863]
]
]
}
}'{
"id": "<string>",
"service_area": "<string>",
"name": "<string>",
"description": "<string>",
"coordinates": "<string>",
"color": "<string>",
"stroke_color": "<string>",
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}/v1/zones/:idRetrieve a zone
Retrieves a single zone by ID. The response includes the zone geometry, display styling, and service area relationship.
/v1/zones/:idcurl https://api.fleetbase.io/v1/zones/:id \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"{
"id": "zone_bm37E57",
"name": "Center of Singapore",
"description": "<string>",
"coordinates": [],
"color": "<string>",
"stroke_color": "<string>",
"status": "active",
"service_area": null,
"updated_at": "2024-01-02T05:54:57.000000Z",
"created_at": "2024-01-02T05:54:57.000000Z"
}/v1/zonesQuery Zones
Returns zones matching the supplied filters. Use this to find configured geofences by name or other query parameters.
querystringoptionalSearch term matched against zone fields.
limitintegeroptionalMaximum number of zones to return.
offsetintegeroptionalNumber of zones to skip before returning results.
sortstringoptionalSort expression for the zone query.
service_areastringoptionalFilters zones by service area ID.
/v1/zonescurl https://api.fleetbase.io/v1/zones?name={{zone_name}} \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"{
"id": "<string>",
"service_area": "<string>",
"name": "<string>",
"description": "<string>",
"coordinates": "<string>",
"color": "<string>",
"stroke_color": "<string>",
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}/v1/zones/:idUpdate a Zone
You can update all properties of the Zone.
namestringoptionalZone display name.
service_areastringoptionalService area ID the zone belongs to.
borderobjectoptionalZone polygon border.
locationobjectoptionalResolvable point used to create a circular zone.
latitudenumberoptionalDecimal latitude for a circular zone. Required with longitude.
longitudenumberoptionalDecimal longitude for a circular zone. Required with latitude.
radiusnumberoptionalDefault: 500Radius in meters when updating a circular zone.
descriptionstringoptionalZone description.
colorstringoptionalFill color used when rendering the zone.
stroke_colorstringoptionalStroke color used when rendering the zone.
statusenumoptionalZone status. One of active, inactive.
trigger_on_entrybooleanoptionalWhether entering this zone should trigger geofence events.
trigger_on_exitbooleanoptionalWhether exiting this zone should trigger geofence events.
dwell_threshold_minutesintegeroptionalMinutes inside the zone before dwell behavior is triggered.
speed_limit_kmhintegeroptionalSpeed limit in kilometers per hour for geofence events.
/v1/zones/:idcurl -X PUT https://api.fleetbase.io/v1/zones/:id \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"color": "#ff00000"
}'{
"id": "<string>",
"service_area": "<string>",
"name": "<string>",
"description": "<string>",
"coordinates": "<string>",
"color": "<string>",
"stroke_color": "<string>",
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}/v1/zones/:idDelete a Zone
Use this endpoint to delete a zone.
/v1/zones/:idcurl -X DELETE https://api.fleetbase.io/v1/zones/:id \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"{
"deleted": "<boolean>",
"id": "<string>"
}