Visitor groups

Each visitor group is created by an employee and includes a set of their visitors who are pre-registered to attend the same events. Use the visitor group API to retrieve your visitor group list, add a new visitor group, or update or delete a visitor group.

Learn more about visitor groups in the OnLocation Help Center.

List all visitor groups

Returns a list of all visitor groups added by employees.

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 visitor group value.

Example: q=staff_id:100
Responses
200

List of registered visitor groups

403

Access denied to this resource

404

Resource not found

500

Internal server error

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

Create a visitor group

Create a new visitor group and assign it the the relevant employee and location.

Request
Request Body schema: application/json

Data used to create a new visitor group:

name
required
integer <int32>
description
string <string>
location_id
required
integer <int32>
staff_id
required
integer <int32>
Responses
201

Group created

403

Access denied to this resource

500

Internal server error

post/visitor/group
Request samples
application/json
{
  • "name": "Updated visitor group name",
  • "description": "Group description",
  • "location_id": 301,
  • "staff_id": 556
}
Response samples
{
  • "id": 197,
  • "created": "2021-11-29T10:58:12+13:00",
  • "modified": "2021-11-29T13:58:12+13:00",
  • "location_id": 301,
  • "created_staff_id": 823,
  • "staff_id": 823,
  • "name": "Visitor Group 1",
  • "description": "Group 1 description",
  • "members": 2
}

Retrieve a visitor group

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

Request
path Parameters
id
required
integer <int32>

ID of the registered visitor group to retrieve

Responses
200

Group returned

403

Access denied to resource

404

Resource not found

500

Internal server error

get/visitor/group/{id}
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/visitor/group/:id
Response samples
{
  • "id": 197,
  • "created": "2021-11-29T10:58:12+13:00",
  • "modified": "2021-11-29T13:58:12+13:00",
  • "location_id": 301,
  • "created_staff_id": 823,
  • "staff_id": 823,
  • "name": "Visitor Group 1",
  • "description": "Group 1 description",
  • "members": 2
}

Update a visitor group

Updates the specified visitor group based on the provided ID.

Request
path Parameters
id
required
integer <int32>

ID of the registered visitor group to update

Request Body schema: application/json

Information used to update the visitor group record:

name
required
integer <int32>
description
string <string>
location_id
required
integer <int32>
staff_id
required
integer <int32>
Responses
204

Updated group

403

Access denied to this resource

500

Internal server error

put/visitor/group/{id}
Request samples
application/json
{
  • "name": "Updated visitor group name",
  • "description": "Group description",
  • "location_id": 301,
  • "staff_id": 556
}

Delete a visitor group

Deletes the specified visitor group.

Request
path Parameters
id
required
integer <int32>

ID of the registered visitor group to delete

Responses
204

Visitor group deleted

403

Access denied to resource

404

Resource not found

500

Internal server error

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