<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: add Label (do not overwrite existing label) in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/add-Label-do-not-overwrite-existing-label/m-p/1071504#M78355</link>
    <description>&lt;P&gt;HI WesQ, thx, this what im currently doing, but i first then have to determne what the "current" label/s is. (there are many), filter/loop through them all, because one contact can have more than one label ALREADY. then use the results to add my Added label with all the previous ones also. I was just hoping i could just keep the contact with it's current labels, en "Patch" another label also.&lt;BR /&gt;but thank you, you confirmed this is not possible, IF I understood you correctly....&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2024 07:52:30 GMT</pubDate>
    <dc:creator>karien</dc:creator>
    <dc:date>2024-11-19T07:52:30Z</dc:date>
    <item>
      <title>add Label (do not overwrite existing label)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/add-Label-do-not-overwrite-existing-label/m-p/1071484#M78351</link>
      <description>&lt;P&gt;is there a way to ADD a label to an already existing association&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example. i have JOHN, he associated to my record with Label "contact person"&amp;nbsp;&lt;BR /&gt;now via custom code ADD another label to the same record. example "photographer"&lt;BR /&gt;im assigning labels via custom code action all the time. but have to do complicated checks to see whether John is both contact person and photographer.&amp;nbsp;&lt;BR /&gt;is there a way to ADD/Patch another label?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 07:02:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/add-Label-do-not-overwrite-existing-label/m-p/1071484#M78351</guid>
      <dc:creator>karien</dc:creator>
      <dc:date>2024-11-19T07:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: add Label (do not overwrite existing label)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/add-Label-do-not-overwrite-existing-label/m-p/1071495#M78352</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/381889"&gt;@karien&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Referencing the documentation on&amp;nbsp;&lt;A title="Associations v4 API" href="https://developers.hubspot.com/beta-docs/guides/api/crm/associations/associations-v4#:~:text=Associations%20represent%20the%20relationships%20between,e.g.%2C%20Company%20to%20Company)." target="_blank" rel="noopener"&gt;Associations v4 API&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It seems we can only do a PUT method.&amp;nbsp; There was no PATCH method provided for this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a workaround, what I do is I simply add the existing associationTypeId (which will get overwritten), and include another&amp;nbsp;associationTypeId that we want to add,&amp;nbsp; just like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PUT&amp;nbsp;request to&amp;nbsp;&lt;A href="https://api.hubapi.com/crm/v4/objects/contact/{objectId}/associations/deal/{toObjectId" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v4/objects/contact/{objectId}/associations/deal/{toObjectId&lt;/A&gt;}&lt;BR /&gt;Authorization: Bearer pat-******************************&lt;BR /&gt;Content-Type: application/json&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[
{
"associationCategory": "USER_DEFINED",
"associationTypeId": 247 // For example if this is the Id for "Contact Person"
},
{
"associationCategory": "USER_DEFINED",
"associationTypeId": 232 // We just add another Id for "Photographer"
}
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Was I able to help answer your question? Help the community by&amp;nbsp;marking it as a solution.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 07:38:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/add-Label-do-not-overwrite-existing-label/m-p/1071495#M78352</guid>
      <dc:creator>WesQ</dc:creator>
      <dc:date>2024-11-19T07:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: add Label (do not overwrite existing label)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/add-Label-do-not-overwrite-existing-label/m-p/1071504#M78355</link>
      <description>&lt;P&gt;HI WesQ, thx, this what im currently doing, but i first then have to determne what the "current" label/s is. (there are many), filter/loop through them all, because one contact can have more than one label ALREADY. then use the results to add my Added label with all the previous ones also. I was just hoping i could just keep the contact with it's current labels, en "Patch" another label also.&lt;BR /&gt;but thank you, you confirmed this is not possible, IF I understood you correctly....&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 07:52:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/add-Label-do-not-overwrite-existing-label/m-p/1071504#M78355</guid>
      <dc:creator>karien</dc:creator>
      <dc:date>2024-11-19T07:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: add Label (do not overwrite existing label)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/add-Label-do-not-overwrite-existing-label/m-p/1071593#M78357</link>
      <description>&lt;P&gt;Yeah that's exactly what I would do too in that scenario.&amp;nbsp; I agree, a PATCH endpoint would definitely be useful.&amp;nbsp; Maybe HubSpot is adding that later.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 10:49:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/add-Label-do-not-overwrite-existing-label/m-p/1071593#M78357</guid>
      <dc:creator>WesQ</dc:creator>
      <dc:date>2024-11-19T10:49:07Z</dc:date>
    </item>
  </channel>
</rss>

