Associating Accounts to Contacts Resources
You can use the REST API to associate an Accounts resource to a Contacts resource.
The following details are for a POST request to associate a child Contacts resource (including the contact Id), Account Contacts, to an Account resource on the Oracle CRM On Demand Server:
URL: https://<host>/OnDemand/user/Rest/028/Accounts/1QA2-22789P/child/AccountContacts
HTTP Method: POST
Content-Type: application/vnd.oracle.adf.resource+json
Request body:
{
"AccountContacts":[{
"ContactId":"1QA2-21ATC5"
}
]
}
The following are the details for the response to a successful request that returns the same Contact Id in the original request:
HTTP Code: 201
Content-Type: application/vnd.oracle.adf.resource+json
Response body:
{
"AccountContacts":[{
"ContactId":"1QA2-21ATC5",
"links":{
"self":{
"rel":"self",
"href":"/OnDemand/user/Rest/028/Accounts/1QA2-22789P/child/AccountContacts/1QA2-24859P"},
"canonical":{
"rel":"canonical",
"href":"/OnDemand/user/Rest/028/Accounts/1QA2-22789P/child/AccountContacts/1QA2-24859P"},
"parent":{
"rel":"parent",
"href":"/OnDemand/user/Rest/028/Accounts/1QA2-22789P"
}
}
}
]
}