Relations (Base Entity)
In TribeCRM, every person and organization is stored as a Relation — the shared parent entity for Persons and Organisations. Think of it as the "address book" base type that holds common fields like phone numbers, bank details, and social media links.
The Relation endpoint provides a unified view across all subtypes. Querying it returns persons, organizations, and any other relation subtype in a single list. Use the subtype-specific endpoints (Relation_Person, Relation_Organization) when you need to work with a single type.
Relation = a person or organization record (the entity itself).
Relationship = a link between two relations (e.g., "Jan works at Acme Corp"). Relationships are a separate entity accessible via the Relationships navigation property.
Relation is a base entity and cannot be created directly. You must create a concrete subtype. See Subtypes for the full list.
Endpoints
List Relations
Retrieve a paginated list of all relations (persons and organizations combined).
/v1/odata/RelationSingle Relation
Retrieve a single relation by its ID.
/v1/odata/Relation({id})With expanded relations:
/v1/odata/Relation({id})?$expand=Language,AddressesCreate Relation
The Relation endpoint does not support direct creation. Use the subtype-specific endpoints instead:
POST /v1/odata/Relation_Person— Create a contactPOST /v1/odata/Relation_Organization— Create an organization
Update Relation
Update an existing relation. Provide only the fields to update.
/v1/odata/Relation({id})Delete Relation
Delete a relation by ID.
/v1/odata/Relation({id})Subtypes
Relation is the abstract parent type. All records in TribeCRM are one of these concrete subtypes:
| Subtype | OData Entity Set | Description |
|---|---|---|
| Organisations | Relation_Organization | Companies and organizations |
| Persons | Relation_Person | Individual people |
Subtypes inherit all Relation fields and add their own specific fields (e.g., firstName/lastName for persons, name/vatNumber for organizations).
Fields
Standard Fields (all entities)
These fields are present on every entity, including relations.
| Field | Type | Description |
|---|---|---|
ID | Guid | Primary key (UUID) |
_Type | String | Entity type discriminator (e.g., Relation.Person, Relation.Organization) |
_Name | String | Computed display name |
SortIndex | Double | Sorting order |
CreationDate | DateTimeOffset | Date the record was created |
LastMutationDate | DateTimeOffset | Date of the last modification |
IsActive | Boolean | Whether the record is active |
IsClosed | Boolean | Whether the record is closed |
Relation Fields
These fields are specific to the Relation type and inherited by all subtypes (Person, Organization).
| Field | Type | Description |
|---|---|---|
Number | Double | Relation number (unique identifier code) |
DebtorNumber | String | Debtor number |
CreditorNumber | String | Creditor number |
IBAN | String | IBAN bank account number |
BIC | String | BIC/SWIFT code |
BankName | String | Bank name |
Facebook | String | Facebook URL |
Twitter | String | Twitter/X URL |
LinkedIn | String | LinkedIn URL |
Instagram | String | Instagram URL |
YouTube | String | YouTube URL |
Blog | String | Blog URL |
Relationships
| Relationship | Target Entity | Cardinality | Description |
|---|---|---|---|
| Language | Datastore.Language | N:1 | Preferred language |
| Relationships | Relationship | 1:N | Linked relations (contacts ↔ organizations) |
| Addresses | Address | 1:N | All addresses |
| EmailAddresses | EmailAddress | 1:N | Email addresses |
| PhoneNumbers | PhoneNumber | 1:N | Phone numbers |
| Picture | File | 1:1 | Profile picture |
| Labels | Label | 1:N | Labels / tags |
| Notes | Note | 1:N | Notes |
| Attachments | Attachment | 1:N | File attachments |
| Events | Event | 1:N | Events (activities) |
| Creator | Relation.Person.Contact | N:1 | User who created the record |
| Team | Team | N:1 | Assigned team |
Expanding Relationships
/v1/odata/Relation({id})?$expand=Language/v1/odata/Relation({id})?$expand=Addresses,Language,LabelsNavigating Relationships
You can navigate directly to related entities:
/v1/odata/Relation({id})/Addresses/v1/odata/Relation({id})/Notes/v1/odata/Relation({id})/Language/$refFiltering Examples
:::warning Filtering by _Type is not supported
To narrow by relation subtype, query that subtype's own entity set instead (/v1/odata/Relation_Person, /v1/odata/Relation_Organization). See Filtering by Type.
:::
/v1/odata/Relation?$filter=contains(_Name, '{_Name}')&$top={top}/v1/odata/Relation?$filter=Number eq {Number}&$top={top}/v1/odata/Relation?$filter=DebtorNumber ne null&$top={top}/v1/odata/Relation?$filter=IBAN ne null&$top={top}/v1/odata/Relation?$filter=contains(LinkedIn, '{LinkedIn}')&$top={top}/v1/odata/Relation?$filter=CreationDate gt {CreationDate}&$top={top}