Less Annoying CRM logo Less Annoying CRM LACRM
Core API Functions

Relationships

Relationships allow you to link two contacts/companies together. They're useful for tracking things like family relationships, referrals, etc. Each relationship can have a note attached to explain the nature of the relationship.

Relationships are shown on both contact records so you can easily click back-and-forth between the contacts in the relationship.

If you have a more structured type of relationship you want to track for a lot of your contacts, you might consider using a customer "contact link" field instead. Relationships are good for making arbitrary links between contacts on the fly, while contact link fields are better for collecting structured data.

Create a relationship

This function creates a new relationship between two contacts or companies.

How to call this function
Function name
CreateRelationship
Parameters
ContactId1 Text

The Id of the first contact or company in the relationship. Relationships are bi-directional, so it doesn't matter which is ContactId1 and which one is ContactId2.

ContactId2 Text

The Id of the first contact or company in the relationship. Relationships are bi-directional, so it doesn't matter which is ContactId1 and which one is ContactId2.

Note Text

A note to describe the nature of the relationship. This can be as long as you want, but only a small snippet is displayed by default on the contact records.

Response
{
"RelationshipId": "4000253302709542334675899895613"
}

Edit a relationship

This function edits an existing relationship. You cannot change which contacts or companies are involved in the relationship, so if you need to do that, you should delete the existing relationship and create a new one.

How to call this function
Function name
EditRelationship
Parameters
RelationshipId Uid Required

The id of the relationship you want to edit.

Note Text Required

A note to describe the nature of the relationship. This can be as long as you want, but only a small snippet is displayed by default on the contact records.

Response
This function doesn't return anything. If there's no error message returned, that means the call was completed successfully.

Delete a relationship

This function deletes an existing relationship.

How to call this function
Function name
DeleteRelationship
Parameters
RelationshipId Uid Required

The id of the relationship you want to delete.

Response
This function doesn't return anything. If there's no error message returned, that means the call was completed successfully.

Get a relationship

This function gets information about a single relationship. In most cases, you probably want to use GetRelationshipsAttachedToContacts instead.

How to call this function
Function name
GetRelationship
Parameters
RelationshipId Uid Required

The id of the relationship you want to get.

Response
{
"RelationshipId": "4000253302714154020694327747203",
"ContactId1": "4000253302714154020694327528741",
"ContactId2": "4000253302714154020694327126608",
"Note": "John and Jane are married",
"CreatedBy": "123",
"DateCreated": "2024-12-21T18:08:48-08:00",
"DateEdited": "2024-12-21T18:08:48-08:00",
"Contact1MetaData": {
"Name": "John Doe"
}
"Contact2MetaData": {
"Name": "Jane Doe"
}
"CreatedByMetaData": {
"FirstName": "Your",
"LastName": "Name"
}
}

Get contact relationships

This function returns all of the relationships for a specific contact. Relationships are bi-directional, so this will include relationships where the contact is listed as Contact1 or Contact2.

How to call this function
Function name
GetRelationshipsAttachedToContact
Parameters
ContactId Uid Required

The id of the contact whose relationships you want to get.

MaxNumberOfResults Number Default: 500

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.

Page Number Default: 1

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.

Response
{
"HasMoreResults": false,
"Results": [
{
"RelationshipId": "4000253302716459863703541428166",
"ContactId1": "4000253302716459863703539436771",
"ContactId2": "4000253302718765706712753873515",
"Note": "John and Jane are married",
"CreatedBy": "123",
"DateCreated": "2024-12-21T18:08:48-08:00",
"DateEdited": "2024-12-21T18:08:48-08:00",
"Contact1MetaData": {
"Name": "John Doe"
}
"Contact2MetaData": {
"Name": "Jane Doe"
}
"CreatedByMetaData": {
"FirstName": "Your",
"LastName": "Name"
}
},
{...},
{...}
]
}