Contractor member movements

Each time a contractor signs in or out, they create a movement. Use the API to return all contractor member movements, or add or update a movement record.

List all member movements

Retrieves a list of contractor movement records. If an 'id' query parameter is supplied it will return a single contractor movement record.

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
integer <int32>

ID of the contractor movement to retrieve

Example: q=sp_member_id:123456
order
string <string>

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

Example: order=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 contractor movement records

403

Access denied to this resource

404

Resource not found

500

Internal server error

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

Update a member movement

Creates or updates a contractor movement record.

Request
query Parameters
sp_member_id
required
integer <int32>

ID of the contractor. This can be supplied as either a query parameter or as part of the request body.

Request Body schema: application/json

Information used to update the contractor movement record

onsite_status
required
string <string>

Describes whether the movement is 'onsite' or 'offsite', if set to onsite the 'scanned_out' field is unset

location_id
required
integer <int32>
sp_member_id
required
integer <int32>
sp_org_id
required
integer <int32>
print_kiosk_id
integer <int32>

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

lacp_id
integer <int32>

Location access point ID. Not mandatory.

zone_id
integer <int32>

ID of the zone being signed into. Not mandatory.

zone_other
string <string>

Zone note for this movement. Not mandatory

scanned_in
string <string>

Scanned in note. Only set when onsite_status = 'onsite'. Not mandatory.

scanned_out
string <string>

Scanned out note. Only set when onsite_status = 'offsite', gets unset when onsite_status = 'onsite'. Not mandatory.

visiting_staff_id
integer <int32>

ID of staff member being visited. Not mandatory.

cardnumber
string <string>

Sign in card number. Not mandatory.

carpark_question
boolean <boolean>

Can be set as either 1/0 or true/false. Not mandatory.

carpark_registration
string <string>

Vehicle registration. Not mandatory.

carpark_number
string <string>

Carpark number. Not mandatory.

pass
integer <int32>

Not mandatory

other_pass
string <string>

Any other pass that might need to be submitted. Not mandatory.

sp_purpose
string <string>

Reason for contractor visit. Not mandatory.

assistance
boolean <boolean>

Whether or not a contractor requires assistance. Not mandatory.

expected
integer <int32>

Expected time on-site. Not mandatory

loneworker
any <boolean>

Describes whether or not the contractor is working alone. Not mandatory.

so_staff_id
integer <int32>

Staff safety officer ID. Not mandatory

so_spm_id
integer <int32>

Contractor manager safety officer ID. Not mandatory

Responses
200

Updated resource

403

Access denied to this resource

500

Internal server error

put/sp/member/movement
Request samples
application/json
{
  • "onsite_status": "onsite",
  • "location_id": 301,
  • "sp_member_id": 54,
  • "sp_org_id": 504,
  • "print_kiosk_id": 301,
  • "lacp_id": 38,
  • "zone_id": 3,
  • "zone_other": "string",
  • "scanned_in": "string",
  • "scanned_out": "string",
  • "visiting_staff_id": 8,
  • "cardnumber": "cp013",
  • "carpark_question": true,
  • "carpark_registration": "MRD346",
  • "carpark_number": "0014",
  • "pass": 1054,
  • "other_pass": "Contractor pass",
  • "sp_purpose": "Water station repairs",
  • "assistance": true,
  • "expected": 60,
  • "loneworker": null,
  • "so_staff_id": 40,
  • "so_spm_id": 89
}
Response samples
{
  • "id": 4938,
  • "created": "2021-10-28T12:57:14+13:00",
  • "modified": "2021-11-15T12:57:14+13:00",
  • "location_id": 301,
  • "sp_member_id": 16348,
  • "sp_org_id": 4587,
  • "signed_in": "2021-10-28T12:57:14+13:00",
  • "signed_out": "2021-10-28T16:57:14+13:00",
  • "mode_in": "Sign In/Out Manager",
  • "mode_out": "Sign In/Out Manager",
  • "zone_id": 32,
  • "zone_other": "zone",
  • "signed_in_by": 823493,
  • "signed_out_by": 823493,
  • "scanned_in": "string",
  • "scanned_out": "string",
  • "visiting_staff_id": 823431,
  • "cardnumber": "c001",
  • "carpark_question": true,
  • "carpark_registration": "DRU706",
  • "carpark_number": "SP003",
  • "pass": 20,
  • "other_pass": "opass047",
  • "sp_purpose": "Repairs",
  • "assistance": false,
  • "expected": true,
  • "accessdenied": false,
  • "accessdenied_reason": "No reason required",
  • "loneworker": true,
  • "so_staff_id": 455,
  • "so_spm_id": 458,
  • "interzone": true,
  • "breathtest": false,
  • "from_zone": 87,
  • "selected_language": "english",
  • "lacp_in_name": "Reception",
  • "lacp_out_name": "Reception",
  • "zone_group_name": "Maintenance",
  • "signed_in_by_kiosk": false,
  • "signed_out_by_kiosk": false,
  • "photo_url": "your.site/storage/contractorphoto.pdf",
  • "signout_photo_url": "your.site/storage/contractorphoto.pdf",
  • "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"
}