Modify a Related Record

The various details of how to modify a related record is explained in this section.

Warning: You cannot modify a reverse relationship. Also, perspective for a child record attribute is not supported.
HTTP Method
Endpoint URL See Endpoint
Resource /records/{repositoryName}/modifyRelatedRecord
Request Parameters Specify the following parameters:
Name Description Type Data Type
Required
repositoryName Name of the repository. path string
Optional
workItemId Unique ID of the work item. query string
Media Type application/json
Request Model
{
  "process": false,
  "validate": false,
  "workItemId": "string",
  "record": {
    "productId": "string",
    "productIdExt": "string",
    "productKeyId": "string",
    "attributes": [
      {
        "name": "string",
        "value": "string",
        "displayName": "string",
        "multivalues": [
          {}
        ],
        "multivalue": false,
        "id": 0,
        "groupName": "string"
      }
    ],
    "repositoryName": "string",
    "relationships": {
      "relationshipAttributes": [
        {
          "name": "string",
          "value": "string",
          "displayName": "string",
          "multivalues": [
            {}
          ],
          "multivalue": false,
          "id": 0,
          "groupName": "string"
        }
      ],
      "targetRecord": {}
    },
    "deleted": false
  }
}  
Response Model
{
  "responseMessages": [
    {
      "code": "string",
      "message": "string",
      "type": "string"
    }
  ],
  "records": [
    {
      "repositoryName": "string",
      "productId": "string",
      "productIdExt": "string",
      "productKeyId": "string",
      "responseAttributes": [
        {
          "attributeName": "string",
          "attributeDisplayName": "string",
          "values": [
            "string"
          ],
          "errorCode": "string",
          "errorMessage": "string",
          "errorType": "string"
        }
      ],
      "responseRelationships": [
        {
          "relationshipName": "string",
          "sourceRepositoryName": "string",
          "targetRepositoryName": "string",
          "recordId": "string",
          "recordIdExt": "string",
          "productKeyId": "string",
          "responseAttributes": [
            {
              "attributeName": "string",
              "attributeDisplayName": "string",
              "values": [
                "string"
              ],
              "errorCode": "string",
              "errorMessage": "string",
              "errorType": "string"
            }
          ]
        }
      ]
    }
  ],
  "success": false
}
Request Example Modifying a record with relationship to customer type Non IT in the repository named "Company".
{
  "record": {
    "repositoryName": "Company",
    "productId": "REC1",
    "productIdExt": "REC1",
    "attributes": [
      {
        "name": "Name",
        "value": "TIBCO"
      },
      {
        "name": "Address",
        "value": "NL"
      },
      {
        "name": "Street",
        "multivalues": [
          "11th St",
          "Rockford"
        ],
        "multivalue": true
      },
      {
        "name": "Website",
        "value": "https://www.google.co.in/"
      },
      {
        "name": "Rating",
        "value": "10.10"
      },
      {
        "name": "CompanySource",
        "value": "IT SOURCE"
      },
      {
        "name": "CompanyRating",
        "value": "9"
      }
    ],
    "relationships": {
      "companycustomer": [
        {
          "relationshipAttributes": [
            {
              "name": "RCustomerType",
              "value": "NONIT"
            },
            {
              "name": "RCompanyType",
              "value": "IT PVT"
            }
          ],
          "targetRecord": {
            "repositoryName": "Customer",
            "productId": "REC2",
            "productIdExt": "REC2",
            "attributes": [
              {
                "name": "CustName",
                "value": "John reichard"
              },
              {
                "name": "CustAddress",
                "value": "UK"
              },
              {
                "name": "DOB",
                "value": "03/10/1986"
              },
              {
                "name": "Salary",
                "value": "45000"
              },
              {
                "name": "Gender",
                "value": "M"
              },
              {
                "name": "CustRating",
                "value": "7"
              }
            ],
            "relationships": {
              
            },
            "deleted": false
          }
        }
      ]
    },
    "deleted": false
  }
}
Response Example The response returns all the records matching the search criteria.
{
   "responseMessages": [   {
      "code": "SVC-11025",
      "message": "Service 'VALIDATE_PROCESS' executed successfully.",
      "type": "Info"
   }],
   "records": [],
   "success": true
}
Success Response Example:

Code: 200 successful operation

Error Response If the response is unsuccessful, either of the following error code is displayed:

Example:

Code: 400 Bad request

OR

Code: 500 Invalid Request

For error code response, see Error Handling .