Hello,
using,
/api/v1/contacts/**integer**/accounts/**integer**/dissociate
I get this response back,
422Unprocessable Entity (WebDAV) (RFC 4918)
{
"errorCode": "INVALID_DATA",
"message": "The data is invalid due to validation restrictions",
"errors": [
{
"fieldName": "/accountId",
"errorType": "invalid",
"errorMessage": "The primary account cannot be dissociated because there are other secondary accounts mapped to this contact."
}
]
}
But the contact only has one associated account (the primary)
This is the last part of some deluge code I have written in CRM to remove the Account in DESK when our business development managers remove the account in the CRM, i need to go and remove the associated account in DESK also, most of the time the contacts will only be associated with 1 account and it will likely change to null or blank if the contact leaves the industry or does not immediately find another job.
I am passing in an empty object as the body {} because it didn't work without it,
The question is, am I using the right API call, can i not remove a primary account without replacing it? is it possible to use the API to have a contact have no associated accounts?