A contractor member belongs to an organization that is contracted to provide a service. Each member has a profile in OnLocation that includes their contact details, status, access permission dates, and locations.
Use the contractor member API to retrieve your contractor member list, or add, update or delete a member profile.
To manage which organizations a member belongs to, use the contractor membership endpoint.
Learn more about contractor members in the OnLocation Help Center.
Returns a list of all contractor organization members.
A comma separated list of tag:value search parameters, a colon separator performs an exact match and a percent separator performs a starts-with search.
A contractor member can be matched to an external token which has been assigned to their profile such as RFID card number, a security turnstile controller may search for an account to update the onsite status, eg q=token:C1BB7F.
List of contractor organization members
Access denied to this resource
Resource not found
Internal server error
curl -i -X GET \ 'https://api.whosonlocation.com/v1/sp/member?q=string&order=string&limit=0' \ -H 'If-Modified-Since: string'
[- {
- "id": 16348,
- "created": "2021-09-03T15:17:57+12:00",
- "modified": "2021-11-29T08:39:55+13:00",
- "name": "First Contractor",
- "setup_by": 823431,
- "title": "Contractor",
- "service_provider_id": "contract_047",
- "email": "contractor-email@whosonlocation.com",
- "altemail": "alternative-address@whosonlocation.com",
- "phone": "+1 206 555 0123",
- "mobile": "+1 206 555 0123",
- "status": "active",
- "valid_from": "2021-09-03",
- "valid_to": "2026-09-02",
- "extension": "047",
- "ice": "+1 206 555 0123",
- "onsite_status": "onsite",
- "cur_location_id": 301,
- "cur_sp_org_id": 4587,
- "cur_location": "Head Office",
- "sp_orgs": [
- {
- "id": 4587,
- "name": "Head Office",
- "roles": [
- {
- "id": 556,
- "name": "Example Name"
}
], - "locations": [
- {
- "id": 301,
- "name": "Sub Office",
- "start": "2021-12-01",
- "expires": "2021-12-01"
}
], - "locations_same_as_org": true
}
], - "logs": [
- null
], - "tokens": [
- null
], - "customfields": {
- "123": "custom-field value"
}
}
]
Add a new contractor organization member to the database.
To add a member with custom fields:
Contractor member information:
Member created
Access denied to this resource
Internal server error
{- "name": "New Member",
- "title": "Contractor",
- "email": "example@example.org",
- "altemail": "example-alt@example.org",
- "phone": "+1 206 555 0123",
- "ice": "+1 206 555 0123",
- "cur_location": 301,
- "extension": "047",
- "mobile": "+1 206 555 0123",
- "valid_from": "2021-09-03",
- "valid_to": "2026-09-02",
- "onsite_status": "onsite",
- "service_provider_id": "12345",
- "cf": {
- "123": "custom-field value"
}
}
{- "id": 16348,
- "created": "2021-09-03T15:17:57+12:00",
- "modified": "2021-11-29T08:39:55+13:00",
- "name": "First Contractor",
- "setup_by": 823431,
- "title": "Contractor",
- "service_provider_id": "contract_047",
- "email": "contractor-email@whosonlocation.com",
- "altemail": "alternative-address@whosonlocation.com",
- "phone": "+1 206 555 0123",
- "mobile": "+1 206 555 0123",
- "status": "active",
- "valid_from": "2021-09-03",
- "valid_to": "2026-09-02",
- "extension": "047",
- "ice": "+1 206 555 0123",
- "onsite_status": "onsite",
- "cur_location_id": 301,
- "cur_sp_org_id": 4587,
- "cur_location": "Head Office",
- "sp_orgs": [
- {
- "id": 4587,
- "name": "Head Office",
- "roles": [
- {
- "id": 556,
- "name": "Example Name"
}
], - "locations": [
- {
- "id": 301,
- "name": "Sub Office",
- "start": "2021-12-01",
- "expires": "2021-12-01"
}
], - "locations_same_as_org": true
}
], - "logs": [
- null
], - "tokens": [
- null
], - "customfields": {
- "123": "custom-field value"
}
}
Retrieves a single contractor organization member, filtering with the provided ID.
Member returned
Access denied to resource
Resource not found
Internal server error
curl -i -X GET \ https://api.whosonlocation.com/v1/sp/member/:id
{- "id": 16348,
- "created": "2021-09-03T15:17:57+12:00",
- "modified": "2021-11-29T08:39:55+13:00",
- "name": "First Contractor",
- "setup_by": 823431,
- "title": "Contractor",
- "service_provider_id": "contract_047",
- "email": "contractor-email@whosonlocation.com",
- "altemail": "alternative-address@whosonlocation.com",
- "phone": "+1 206 555 0123",
- "mobile": "+1 206 555 0123",
- "status": "active",
- "valid_from": "2021-09-03",
- "valid_to": "2026-09-02",
- "extension": "047",
- "ice": "+1 206 555 0123",
- "onsite_status": "onsite",
- "cur_location_id": 301,
- "cur_sp_org_id": 4587,
- "cur_location": "Head Office",
- "sp_orgs": [
- {
- "id": 4587,
- "name": "Head Office",
- "roles": [
- {
- "id": 556,
- "name": "Example Name"
}
], - "locations": [
- {
- "id": 301,
- "name": "Sub Office",
- "start": "2021-12-01",
- "expires": "2021-12-01"
}
], - "locations_same_as_org": true
}
], - "logs": [
- null
], - "tokens": [
- null
], - "customfields": {
- "123": "custom-field value"
}
}
Update a contractor organization member profile using the provided ID.
Information used to create the contractor member record:
Updated member
Access denied to this resource
Internal server error
{- "name": "New Member",
- "title": "Contractor",
- "email": "example@example.org",
- "altemail": "example-alt@example.org",
- "phone": "+1 206 555 0123",
- "ice": "+1 206 555 0123",
- "cur_location": 301,
- "extension": "047",
- "mobile": "+1 206 555 0123",
- "valid_from": "2021-09-03",
- "valid_to": "2026-09-02",
- "onsite_status": "onsite",
- "service_provider_id": "12345",
- "cf": {
- "123": "custom-field value"
}
}
Delete a contractor organization member using the provided ID.
Member deleted
Access denied to resource
Resource not found
Internal server error
curl -i -X DELETE \ https://api.whosonlocation.com/v1/sp/member/:id