Pre-registered visitors

A pre-registered visitor is someone who has been approved by an employee to visit a location. Each visitor is linked to a visit event. Use the pre-registered visitor API to retrieve your pre-registered visitor events list, add a new pre-registered visitor event, or update or delete a pre-registered visitor event.

Learn more about pre-registered visitors in the OnLocation Help Center.

List all pre-registered visitor events

Returns a list of all pre-registered visitors and 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.

Request
query Parameters
q
string <string>

Filter by pre-registered visitor value.

Example: q=location_id:100
Responses
200

List of pre-registered visitors

403

Access denied to this resource.

404

Resource not found

500

Internal server error

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

Create a pre-registered visitor event

Add a new pre-registered visitor event

Request
Request Body schema: application/json
name
string <string>
type
string
Value: "preregister"
location_id
string <string>
staff_id
string <string>
visiting_staff_id
string <string>
event_start
string <string>
event_end
string <string>
Array of objects (VisitorRegisterPersonRequest)
Responses
201

Pre-registered visitor event created

403

Access denied to this resource

500

Internal server error

post/visitor/register
Request samples
application/json
{
  • "name": "Robert Jordan",
  • "type": "preregister",
  • "location_id": 301,
  • "staff_id": 264,
  • "visiting_staff_id": 264,
  • "event_start": "2021-11-30T15:00:00+13:00",
  • "event_end": "2021-11-30T17:00:00+13:00",
  • "visitors": [
    ]
}
Response samples
application/json
{
  • "name": "Robert Jordan",
  • "type": "preregister",
  • "location_id": 301,
  • "staff_id": 264,
  • "visiting_staff_id": 264,
  • "event_start": "2021-11-30T15:00:00+13:00",
  • "event_end": "2021-11-30T17:00:00+13:00",
  • "visitors": [
    ]
}

Retrieve a pre-registered visitor event

Retrieves a single pre-registered visitor, filtering with the provided ID

Request
path Parameters
id
required
integer <int32>
Responses
200

A single pre-registered visitor record

403

Access denied to resource

404

Resource not found

500

Internal server error

get/visitor/register/{id}
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/visitor/register/:id
Response samples
{
  • "id": 1915,
  • "created": "2021-11-29T11:11:25+13:00",
  • "modified": "2021-11-29T11:11:56+13:00",
  • "location_id": 301,
  • "created_staff_id": 823431,
  • "visiting_staff_id": 823431,
  • "event_start": "2021-11-30T15:00:00+13:00",
  • "event_end": "2021-11-30T17:00:00+13:00",
  • "name": "Visitor Registor Name",
  • "visiting_staff_name": "Jane Doe",
  • "location_name": "Head Office",
  • "visitors": [
    ],
  • "type": "preregister"
}

Update a pre-registered visitor event

Updates the specified pre-registered visitor event

Request
path Parameters
id
required
integer <int32>

ID of the pre-registered visitor event to update

Request Body schema: application/json

Information used to create the pre-registered visitor event record

name
string <string>
type
string
Value: "preregister"
location_id
string <string>
staff_id
string <string>
visiting_staff_id
string <string>
event_start
string <string>
event_end
string <string>
Array of objects (VisitorRegisterPersonRequest)
Responses
204

Updated pre-registered visitor event

403

Access denied to this resource

500

Internal server error

put/visitor/register/{id}
Request samples
application/json
{
  • "name": "Robert Jordan",
  • "type": "preregister",
  • "location_id": 301,
  • "staff_id": 264,
  • "visiting_staff_id": 264,
  • "event_start": "2021-11-30T15:00:00+13:00",
  • "event_end": "2021-11-30T17:00:00+13:00",
  • "visitors": [
    ]
}

Delete a pre-registered visitor event

Removes the specified pre-registered visitor event.

Request
path Parameters
id
required
integer <int32>
Responses
204

Pre-registered visitor event deleted

403

Access denied to resource

404

Resource not found

500

Internal server error

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