Location zones

Zones are used to split your location into specific areas. If you use the Desks and Spaces add-on, you can also create bookable workspaces within each zone. Use the API to retrieve a list of all zones, add new zones, update or delete existing zones, and link zones to access points.

Learn more about zones in the OnLocation Help Center.

List all zones

Returns a list of all zones

A comma separated list of tag:value search parameters, a colon separator performs an exact match, a percent separator performs a starts-with search and greater/less than search number/date ranges.

Request
query Parameters
q
string <string>

Filter by any zone value.

Example: q=spaces>5
Responses
200

List of zones

404

Resource not found

500

Internal server error

get/zone
Request samples
curl -i -X GET \
  'https://api.whosonlocation.com/v1/zone?q=string'
Response samples
[
  • {
    }
]

Create zone

Creates a new zone that can be assigned to a location.

Request
Request Body schema: application/json

Information to use when creating a new zone record.

name
string <string>
location_id
integer <int32>
reference
string <string>
maximum_occupancy
integer <int32>
spaces_enabled
boolean <bool>
spaces
integer <int32>

This is required if spaces are enabled

spaces_title
string <string>

This is required if spaces are enabled

Responses
201

Zone created

403

Access denied to this resource

500

Internal server error

post/zone
Request samples
application/json
{
  • "name": "Meeting room 1",
  • "location_id": 15,
  • "reference": "Large meeting room - seats 20",
  • "maximum_occupancy": 50,
  • "spaces_enabled": true,
  • "spaces": 11,
  • "spaces_title": "Spaces Reference"
}
Response samples
application/json
{
  • "id": 1206,
  • "created": "2021-11-26T14:35:28+13:00",
  • "modified": "2021-12-31T14:35:28+13:00",
  • "location_id": 15,
  • "zone_group_id": 3,
  • "name": "Meeting room 1",
  • "reference": "Large meeting room - seats 20",
  • "status": "Active",
  • "maximum_occupancy": 50,
  • "spaces_enabled": true,
  • "spaces": 11,
  • "spaces_title": "Spaces Reference",
  • "zone_group_name": "Floor 1",
  • "zone_fullname": "Floor 1 - Meeting room 1"
}

Retrieve zone

Retrieves a single zone, filtering with the provided ID.

Request
path Parameters
id
required
integer <int32>

ID of the zone to retrieve

Responses
200
403

Access denied to resource

404

Resource not found

500

Internal server error

get/zone/{id}
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/zone/:id
Response samples
{
  • "id": 1206,
  • "created": "2021-11-26T14:35:28+13:00",
  • "modified": "2021-12-31T14:35:28+13:00",
  • "location_id": 15,
  • "zone_group_id": 3,
  • "name": "Meeting room 1",
  • "reference": "Large meeting room - seats 20",
  • "status": "Active",
  • "maximum_occupancy": 50,
  • "spaces_enabled": true,
  • "spaces": 11,
  • "spaces_title": "Spaces Reference",
  • "zone_group_name": "Floor 1",
  • "zone_fullname": "Floor 1 - Meeting room 1"
}

Update zone

Updates the details of a zone.

Request
path Parameters
id
required
integer <int32>

ID of the zone to update

Request Body schema: application/json

Information used to create the zone record

name
string <string>
location_id
integer <int32>
reference
string <string>
maximum_occupancy
integer <int32>
spaces_enabled
boolean <bool>
spaces
integer <int32>

This is required if spaces are enabled

spaces_title
string <string>

This is required if spaces are enabled

Responses
200

Updated resource

403

Access denied to this resource

500

Internal server error

put/zone/{id}
Request samples
application/json
{
  • "name": "Meeting room 1",
  • "location_id": 15,
  • "reference": "Large meeting room - seats 20",
  • "maximum_occupancy": 50,
  • "spaces_enabled": true,
  • "spaces": 11,
  • "spaces_title": "Spaces Reference"
}
Response samples
{
  • "id": 1206,
  • "created": "2021-11-26T14:35:28+13:00",
  • "modified": "2021-12-31T14:35:28+13:00",
  • "location_id": 15,
  • "zone_group_id": 3,
  • "name": "Meeting room 1",
  • "reference": "Large meeting room - seats 20",
  • "status": "Active",
  • "maximum_occupancy": 50,
  • "spaces_enabled": true,
  • "spaces": 11,
  • "spaces_title": "Spaces Reference",
  • "zone_group_name": "Floor 1",
  • "zone_fullname": "Floor 1 - Meeting room 1"
}

Delete zone

Deletes a zone using the provided ID.

Request
path Parameters
id
required
integer <int32>

ID of the zone to delete

Responses
204

Zone deleted

403

Access denied to resource

404

Resource not found

500

Internal server error

delete/zone/{id}
Request samples
curl -i -X DELETE \
  https://api.whosonlocation.com/v1/zone/:id

Archive zone

Archives a zone. An archived zone cannot be activated again.

Request
path Parameters
id
required
integer <int32>

ID of the zone to update

Responses
200

Updated resource

403

Access denied to this resource

500

Internal server error

put/zone/{id}/archive
Request samples
curl -i -X PUT \
  https://api.whosonlocation.com/v1/zone/:id/archive

Link zone

Links a zone to an access point. Access points are places in your location that people use to sign in or out.

Request
path Parameters
zoneId
required
integer <int32>

ID of the zone to link

accessPointId
required
integer <int32>

ID of the access point to link

Responses
204

Updated resource

403

Access denied to this resource

500

Internal server error

put/zone/{zoneId}/link/{accessPointId}
Request samples
curl -i -X PUT \
  https://api.whosonlocation.com/v1/zone/:zoneId/link/:accessPointId

Unlink zone

Removes the link between a zone and an access point.

Request
path Parameters
zoneId
required
integer <int32>

ID of the zone to unlink

accessPointId
required
integer <int32>

ID of the access point to unlink

Responses
204

Updated resource

403

Access denied to this resource

500

Internal server error

put/zone/{zoneId}/unlink/{accessPointId}
Request samples
curl -i -X PUT \
  https://api.whosonlocation.com/v1/zone/:zoneId/unlink/:accessPointId