<?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 Contact association with a custom Object in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Contact-association-with-a-custom-Object/m-p/754631#M61342</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm building for my customer automation that creates a record in a custom object. This custom object has a foreign key value with a contact username. When my customer click on the username, he would like to find the association with the Contacts automatically. Can you please help me on defining which Endpoint should I use to create this association?&lt;/P&gt;&lt;P&gt;With some examples&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SErrigo_0-1676026584519.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/85137i62DB0947F7ECB36E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SErrigo_0-1676026584519.png" alt="SErrigo_0-1676026584519.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SErrigo_1-1676026778299.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/85138iBDB8F7CB32175B01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SErrigo_1-1676026778299.png" alt="SErrigo_1-1676026778299.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2023 11:00:59 GMT</pubDate>
    <dc:creator>SErrigo</dc:creator>
    <dc:date>2023-02-10T11:00:59Z</dc:date>
    <item>
      <title>Contact association with a custom Object</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Contact-association-with-a-custom-Object/m-p/754631#M61342</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm building for my customer automation that creates a record in a custom object. This custom object has a foreign key value with a contact username. When my customer click on the username, he would like to find the association with the Contacts automatically. Can you please help me on defining which Endpoint should I use to create this association?&lt;/P&gt;&lt;P&gt;With some examples&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SErrigo_0-1676026584519.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/85137i62DB0947F7ECB36E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SErrigo_0-1676026584519.png" alt="SErrigo_0-1676026584519.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SErrigo_1-1676026778299.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/85138iBDB8F7CB32175B01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SErrigo_1-1676026778299.png" alt="SErrigo_1-1676026778299.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 11:00:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Contact-association-with-a-custom-Object/m-p/754631#M61342</guid>
      <dc:creator>SErrigo</dc:creator>
      <dc:date>2023-02-10T11:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Contact association with a custom Object</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Contact-association-with-a-custom-Object/m-p/754963#M61360</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/519393"&gt;@SErrigo&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Here's what you'll need to get started building.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Query this endpoint,&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/crm/associations#:~:text=Retrieve%20association%20types" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Retrieve association types&lt;/STRONG&gt;&lt;/A&gt;, to get the association type IDs from &lt;EM&gt;your Custom Object&lt;/EM&gt; to the Contacts object. Here's my example using my custom object Boat:&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;GET /crm/v4/associations/boat/contacts/labels​&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;{
    "results": [
        {
            "category": "USER_DEFINED",
            "typeId": 17,
            "label": "tacos"
        },
        {
            "category": "USER_DEFINED",
            "typeId": 22,
            "label": "Hamburger"
        },
        {
            "category": "USER_DEFINED",
            "typeId": 20,
            "label": "Pizza"
        },
        {
            "category": "USER_DEFINED",
            "typeId": 15,
            "label": null
        }
    ]
}&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Then we can use the&amp;nbsp;Associate an object with another object endpoint to create the association. Documentation — &lt;A href="https://developers.hubspot.com/docs/api/crm/associations#:~:text=Associate%20records%20and%20set%20an%20association%20label" target="_blank" rel="noopener"&gt;Associate records and set an association label&lt;/A&gt;. &lt;BR /&gt;My example:&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;curl --request PUT \
  --url https://api.hubapi.com/crm/v3/objects/2-7913954/4367801976/associations/0-1/901/17 \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'​&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;HTTP 200

{
  "id": "4367801976",
  "properties": {
    "hs_createdate": "2022-12-07T22:51:37.024Z",
    "hs_lastmodifieddate": "2022-12-07T22:51:37.024Z",
    "hs_object_id": "4367801976"
  },
  "createdAt": "2022-12-07T22:51:37.024Z",
  "updatedAt": "2022-12-07T22:51:37.024Z",
  "archived": false,
  "associations": {
    "contacts": {
      "results": [
        {
          "id": "501",
          "type": "boat_to_contact"
        },
        {
          "id": "601",
          "type": "boat_to_contact"
        },
        {
          "id": "901",
          "type": "boat_to_contact"
        },
        {
          "id": "901",
          "type": "tacos"
        }
      ]
    }
  }
}&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This set the association from Boat &amp;gt; Contact for my contact Bob Belcher (contact ID 901) and used the custom association label I created previously called tacos (I must have needed lunch that day… &lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;)&lt;BR /&gt;&lt;BR /&gt;Have fun building! — Jaycee&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 22:22:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Contact-association-with-a-custom-Object/m-p/754963#M61360</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-02-10T22:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Contact association with a custom Object</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Contact-association-with-a-custom-Object/m-p/755308#M61384</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;&amp;nbsp;this is exactly what I was looking for.&lt;/P&gt;&lt;P&gt;I hope you eat something after this&lt;span class="lia-unicode-emoji" title=":winking_face_with_tongue:"&gt;😜&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Feb 2023 08:34:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Contact-association-with-a-custom-Object/m-p/755308#M61384</guid>
      <dc:creator>SErrigo</dc:creator>
      <dc:date>2023-02-13T08:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Contact association with a custom Object</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Contact-association-with-a-custom-Object/m-p/856975#M67818</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/519393"&gt;@SErrigo&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm a little late to the party but have you heard of&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://ecosystem.hubspot.com/marketplace/apps/productivity/workflow-automation/associations-app-272901" target="_blank" rel="noopener nofollow noreferrer"&gt;Associ8&lt;/A&gt;&lt;SPAN&gt;? It lets you automatically create associations between objects based on parameters you set. There's some documentation showing how it works&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://hapily.com/blog/associ8-technical-deep-dive" target="_blank" rel="noopener nofollow noreferrer"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if you have any questions! I'd be happy to talk with you about it in more detail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-David Staat&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 20:13:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Contact-association-with-a-custom-Object/m-p/856975#M67818</guid>
      <dc:creator>DStaat</dc:creator>
      <dc:date>2023-09-28T20:13:17Z</dc:date>
    </item>
  </channel>
</rss>

