Creating a partner relationship

The API provides feature for creating a partner relationship with some existing contact or new contact, in order to create a relationship with the contact which is not exist in the system, pass the full information(middle name, last name and contact name is required) including phone, email and address. 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.

Partner Relationship Info

NameDescriptionTypeAdditional information
RelationshipContact

Contact Details of the Related Individual

SearchableContact

Required

RelationshipTypeName

Gets or Sets the relationship type name.

string

None.

SharingInfo

Specify Sharing Information for this Relationship

RelationshipSharing

None.

SameHousehold

boolean

None.

Id

integer

None.

RelatedToId

integer

None.

MergedWith_Or_Secondary_Id

integer

None.

MergeType

string

None.

SortOrder

integer

None.

Request Format

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

{
  "RelationshipContact": {
    "MiddleName": "String Parameter 1",
    "LastName": "String Parameter 2",
    "NickName": "String Parameter 3",
    "PrefixId": 1,
    "SuffixId": 1,
    "GenderId": 1,
    "BirthDate": "2024/08/29 07:59:22",
    "ContactUniqueId": "String Parameter 4",
    "ContactSourceId": 1,
    "ContactName": "String Parameter 5",
    "Emails": [
      {
        "EmailTypes": [
          {
            "Id": 1,
            "Value": "String Parameter 1"
          },
          {
            "Id": 1,
            "Value": "String Parameter 1"
          }
        ],
        "SharingInfo": {
          "SharedWith": [
            {
              "ContactId": 1,
              "ContactName": "String Parameter 2",
              "IsRemoved": true,
              "IsRecordOwner": true
            },
            {
              "ContactId": 1,
              "ContactName": "String Parameter 2",
              "IsRemoved": true,
              "IsRecordOwner": true
            }
          ]
        },
        "Usage": {
          "IsPrimary": true,
          "UsedForCommunication": true,
          "SameHousehold": true
        },
        "IsVerified": true,
        "EmailId": "String Parameter 1",
        "Id": 2,
        "RelatedToId": 1,
        "MergedWith_Or_Secondary_Id": 1,
        "MergeType": "String Parameter 3",
        "SortOrder": 1
      },
      {
        "EmailTypes": [
          {
            "Id": 1,
            "Value": "String Parameter 1"
          },
          {
            "Id": 1,
            "Value": "String Parameter 1"
          }
        ],
        "SharingInfo": {
          "SharedWith": [
            {
              "ContactId": 1,
              "ContactName": "String Parameter 2",
              "IsRemoved": true,
              "IsRecordOwner": true
            },
            {
              "ContactId": 1,
              "ContactName": "String Parameter 2",
              "IsRemoved": true,
              "IsRecordOwner": true
            }
          ]
        },
        "Usage": {
          "IsPrimary": true,
          "UsedForCommunication": true,
          "SameHousehold": true
        },
        "IsVerified": true,
        "EmailId": "String Parameter 1",
        "Id": 2,
        "RelatedToId": 1,
        "MergedWith_Or_Secondary_Id": 1,
        "MergeType": "String Parameter 3",
        "SortOrder": 1
      }
    ],
    "ShippingAddress": {
      "AddressLine1": "String Parameter 1",
      "AddressLine2": "String Parameter 2",
      "AddressLine3": "String Parameter 3",
      "AddressLine4": "String Parameter 4",
      "PostalCode": "String Parameter 5",
      "City": "String Parameter 6",
      "County": "String Parameter 7",
      "Country": "String Parameter 8",
      "StateRegionProvince": "String Parameter 9",
      "AddressType": "String Parameter 10",
      "Plus4Code": "String Parameter 11",
      "SetAsMailing": true,
      "SameAsMailing": true,
      "AddressCategory": "String Parameter 14",
      "FormattedAddress": "String Parameter 15",
      "Id": 16,
      "RelatedToId": 1,
      "MergedWith_Or_Secondary_Id": 1,
      "MergeType": "String Parameter 17",
      "SortOrder": 1
    },
    "Email": "String Parameter 6",
    "Fax": "String Parameter 7",
    "Phone": "String Parameter 8",
    "CountryCode": "String Parameter 9",
    "Extension": "String Parameter 10",
    "AddressLine1": "String Parameter 11",
    "AddressLine2": "String Parameter 12",
    "AddressLine3": "String Parameter 13",
    "AddressLine4": "String Parameter 14",
    "City": "String Parameter 15",
    "State": "String Parameter 16",
    "Zip": "String Parameter 17",
    "County": "String Parameter 18",
    "Country": "String Parameter 19",
    "Id": 20,
    "RelatedToId": 1,
    "MergedWith_Or_Secondary_Id": 1,
    "MergeType": "String Parameter 21",
    "SortOrder": 1
  },
  "RelationshipTypeName": "String Parameter 1",
  "SharingInfo": {
    "SharedWithPrimaryContact": true,
    "SharedWith": [
      {
        "ContactId": 1,
        "ContactName": "String Parameter 2",
        "IsRemoved": true,
        "IsRecordOwner": true
      },
      {
        "ContactId": 1,
        "ContactName": "String Parameter 2",
        "IsRemoved": true,
        "IsRecordOwner": true
      }
    ]
  },
  "SameHousehold": true,
  "Id": 3,
  "RelatedToId": 1,
  "MergedWith_Or_Secondary_Id": 1,
  "MergeType": "String Parameter 4",
  "SortOrder": 1
}

Creating a partner 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) and contact name, below is the sample:

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

Creating a partner 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, below is the example:

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

Response Information

Resource Description

Object containing Relationship ID and Type

ITypedResponseOfGenericKeyValueOfInt32AndString
NameDescriptionTypeAdditional information
Result

GenericKeyValueOfInt32AndString

None.

Category

string

None.

Response Formats

Sample not available.