Update contact relationship via API?

Hello,

I want to automate some things via n8n and for that I have to update a relationship via API. Specifically I want to set the value of email_opt_out.
I tried sending a PATCH request to the contact endpoint but SuiteCRM ignores this change so I figured that it’s part of a relationship (EmailAddresses) but relationships don’t seem to have a method to be updated.

Is there any way I can update this value?

Hello,

I’ve got a few videos online on API, n8n and relationships:



If you retrieve one specific Lead / Contact, focus on the related lists in the API response.
There, you’ll find the “special sub module” E-Mail addresses.
The status that you see in the CRM UI is based on the values in the records of this sub-module.
So the PATCH is basically to the endpoint of the sub-module in case of the email addresses.

Background behind this module:
There are no email duplicates in the CRM.
But two contacts can link to the same email address record.
If you unsubscribe one, you technically / automatically unsubscribe the other one as well.

1 Like