A contractor organization is contracted to provide a service. Each organization has a profile in OnLocation that includes contact information, status, location access, insurance policies, and linked members.
Use the API to retrieve your contractor organization list, or add, update or delete an organization profile.
To manage which organizations a member belongs to, use the contractor membership endpoint.
Learn more about contractor organizations in the OnLocation Help Center.
Returns a list of all contractor organizations.
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.
List of contractor organizations
Access denied to this resource
Resource not found
Internal server error
curl -i -X GET \ 'https://api.whosonlocation.com/v1/sp/org?q=string&order=string&limit=0' \ -H 'If-Modified-Since: string'
[- {
- "id": 4587,
- "created": "2021-09-03T15:16:44+12:00",
- "modified": "2021-11-29T09:51:00+13:00",
- "name": "Contractor Organisation Name",
- "setup_by": 653,
- "type": "Charitable organization",
- "tradingas": "Contractor Organisation Name",
- "legalid": "lid005",
- "legalid_type": "legal ID type",
- "address": "2 Water Street, New York, NY, USA",
- "country": "NZ",
- "status": "active",
- "email": "sp.organisation@whosonlocation.com",
- "phone": "+1 206 555 0123",
- "locations": [
- {
- "id": 301,
- "name": "Sub Office",
- "start": "2021-12-01",
- "expires": "2021-12-01"
}
], - "policies": 2,
- "members": [
- {
- "id": 556,
- "name": "Example Name"
}
], - "organization_owner": 823431,
- "logs": [
- null
], - "customfields": {
- "123": "custom-field value"
}
}
]
Create a new contractor organization.
Information to save to the database
Organization created
Access denied to this resource
Internal server error
{- "name": "Contractor Organisation Name",
- "type": "Charitable organization",
- "tradingas": "Contractor Organisation Name",
- "legalid": "lid005",
- "legalid_type": "legal ID type",
- "address": "2 Water Street, New York, NY, USA",
- "country": "NZ",
- "email": "sp.organisation@whosonlocation.com",
- "phone": "+1 206 555 0123",
- "organization_owner": 823431,
- "status": "active",
- "locations": [
- {
- "id": 301,
- "name": "Sub Office",
- "start": "2021-12-01",
- "expires": "2021-12-01"
}
], - "cf": {
- "123": "custom-field value"
}
}
{- "id": 4587,
- "created": "2021-09-03T15:16:44+12:00",
- "modified": "2021-11-29T09:51:00+13:00",
- "name": "Contractor Organisation Name",
- "setup_by": 653,
- "type": "Charitable organization",
- "tradingas": "Contractor Organisation Name",
- "legalid": "lid005",
- "legalid_type": "legal ID type",
- "address": "2 Water Street, New York, NY, USA",
- "country": "NZ",
- "status": "active",
- "email": "sp.organisation@whosonlocation.com",
- "phone": "+1 206 555 0123",
- "locations": [
- {
- "id": 301,
- "name": "Sub Office",
- "start": "2021-12-01",
- "expires": "2021-12-01"
}
], - "policies": 2,
- "members": [
- {
- "id": 556,
- "name": "Example Name"
}
], - "organization_owner": 823431,
- "logs": [
- null
], - "customfields": {
- "123": "custom-field value"
}
}
Retrieves a single contractor organization, filtering with the provided ID.
Organization returned
Access denied to resource
Resource not found
Internal server error
curl -i -X GET \ https://api.whosonlocation.com/v1/sp/org/:id
{- "id": 4587,
- "created": "2021-09-03T15:16:44+12:00",
- "modified": "2021-11-29T09:51:00+13:00",
- "name": "Contractor Organisation Name",
- "setup_by": 653,
- "type": "Charitable organization",
- "tradingas": "Contractor Organisation Name",
- "legalid": "lid005",
- "legalid_type": "legal ID type",
- "address": "2 Water Street, New York, NY, USA",
- "country": "NZ",
- "status": "active",
- "email": "sp.organisation@whosonlocation.com",
- "phone": "+1 206 555 0123",
- "locations": [
- {
- "id": 301,
- "name": "Sub Office",
- "start": "2021-12-01",
- "expires": "2021-12-01"
}
], - "policies": 2,
- "members": [
- {
- "id": 556,
- "name": "Example Name"
}
], - "organization_owner": 823431,
- "logs": [
- null
], - "customfields": {
- "123": "custom-field value"
}
}
Update a contractor organization using the provided ID.
Updated organization
Access denied to this resource
Internal server error
{- "name": "Contractor Organisation Name",
- "type": "Charitable organization",
- "tradingas": "Contractor Organisation Name",
- "legalid": "lid005",
- "legalid_type": "legal ID type",
- "address": "2 Water Street, New York, NY, USA",
- "country": "NZ",
- "email": "sp.organisation@whosonlocation.com",
- "phone": "+1 206 555 0123",
- "organization_owner": 823431,
- "status": "active",
- "locations": [
- {
- "id": 301,
- "name": "Sub Office",
- "start": "2021-12-01",
- "expires": "2021-12-01"
}
], - "cf": {
- "123": "custom-field value"
}
}