Creating a relationship

The API provides feature for creating a any kind of relationship with some existing contact or new contact, in order to create a relationship with the contact which does not exist in the system, pass the full information(middle name, last name and contact name is required) including phone, email and address with relationship type as this is a generic API capable to create any kind of relationship, to create children, spouse or partner relation, use the existing APIs for specific type of relation. Please note the API works based on duplicate prevention setting and if there is existing information in system, the relationship will be established with that existing contact only and no new contact will be created.

Request Information

Body Parameters

Body parameters need to be integrated as json key value collection followed by valid object notations, below if the list of parameters can be sent as request body by an integrator.

pass list of Relations to be saved

Collection of Object

None.

Request Format

Below is the typical object of the request, in order to use the API for various requirement, refer the documentation.

Sample not available.

Creating a relationship with new contact

In order to create the relationship with new contact we need to pass at least last name, middle name(Full information can be added to new contact and that all will be attached to new contact, for more information refer creating a quick individual contact) contact name and a valid relationship type, below is the sample:

[{
  "RelationshipContact": {
    "MiddleName": "Vinit",
    "LastName": "Laurence",
    "ContactName": "Vinu Laurence",
    "RelatedToId": 9831292
  },
RelationshipTypeId:-11,
  "SharingInfo": {
    "SharedWithPrimaryContact": true,
    "ShareWithHousehold": true
  }
}]

Creating a relationship with existing contact

In order to create the relationship with existing we need to pass the existing contact id in MergedWith_Or_Secondary_Id in RelationshipContact object along with the relation type id, below is the example:

{
   "RelationshipContact": {
    "MiddleName": "Nadiya",
    "MergedWith_Or_Secondary_Id":9831261, -- Secondary contact
    "LastName": "Sons",
    "ContactName": "Nadiya & Sons",
    "RelatedToId": 9831292 -- Primary contact
  },
RelationshipTypeId:-11,
  "SharingInfo": {
    "SharedWithPrimaryContact": true,
    "ShareWithHousehold": false
  }
}

Response Information

Resource Description

ITypedResponse with list of key value as relation id(If any new created) be wrapped inside

ITypedResponseOfListOfGenericKeyValueOfInt32AndString
NameDescriptionTypeAdditional information
Result

Collection of GenericKeyValueOfInt32AndString

None.

Category

string

None.

Response Formats

Sample not available.