<?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: Associate a Standard and Custom Object in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Associate-a-Standard-and-Custom-Object/m-p/479325#M45969</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/228891"&gt;@AMorales7&lt;/a&gt;&amp;nbsp;, associations for custom objects are created automatically for some standard objects &lt;A href="https://developers.hubspot.com/docs/api/crm/crm-custom-objects" target="_blank" rel="noopener"&gt;as per the documentation in this link.&lt;/A&gt;&amp;nbsp;This means that the moment you create a custom object&amp;nbsp;there are association definitions automatically created between the custom object and email, meeting_event, note, task, call, and conversation_session.&lt;U&gt;&lt;BR /&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So the first thing to do is check the existing associations and their ids with&amp;nbsp;&lt;CODE&gt;POST &lt;A href="https://api.hubapi.com/crm/v3/schemas/{objectType}/associations" target="_blank"&gt;https://api.hubapi.com/crm/v3/schemas/{objectType}/associations&lt;/A&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;As for the cardinality so far I think it's defaulted by hubspot you can define it with the associations endpoint but overwriting it won't work as expected, I have tried changing the association between my custom object and contacts to be ONE TO ONE / ONE_TO_MANY (one contact per custom object/many custom objects per contact) like below, it kind of worked but in the hubspot panel interface I could still choose multiple objects (contacts) but only the last one selected would stay (works but buggy).&lt;BR /&gt;So with a POST to&amp;nbsp;&lt;CODE&gt;&lt;A href="https://api.hubapi.com/crm/v3/schemas/{CUSTOM_OBJECT_ID}/associations" target="_blank"&gt;https://api.hubapi.com/crm/v3/schemas/{CUSTOM_OBJECT_ID}/associations&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;         {
            "fromObjectTypeId": "&amp;lt;CUSTOM_OBJECT_ID&amp;gt;",
            "toObjectTypeId": "&amp;lt;TARGET_OBJECT_ID&amp;gt;",
            "name": "&amp;lt;ASSOCIATION_NAME&amp;gt;",
            "cardinality": "ONE_TO_ONE",
            "inverseCardinality": "ONE_TO_MANY",
            "id": "&amp;lt;ASSOCIATION_ID&amp;gt;"
        },
        {
            "fromObjectTypeId": "&amp;lt;TARGET_OBJECT_ID&amp;gt;",
            "toObjectTypeId": "&amp;lt;CUSTOM_OBJECT_ID&amp;gt;",
            "name": "&amp;lt;INVERSE_ASSOCIATION_NAME&amp;gt;",
            "cardinality": "ONE_TO_MANY",
            "inverseCardinality": "ONE_TO_ONE",
            "id": "&amp;lt;INVERSE_ASSOCIATION_ID&amp;gt;"
        }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;At last &lt;A href="https://community.hubspot.com/t5/HubSpot-Ideas/One-to-many-custom-object-associations/idi-p/372856" target="_blank" rel="noopener"&gt;I'm attatching this link here&lt;/A&gt; where there is some discussion related to this topic.&lt;BR /&gt;If you need further assistance don't hesitate to write here.&lt;BR /&gt;&lt;BR /&gt;There is also this great resource in &lt;A href="https://developers.hubspot.com/docs/api/crm/crm-custom-objects" target="_blank" rel="noopener"&gt;this link right here that might help you get started&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;If my answer was helpful please mark it as a solution.&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;FONT size="2"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;&amp;nbsp;see I'm into API's too!!! Please tag other people who you think might be of help, I haven't made any friends here yet (except of you ofcourse) &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 14 Aug 2021 16:23:02 GMT</pubDate>
    <dc:creator>miljkovicmisa</dc:creator>
    <dc:date>2021-08-14T16:23:02Z</dc:date>
    <item>
      <title>Associate a Standard and Custom Object</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Associate-a-Standard-and-Custom-Object/m-p/479312#M45968</link>
      <description>&lt;P&gt;Hello All!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New to HubSpot and was looking to associate Contacts to 'Custom_Object_x' in our instance. Would I use the instructions here (&lt;A href="https://legacydocs.hubspot.com/docs/methods/crm-associations/associate-objects" target="_blank" rel="noopener"&gt;https://legacydocs.hubspot.com/docs/methods/crm-associations/associate-objects&lt;/A&gt;) to 'Associate Custom Objects'? How would I define cardinality? (Do I need to define it?) It would be a one to many in this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an example call you used? I have just started working with HubSpots APIs and would greatly appreciate any guidance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2021 15:30:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Associate-a-Standard-and-Custom-Object/m-p/479312#M45968</guid>
      <dc:creator>AMorales7</dc:creator>
      <dc:date>2021-08-14T15:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Associate a Standard and Custom Object</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Associate-a-Standard-and-Custom-Object/m-p/479325#M45969</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/228891"&gt;@AMorales7&lt;/a&gt;&amp;nbsp;, associations for custom objects are created automatically for some standard objects &lt;A href="https://developers.hubspot.com/docs/api/crm/crm-custom-objects" target="_blank" rel="noopener"&gt;as per the documentation in this link.&lt;/A&gt;&amp;nbsp;This means that the moment you create a custom object&amp;nbsp;there are association definitions automatically created between the custom object and email, meeting_event, note, task, call, and conversation_session.&lt;U&gt;&lt;BR /&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So the first thing to do is check the existing associations and their ids with&amp;nbsp;&lt;CODE&gt;POST &lt;A href="https://api.hubapi.com/crm/v3/schemas/{objectType}/associations" target="_blank"&gt;https://api.hubapi.com/crm/v3/schemas/{objectType}/associations&lt;/A&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;As for the cardinality so far I think it's defaulted by hubspot you can define it with the associations endpoint but overwriting it won't work as expected, I have tried changing the association between my custom object and contacts to be ONE TO ONE / ONE_TO_MANY (one contact per custom object/many custom objects per contact) like below, it kind of worked but in the hubspot panel interface I could still choose multiple objects (contacts) but only the last one selected would stay (works but buggy).&lt;BR /&gt;So with a POST to&amp;nbsp;&lt;CODE&gt;&lt;A href="https://api.hubapi.com/crm/v3/schemas/{CUSTOM_OBJECT_ID}/associations" target="_blank"&gt;https://api.hubapi.com/crm/v3/schemas/{CUSTOM_OBJECT_ID}/associations&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;         {
            "fromObjectTypeId": "&amp;lt;CUSTOM_OBJECT_ID&amp;gt;",
            "toObjectTypeId": "&amp;lt;TARGET_OBJECT_ID&amp;gt;",
            "name": "&amp;lt;ASSOCIATION_NAME&amp;gt;",
            "cardinality": "ONE_TO_ONE",
            "inverseCardinality": "ONE_TO_MANY",
            "id": "&amp;lt;ASSOCIATION_ID&amp;gt;"
        },
        {
            "fromObjectTypeId": "&amp;lt;TARGET_OBJECT_ID&amp;gt;",
            "toObjectTypeId": "&amp;lt;CUSTOM_OBJECT_ID&amp;gt;",
            "name": "&amp;lt;INVERSE_ASSOCIATION_NAME&amp;gt;",
            "cardinality": "ONE_TO_MANY",
            "inverseCardinality": "ONE_TO_ONE",
            "id": "&amp;lt;INVERSE_ASSOCIATION_ID&amp;gt;"
        }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;At last &lt;A href="https://community.hubspot.com/t5/HubSpot-Ideas/One-to-many-custom-object-associations/idi-p/372856" target="_blank" rel="noopener"&gt;I'm attatching this link here&lt;/A&gt; where there is some discussion related to this topic.&lt;BR /&gt;If you need further assistance don't hesitate to write here.&lt;BR /&gt;&lt;BR /&gt;There is also this great resource in &lt;A href="https://developers.hubspot.com/docs/api/crm/crm-custom-objects" target="_blank" rel="noopener"&gt;this link right here that might help you get started&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;If my answer was helpful please mark it as a solution.&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;FONT size="2"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;&amp;nbsp;see I'm into API's too!!! Please tag other people who you think might be of help, I haven't made any friends here yet (except of you ofcourse) &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2021 16:23:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Associate-a-Standard-and-Custom-Object/m-p/479325#M45969</guid>
      <dc:creator>miljkovicmisa</dc:creator>
      <dc:date>2021-08-14T16:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Associate a Standard and Custom Object</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Associate-a-Standard-and-Custom-Object/m-p/479884#M45988</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/228891"&gt;@AMorales7&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;You can use this documentation for Custom_Object_x associate to Custom_Object_y\r\nLink : https://developers.hubspot.com/blog/introducing-custom-objects-for-hubspot&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:1049405,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;6&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;7&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;8&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;11&amp;quot;:4,&amp;quot;12&amp;quot;:0,&amp;quot;23&amp;quot;:1}" data-sheets-textstyleruns="{&amp;quot;1&amp;quot;:0}[null,88,{&amp;quot;2&amp;quot;:[null,2,1136076],&amp;quot;9&amp;quot;:1}]" data-sheets-hyperlinkruns="[null,88,&amp;quot;https://developers.hubspot.com/blog/introducing-custom-objects-for-hubspot&amp;quot;]{&amp;quot;1&amp;quot;:162}"&gt;You can use this documentation for Custom_Object_x associate to Custom_Object_y &lt;BR /&gt;Link : &lt;A class="in-cell-link" href="https://developers.hubspot.com/blog/introducing-custom-objects-for-hubspot" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/blog/introducing-custom-objects-for-hubspot&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;SPAN&gt;Hope this helps!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;If we were able to answer your query, kindly help the community by marking it as a solution.&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 13:21:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Associate-a-Standard-and-Custom-Object/m-p/479884#M45988</guid>
      <dc:creator>webdew</dc:creator>
      <dc:date>2021-08-16T13:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Associate a Standard and Custom Object</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Associate-a-Standard-and-Custom-Object/m-p/480030#M46000</link>
      <description>&lt;P data-unlink="true"&gt;Incredibly helpful&amp;nbsp;&lt;SPAN class=""&gt;miljkovicmisa!! &lt;/SPAN&gt;&amp;nbsp;Many thanks for all the great detail. I dug into the docs you sent over the weekend. Quick question. If I wanted to check associations and get their ID's as you mentioned wouldnt I use a GET call vs a POST?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 16:26:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Associate-a-Standard-and-Custom-Object/m-p/480030#M46000</guid>
      <dc:creator>AMorales7</dc:creator>
      <dc:date>2021-08-16T16:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Associate a Standard and Custom Object</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Associate-a-Standard-and-Custom-Object/m-p/501701#M47227</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/166093"&gt;@miljkovicmisa&lt;/a&gt;&amp;nbsp;Purhaps you have an answer to my problem with Custom Objects as well.&lt;/P&gt;&lt;P&gt;I need to include custom object (CO) tokens in automated mails with standard objects:&lt;/P&gt;&lt;P&gt;1. Contact properties&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Associated CO properties&lt;/P&gt;&lt;P&gt;3. Deal properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've made the custom object (called Recipients) through API, and the object have a one-to-many relation with Deal object.&amp;nbsp; In other words the Recipent can have several Deals, but the Deal can only have one Recipient.&amp;nbsp;&lt;BR /&gt;I want to be able to include a contacts name, as well as the Recipient name, and the Deal name, but the Deal-centeret flow does not seem to pull the associated object property. The contact name is no problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope someone can help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 08:19:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Associate-a-Standard-and-Custom-Object/m-p/501701#M47227</guid>
      <dc:creator>AGaardsted</dc:creator>
      <dc:date>2021-09-28T08:19:03Z</dc:date>
    </item>
  </channel>
</rss>

