Skip to main content

Relationships (Base Entity)

EntityRelationship

Relationships define how Relations connect to each other and to your business. Every Relationship links two Relations — a parent and a child — and defines the role of that connection (Customer, Supplier, Contact, etc.).

The Relationship endpoint provides a unified view across all relationship types. Use the subtype-specific endpoints (e.g., Relationship_Organization_CommercialRelationship_Customer, Relationship_Person_Contact_Standard) when you need to work with a single type.

Base Entity

Relationship is a base entity and cannot be created directly. You must create a concrete subtype. See Subtypes for the full list.

Endpoints

List Relationships

Retrieve a paginated list of all relationships across all types.

GET/v1/odata/Relationship

Single Relationship

Retrieve a single relationship by its ID.

GET/v1/odata/Relationship({id})

With expanded relations:

GET/v1/odata/Relationship({id})?$expand=Relation

Create Relationship

The Relationship endpoint does not support direct creation. Use a subtype-specific endpoint instead:

See Subtypes for the full list.

With a New Relation

Create the Relationship and its child Relation in one call:

POST/v1/odata/Relationship_Organization_CommercialRelationship_Lead
  • Relation.ID — The parent Relation (must already exist)
  • Organization — The child Relation fields (created automatically)

Between Two Existing Relations

Link two Relations that already exist in your CRM:

POST/v1/odata/Relationship_Person_Contact_Standard

Update Relationship

Update an existing relationship. Provide only the fields to update.

PUT/v1/odata/Relationship({id})

Change the Nature of a Relationship

Convert a Relationship from one type to another (e.g., Lead to Customer). This can only be done between relationships on the same level (e.g., all types under Commercial Relationship are interchangeable).

Request body
{
"ID": "d3a432f4-e9d0-400b-9321-1a3cd996ab97",
"_Type": "Relationship.Organization.CommercialRelationship.Customer"
}

Use the Relationship ID, not any of the Relation IDs.

Delete Relationship

Delete a relationship by ID. This removes the connection but does not delete the underlying Relations.

DELETE/v1/odata/Relationship({id})
warning

Make sure you do not orphan Relations when deleting Relationships. If the Relationship is the only one linking a Relation to your network, consider deleting the Relation instead.

Subtypes

Relationship is the abstract parent type. Common concrete subtypes include:

SubtypeOData Entity SetDescription
SuspectRelationship_Organization_CommercialRelationship_SuspectUnqualified company contact at the top of the funnel
SuspectRelationship_Person_CommercialRelationship_SuspectUnqualified individual contact at the top of the funnel
LeadRelationship_Organization_CommercialRelationship_LeadQualified company lead
LeadRelationship_Person_CommercialRelationship_LeadQualified individual lead
Hot ProspectRelationship_Organization_CommercialRelationship_HotProspectEngaged company lead showing buying signals
Hot ProspectRelationship_Person_CommercialRelationship_HotProspectEngaged individual lead showing buying signals
ProspectRelationship_Organization_CommercialRelationship_ProspectCompany in active negotiation
ProspectRelationship_Person_CommercialRelationship_ProspectIndividual in active negotiation
CustomerRelationship_Organization_CommercialRelationship_CustomerSigned company customer
CustomerRelationship_Person_CommercialRelationship_CustomerSigned individual customer
SupplierRelationship_Organization_SupplierOrganization that is a supplier
ContactRelationship_Person_Contact_StandardPerson who is a contact
EmployeeRelationship_Person_Contact_EmployeePerson who is an employee

Subtypes inherit all Relationship fields and may add their own role-specific fields (e.g., account manager, payment terms).

tip

Relationship names follow the pattern Relationship_{RelationType}_{RelationshipPath}. To find the correct name, go to Configuration > Relations in Tribe CRM and look at the Relationships (types) section.

Fields

Standard Fields (all entities)

FieldTypeDescription
IDGuidPrimary key (UUID)
_TypeStringEntity type discriminator (e.g., Relationship.Organization.CommercialRelationship.Customer)
_NameStringComputed display name
SortIndexDoubleSorting order
CreationDateDateTimeOffsetDate the record was created
LastMutationDateDateTimeOffsetDate of the last modification
IsActiveBooleanWhether the record is active
IsClosedBooleanWhether the record is closed

Relationship Fields

FieldTypeDescription
NameStringRelationship display name

Relationships

RelationshipTarget EntityCardinalityDescription
RelationRelationN:1Parent relation
PersonRelation.PersonN:1Child person (subtype-specific, e.g., Relationship_Person_Contact_Standard)
OrganizationRelation.OrganizationN:1Child organization (subtype-specific, e.g., Relationship_Organization_CommercialRelationship_Customer)

Expanding Relationships

GET/v1/odata/Relationship({id})?$expand=Relation
tip

Use $expand=Relation on the base type, or $expand=Relation,Person (or Organization) on a specific subtype to get the underlying Relation details in one API call.

GET/v1/odata/Relationship({id})/Relation

Filtering Examples

:::warning Filtering by _Type is not supported To narrow by relationship subtype, query that subtype's own entity set instead (e.g. /v1/odata/Relationship_Organization_CommercialRelationship_Customer, /v1/odata/Relationship_Person_Contact_Standard). See Filtering by Type. :::

GET/v1/odata/Relationship?$filter=contains(Name, '{Name}')&$top={top}&$select=ID,_Name
GET/v1/odata/Relationship?$filter=CreationDate gt {CreationDate}&$top={top}&$select=ID,_Name,CreationDate
GET/v1/odata/Relationship?$filter=IsClosed eq {IsClosed}&$top={top}&$count=true&$select=ID,_Name,_Type