Hi there,
We’ve had to add a couple extra Account relationships to the Opportunities module for tracking 3rd party contractors on a few of our projects. Both of the new relationships are One-to-Many Accounts->Opportunities.
Now I’m trying to sync in opportunities from a secondary CRM using the JSON API.
path: {$API_PATH}/module/Opportunities/{$oppID}/relationships
data: Array (
[data] => Array (
[type] => Accounts
[id] => {$accID}
)
)
This all works fine and I’m getting a successful response message
response: Array (
[meta] => stdClass Object (
[message] => Account with id {$accID} has been added to Opportunity with id {$oppID}
)
[data] => Array (
)
)
Except that it’s consistantly creating the relationship in the 3rd account. I need these relationships to always be created as the primary account but I can’t see any way to specify that via the API.