Updating a relationship

The API provides feature to update an existing relationship, we can update contact information for secondary contact, relationship type and sharing information, in order to update an existing relationship pass a valid relationship id for the client and other information(contact information, relationship type and sharing information).

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 the relationship Info

NameDescriptionTypeAdditional information
RelationshipTypeId

Provide the Relationship Type Id from the available set of Relationship Types. The required RelationshipType Id can be found by using Lookup Query.

integer

None.

RelationType

Gets or sets the type of the relation.

string

None.

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.

{
  "RelationshipTypeId": 1,
  "RelationType": "String Parameter 2",
  "RelationshipContact": {
    "MiddleName": "String Parameter 1",
    "LastName": "String Parameter 2",
    "NickName": "String Parameter 3",
    "PrefixId": 1,
    "SuffixId": 1,
    "GenderId": 1,
    "BirthDate": "2024/09/07 18:44:36",
    "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 3",
  "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": 5,
  "RelatedToId": 1,
  "MergedWith_Or_Secondary_Id": 1,
  "MergeType": "String Parameter 6",
  "SortOrder": 1
}

Updating a relationship type

In order to update the relationship type pass contact id and relationship type along, below example shows updating relationship 33727 to change relation type from -11 to -10:

{
  "RelationshipTypeId": -10,
  "RelationshipContact": {
   "ContactName":"Jennie",
   "RelatedToId": 9831292,
   "MergedWith_Or_Secondary_Id": 9856830
  },
   "Id": 33727
}

Updating the relationship contact

In order to update the relationship contact, pass the contact id of secondary contact in MergedWith_Or_Secondary_Id parameter, below example changes the secondary contact Id from 9856830 to 9856831:

{
  "RelationshipTypeId": -10,
  "RelationshipContact": {
   "ContactName":"Jennie",
   "RelatedToId": 9831292,
   "MergedWith_Or_Secondary_Id": 9856831
  },
   "Id": 33727
}

Updating relation with new contact

In order to update a relationship with new contact pass the contact information in RelationshipContact object, below is the example:

{
  "RelationshipTypeId": -11,
  "RelationshipContact": {
   "ContactName":"Stafanie Scott",
   "MiddleName":"Stafanie",
   "LastName":"Scott",
   "RelatedToId": 9831292
  },
   "Id": 33727
}

Response Information

Resource Description

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

ITypedResponseOfGenericKeyValueOfInt32AndString
NameDescriptionTypeAdditional information
Result

GenericKeyValueOfInt32AndString

None.

Category

string

None.

Response Formats

Sample not available.