Employee movements

Each time an employee signs in or out, or moves between zones, they create a movement. Use the API to return all employee movements, or add or update a movement record.

List all employee movements

Retrieves a list of all employee sign in/sign out events.

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 employee movement.

Example: q=staff_id:1234
order
string <string>

Order by any element returned, prefix with a - to reverse order.

Example: order=staff_id
limit
integer <int32>

Limits the amount of records to return.

Example: limit=10
header Parameters
If-Modified-Since
string <int32>

A UTC timestamp (yyyy-mm-ddThh:mm:ss). Only entities created or modified since this timestamp will be returned e.g. 2009-11-12T00:00:00

Responses
200

List of staff movement records

403

Access denied to this resource

404

Resource not found

500

Internal server error

get/staff/movement
Request samples
curl -i -X GET \
  'https://api.whosonlocation.com/v1/staff/movement?q=string&order=string&limit=0' \
  -H 'If-Modified-Since: string'
Response samples
[
  • {
    }
]

Create or update an employee movement

Creates or updates an employee movement record.

Request
Request Body schema: application/json

Data required to create or update an employee movement:

onsite_status
required
string
Enum: "onsite" "offsite"
location_id
required
integer <int32>
location
string <string>
staff_id
required
integer <int32>
lacp_id
integer <int32>
zone_id
integer <int32>
remote
boolean <boolean>
changed_at
string <date-time>
print_kiosk_id
integer <int32>

ID of the kiosk which has shared badge pass printing enabled. Not mandatory.

Responses
200

Updated movement

403

Access denied to this resource

500

Internal server error

put/staff/movement
Request samples
application/json
{
  • "onsite_status": "onsite",
  • "location_id": 38,
  • "location": "Head Office",
  • "staff_id": 201,
  • "lacp_id": 201,
  • "zone_id": 201,
  • "remote": false,
  • "changed_at": "2021-11-25 22:01:09",
  • "print_kiosk_id": 301
}
Response samples
{
  • "id": 167503,
  • "created": "2021-09-09T12:52:31+12:00",
  • "modified": "2021-09-09T13:52:31+12:00",
  • "location_id": 301,
  • "staff_id": 823431,
  • "signed_in": "2021-09-09T12:52:31+12:00",
  • "signed_out": "2021-09-09T14:52:31+12:00",
  • "mode_in": "Sign In/Out Manager",
  • "mode_out": "Sign In/Out Manager",
  • "signed_in_by": 823431,
  • "signed_out_by": 823431,
  • "scanned_in": "string",
  • "scanned_out": "string",
  • "expected": true,
  • "assistance": false,
  • "accessdenied": false,
  • "loneworker": true,
  • "so_staff_id": 584,
  • "zone_id": 8,
  • "interzone": true,
  • "remote": false,
  • "name": "Harold Brunning",
  • "title": "Mr",
  • "email": "staff.movement@whosonlocation.com",
  • "mobile": "+1 206 555 0123",
  • "phone": "+1 206 555 0123",
  • "lacp_in_name": "Ground floor entry",
  • "lacp_out_name": "Ground floor entry",
  • "signed_in_lat": "Latitude-value of coordinates for sign-in (Decimal Degrees)",
  • "signed_in_lon": "Longitude-value of coordinates for sign-in (Decimal Degrees)",
  • "signed_in_accuracy": "Precision for sign-in coordinates",
  • "signed_out_lat": "Latitude-value of coordinates for sign-out (Decimal Degrees)",
  • "signed_out_lon": "Longitude-value of coordinates for sign-out (Decimal Degrees)",
  • "signed_out_accuracy": "Precision for sign-out coordinates"
}

Retrieve an employee movement

Retrieves a single employee movement record, filtering with the provided ID.

Request
path Parameters
id
required
integer <int32>

ID of the employee movement record to retrieve

Responses
200

A staff movement record

403

Access denied to resource

404

Resource not found

500

Internal server error

get/staff/movement/{id}
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/staff/movement/:id
Response samples
{
  • "id": 167503,
  • "created": "2021-09-09T12:52:31+12:00",
  • "modified": "2021-09-09T13:52:31+12:00",
  • "location_id": 301,
  • "staff_id": 823431,
  • "signed_in": "2021-09-09T12:52:31+12:00",
  • "signed_out": "2021-09-09T14:52:31+12:00",
  • "mode_in": "Sign In/Out Manager",
  • "mode_out": "Sign In/Out Manager",
  • "signed_in_by": 823431,
  • "signed_out_by": 823431,
  • "scanned_in": "string",
  • "scanned_out": "string",
  • "expected": true,
  • "assistance": false,
  • "accessdenied": false,
  • "loneworker": true,
  • "so_staff_id": 584,
  • "zone_id": 8,
  • "interzone": true,
  • "remote": false,
  • "name": "Harold Brunning",
  • "title": "Mr",
  • "email": "staff.movement@whosonlocation.com",
  • "mobile": "+1 206 555 0123",
  • "phone": "+1 206 555 0123",
  • "lacp_in_name": "Ground floor entry",
  • "lacp_out_name": "Ground floor entry",
  • "signed_in_lat": "Latitude-value of coordinates for sign-in (Decimal Degrees)",
  • "signed_in_lon": "Longitude-value of coordinates for sign-in (Decimal Degrees)",
  • "signed_in_accuracy": "Precision for sign-in coordinates",
  • "signed_out_lat": "Latitude-value of coordinates for sign-out (Decimal Degrees)",
  • "signed_out_lon": "Longitude-value of coordinates for sign-out (Decimal Degrees)",
  • "signed_out_accuracy": "Precision for sign-out coordinates"
}