APIs & Integrations

dwmingerso
Member

Update Deal associatedCompanyIds

I’m attempting to update a Deal’s associated company using the API but it doesn’t appear to work or has missing documentation. When creating a deal, the associatedCompanyIds can be set according to:

For example, when updating a deal, I’ve tried using the associations as such:

{
“associations”:{“associatedVids”:[],“associatedCompanyIds”:[123456789],“associatedDealIds”:[]},
“properties”: [
{
“name”:“amount”,
“value”:123456.0,
},
],
}

Properties will update, but associations will not (at least associatedCompanyIds will not).

Is there is a way to update the associatedCompanyIds of an existing deal?

Thank you.

0 Upvotes
2 Replies 2
Dadams
HubSpot Employee
HubSpot Employee

Update Deal associatedCompanyIds

Hi @dwmingerso

Deal associations can’t be modified by updating the record, you’ll need to use this separate endpoint:

Associate a deal with a contact or company | Deals API

PUT deals/v1/deal/:dealId/associations/:OBJECTTYPE?id=:objectId&id=:objectId

dwmingerso
Member

Update Deal associatedCompanyIds

Thanks you. I missed that section of the documentation.

0 Upvotes