Location zone groups

Zone groups are used to group your location's zones together. For example, a zone group may be a building and each floor is a zone. Use the API to retrieve a list of all zone groups, add new zone groups, and update or delete existing zone groups.

Learn more about zone groups in the OnLocation Help Center.

List all zone groups

Returns a list of all zone groups.

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.

Responses
200

List of zone groups

403

Access denied to resource

404

Resource not found

500

Internal server error

get/zonegroup
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/zonegroup
Response samples
[
  • {
    }
]

Create a zone group

Creates a new zone group.

Request
Request Body schema: application/json

Information to use when creating a new zone group record.

name
string <string>
location_id
integer <int32>
Responses
201

Certification created

403

Access denied to this resource

500

Internal server error

post/zonegroup
Request samples
application/json
{
  • "name": "Main Building",
  • "location_id": 22
}
Response samples
application/json
{
  • "id": 1206,
  • "created": "2021-11-26T14:35:28+13:00",
  • "modifed": "2021-12-31T14:35:28+13:00",
  • "org_id": 81,
  • "location_id": 22,
  • "name": "Main Building"
}

Retrieve a zone group

Retrieves a single zone group, filtering with the provided ID.

Request
path Parameters
id
required
integer <int32>

ID of the zone group to retrieve

Responses
200
403

Access denied to resource

404

Resource not found

500

Internal server error

get/zonegroup/{id}
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/zonegroup/:id
Response samples
{
  • "id": 1206,
  • "created": "2021-11-26T14:35:28+13:00",
  • "modifed": "2021-12-31T14:35:28+13:00",
  • "org_id": 81,
  • "location_id": 22,
  • "name": "Main Building"
}

Update a zone group

Updates the details of a zone group.

Request
path Parameters
id
required
integer <int32>

ID of the zone group to update

Request Body schema: application/json

Information used to create the zone group record

name
string <string>
location_id
integer <int32>
Responses
200

Updated resource

403

Access denied to this resource

500

Internal server error

put/zonegroup/{id}
Request samples
application/json
{
  • "name": "Main Building",
  • "location_id": 22
}
Response samples
{
  • "id": 1206,
  • "created": "2021-11-26T14:35:28+13:00",
  • "modifed": "2021-12-31T14:35:28+13:00",
  • "org_id": 81,
  • "location_id": 22,
  • "name": "Main Building"
}

Delete a zone group

Deletes a zone group using the provided ID.

Request
path Parameters
id
required
integer <int32>

ID of the zone group to delete

Responses
204

Zone group deleted

403

Access denied to resource

404

Resource not found

500

Internal server error

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