Groups are a subset of contractor organization categories. For example, electrical, cleaning, and maintenance could be groups under the facilities category. They are used to organize your organizations and make it easier to report on them and create triggers.
Use the API to retrieve your groups list or add, update or delete a group.
Learn more about contractor organization groups in the OnLocation Help Center.
Returns a list of contractor organization groups.
List of contractor organization groups
Invalid Input
Access denied to this resource
Internal server error
curl -i -X GET \ https://api.whosonlocation.com/v1/sp/org/group
[- {
- "id": 1,
- "name": "Drivers",
- "category_id": 1,
- "created": "2023-05-12 09:30:00"
}
]
Creates a new contractor organization group with the provided details.
Created resource
Invalid input
Access denied to this resource
Internal server error
{- "category_id": 1,
- "name": "Drivers"
}
{- "category_id": 1,
- "name": "Drivers"
}
Retrieves a contractor organization group by its ID.
Contractor organization group found
Access denied to this resource
Contractor organization group not found
Internal server error
curl -i -X GET \ https://api.whosonlocation.com/v1/sp/org/group/:id
{- "id": 1,
- "name": "Drivers",
- "category_id": 1,
- "created": "2023-05-12 09:30:00"
}
Updates the details of a contractor organization group.
Updated resource
Invalid Input
Access denied to this resource
Contractor organization group not found
Internal server error
{- "name": "Drivers"
}
{- "id": 1,
- "name": "Drivers",
- "category_id": 1,
- "created": "2023-05-12 09:30:00"
}
Deletes a contractor organization group by its ID.
Contractor organization group deleted successfully
Access denied to this resource
Contractor organization group not found
Not deleted as contractor organizations found attached to the group
Internal server error
curl -i -X DELETE \ https://api.whosonlocation.com/v1/sp/org/group/:id