Each contractor organization has individual members that are authorized to work on-site. A contractor member can belong to multiple contractor organizations in OnLocation.
Use the API to retrieve the organizations each member belongs to, including locations and contact role types; add, update, or delete the connection between a member and an organization.
Learn more about contractor members in the OnLocation Help Center.
Retrieves a list of the members that belong to each contractor organization.
List of contractor memberships
Access denied to this resource
Resource not found
Internal server error
curl -i -X GET \ 'https://api.whosonlocation.com/v1/sp/membership?q=string&order=string&limit=0' \ -H 'If-Modified-Since: string'
[- {
- "id": 13863,
- "created": "2021-09-03T15:17:59+12:00",
- "org_id": 4587,
- "org_name": "Contractor Organisation",
- "member_id": 16348,
- "member_name": "Contractor Name",
- "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
}
]
Create a new contractor membership association.
Resource created
Access denied to this resource
Internal server error
{- "org_id": 405,
- "member_id": 43,
- "roles": [
- [
- 44,
- 6,
- 73
]
], - "locations": [
- {
- "id": 1024,
- "start": "2021-11-27",
- "expires": "2021-11-27"
}
]
}
{- "id": 13863,
- "created": "2021-09-03T15:17:59+12:00",
- "org_id": 4587,
- "org_name": "Contractor Organisation",
- "member_id": 16348,
- "member_name": "Contractor Name",
- "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
}
Retrieves a single contractor membership record, filtering with the provided ID
A single contractor membership record
Access denied to resource
Resource not found
Internal server error
curl -i -X GET \ https://api.whosonlocation.com/v1/sp/membership/:id
{- "id": 13863,
- "created": "2021-09-03T15:17:59+12:00",
- "org_id": 4587,
- "org_name": "Contractor Organisation",
- "member_id": 16348,
- "member_name": "Contractor Name",
- "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
}
Updates a contractor membership association
Information used to update the contractor membership association record
Updated resource
Access denied to this resource
Internal server error
{- "org_id": 405,
- "member_id": 43,
- "roles": [
- [
- 44,
- 6,
- 73
]
], - "locations": [
- {
- "id": 1024,
- "start": "2021-11-27",
- "expires": "2021-11-27"
}
]
}
Deletes the specified contractor membership
Resource Deleted
Access denied to resource
Resource not found
Internal server error
curl -i -X DELETE \ https://api.whosonlocation.com/v1/sp/membership/:id