Groups
Organise properties, buildings, floor plans and units into group sets and groups, and filter inventory by them.
Group sets and groups are an account's own taxonomy: region, brand, asset class, lease-up phase, tower, whatever the client defines. A group set holds groups of one kind of record, and groups can nest. Every inventory list in V2 filters by them (see Core concepts), and the Sites API publishes them to websites.
| Group set | A named collection of groups, of one object_type: property, building, floor_plan or unit |
| Group | A node in a set, with a label and slug. A group with a parent_id is nested under another group in the same set |
| Member | A record in a group. It must be of the set's object_type |
Create a set and its groups
POST /api/v2/group-sets takes a name and an object_type. key is a stable machine key, generated from the name when you omit it. Pass a property_id to scope the set to one property, such as the towers of one community. Leave it out for an account-wide set, such as regions.
curl -X POST https://v2.getresi.com/api/v2/group-sets \
-H "Authorization: Bearer $RESI_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "name": "Regions", "object_type": "property", "allows_multiple_membership": false }'allows_multiple_membership decides whether a record may sit in more than one group of the set. Regions usually say no; amenity tiers or marketing campaigns often say yes.
Then add groups with POST /api/v2/groups. Nest one under another with parent_id:
curl -X POST https://v2.getresi.com/api/v2/groups \
-H "Authorization: Bearer $RESI_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "group_set_id": "'"$SET_ID"'", "label": "Texas", "sort_order": 1 }'A group cannot move to another set: sending group_set_id on an update is a 422. Delete it and create it in the other set instead.
Add and remove members
POST /api/v2/groups/{group}/members takes the member_id of a property, building, floor plan or unit. DELETE /api/v2/groups/{group}/members/{memberId} removes it.
curl -X POST "https://v2.getresi.com/api/v2/groups/$GROUP_ID/members" \
-H "Authorization: Bearer $RESI_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "member_id": "'"$PROPERTY_ID"'" }'A broken membership rule is a 422:
- the member is not of the set's
object_type; - the member is outside the set's property, for a property-scoped set;
- the member is already in another group of a set that does not allow multiple membership.
A member nested deeper inherits upward: filtering inventory by a group includes everything in the groups under it.
Read the tree
GET /api/v2/group-sets/{group_set} returns the set with its top-level groups, each with its children. GET /api/v2/groups is flat and paginated. Filter it by group_set_id or parent_id to walk one level at a time.
Deleting
Deleting a group set deletes every group in it. Deleting a group deletes every group nested under it. Either way the memberships go too, but the grouped records themselves are never deleted.
Groups also restrict what users can see: a user assigned to groups in the Resi app only sees records in those groups. Check with the client before deleting a group that users are assigned to.
Last updated on