Associating Contacts to Accounts and Opportunities Resources
You can use the REST API to associate existing contacts resources to existing Accounts and Opportunities resources.
The following details are for a request to associate an existing child Contacts resource (including the contact Id and role), Account Contacts, to an existing Accounts resource on the Oracle CRM On Demand Server:
URL: https://<host>/OnDemand/user/Rest/028/Accounts/1QA2-22789P/child/AccountContactRoles/1QA2-23MIPS
HTTP Method: PATCH
Content-Type: application/vnd.oracle.adf.resource+json
Request body:
{
"AccountContactRoles":[{
"ContactId":"1QA2-2278B3",
"Role":"Approver"
}
]
}
The following are the details for the response to a successful request and returns the role and Contact Id from the original request:
HTTP Code: 200
Content-Type: application/vnd.oracle.adf.resource+json
Response body:
{
"AccountContactRoles":[{
"Role":"Approver",
"ContactId":"1QA2-2278B3",
"links":{
"self":{
"rel":"self",
"href":"/OnDemand/user/Rest/028/Accounts/1QA2-22789P/child/AccountContactRoles/1QA2-23MIPS"},
"canonical":{
"rel":"canonical",
"href":"/OnDemand/user/Rest/028/Accounts/1QA2-22789P/child/AccountContactRoles/1QA2-23MIPS"},
"parent":{
"rel":"parent",
"href":"/OnDemand/user/Rest/028/Accounts/1QA2-22789P"}
}
}
]
}