What a zone is
A zone is a geographic operational area: a hospital, a city district, a port, a region or a whole country. Each zone of your tenant has its own connectivity state, and wede uses that state to decide how events for the zone are delivered (see Connectivity). You link an event to a zone withmetadata.zone_id set to the zone code. Only zones linked to your tenant are resolved: an event that names another tenant’s zone code is stored without a zone and handled as online.
Zone fields
Who sees which zones
Permissions
An API key or another role that tries to create, update or delete a zone receives
403 forbidden.
List zones
GET /v1/tenant/zones
GET /v1/tenant/zones/:zone_code returns one zone, or 404 not_found.
Create a zone
POST /v1/tenant/zones
Returns
201 with the zone. Missing required fields return 400 validation_error. A tenant can only create new zones: a zone_code that already exists, whoever it belongs to, returns 409 zone_code_taken. A country_admin can only create zones in its assigned countries (403 forbidden otherwise).
Update a zone
PATCH /v1/tenant/zones/:zone_code accepts name, region, lat_center, lng_center, verticals_active, connectivity_state and boundary, and returns the updated zone.
Setting connectivity_state here changes the real state of the zone and sends the same connectivity.degraded and connectivity.restored webhooks as a connectivity report. A change made with a sandbox key only affects the sandbox state. To test state changes without touching the real zone, use a sandbox key with sandbox simulation.
A zone can be shared by several tenants. On a shared zone, a tenant can change only its own connectivity_state and verticals_active; changing name, region, lat_center, lng_center or boundary returns 403 shared_zone.
Remove a zone
DELETE /v1/tenant/zones/:zone_code removes the zone from your tenant and returns 204, or 404 not_found.
