Groups allow you to segment your contacts so you can easily pull up a list of related contacts. When interacting with groups via the API, it's important to understand that there are two sets of functions. In the settings section, you'll see API functions for managing the groups themselves. Those are rarely used, because once a group has been created, you normally don't need to mess with it. This section is about group memberships which is how you control which contacts are in which groups.
When you're using the LACRM app and you "attach a group to a contact", that's creating a group membership. A group membership is just a link between a contact and group. So to add a contact to a group, you'll want to create a group membership. To remove a contact from a group, delete the group membership.
Because group memberships are really just links between two other objects, the API functions are a bit different from normal. There's no ID for group memberships, you just pass both the contact and group IDs. Similarly, you can't edit group memberships because they don't contain any additional information beyond the IDs of the records they're linking together.
This function creates a new group membership. This is the equivalent of attaching a group to a contact record using the LACRM user interface.
The Id of the contact or company that will become a member of a group.
The Id of the group the contact should be a member of. You must either pass a GroupId
or GroupName
to
identify the group, but you shouldn't pass both. If you're not sure which one to use, we recommend using
GroupId
because it's more precise.
You can optionally identify groups by their name instead of GroupId
, although we generally don't recommend
it.
This function deletes a group membership. In other words, it removes a contact from a group.
The Id of the contact or company that will become a member of a group.
The Id of the group the contact should be a member of. You must either pass a GroupId
or GroupName
to
identify the group, but you shouldn't pass both. If you're not sure which one to use, we recommend using
GroupId
because it's more precise.
You can optionally identify groups by their name instead of GroupId
, although we generally don't recommend
it.
This function gets all of the groups a contact is a member of.
The Id of the contact or company to whom the groups are attached.
How many results should be returned from a single API call? The max value is 10,000. If you need to return
more results, call this API function again, but increment the Page
parameter.
If there are more results than MaxNumberOfResults
, you can call this function again with an incremented
Page
value to get the next page of results. For example, if there are 700 results, but you're only requesting
500 at a time, you could call this function with Page=2 to get the remaining 200 results.
This function gets all of the contacts that are members of a specific group
The Id of the group you're getting the members of. You must either pass a GroupId
or GroupName
to
identify the group, but you shouldn't pass both. If you're not sure which one to use, we recommend using
GroupId
because it's more precise.
You can optionally identify groups by their name instead of GroupId
, although we generally don't recommend
it.
How many results should be returned from a single API call? The max value is 10,000. If you need to return
more results, call this API function again, but increment the Page
parameter.
If there are more results than MaxNumberOfResults
, you can call this function again with an incremented
Page
value to get the next page of results. For example, if there are 700 results, but you're only requesting
500 at a time, you could call this function with Page=2 to get the remaining 200 results.