<?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 API pull of data through association tied to custom object in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/API-pull-of-data-through-association-tied-to-custom-object/m-p/958873#M72696</link>
    <description>&lt;P&gt;We are struggling to integrate with a third party vendor for SSO, I need to understand how can we pull data from a custom object through an association to a company or contact record...in our use case, we need to query about the membership status as an individual in the system, the membership truth is housed on our Membership custom object, tied to the Company via an association...so we need to drill from Contact&amp;gt;&amp;gt;Primary Company&amp;gt;&amp;gt;Membership (custom object) etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do we query from say a ContactID to get at whether their Primary company has Membership association (and drill into that object data as well as needed)?&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2024 18:54:05 GMT</pubDate>
    <dc:creator>BBirch6</dc:creator>
    <dc:date>2024-04-11T18:54:05Z</dc:date>
    <item>
      <title>API pull of data through association tied to custom object</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/API-pull-of-data-through-association-tied-to-custom-object/m-p/958873#M72696</link>
      <description>&lt;P&gt;We are struggling to integrate with a third party vendor for SSO, I need to understand how can we pull data from a custom object through an association to a company or contact record...in our use case, we need to query about the membership status as an individual in the system, the membership truth is housed on our Membership custom object, tied to the Company via an association...so we need to drill from Contact&amp;gt;&amp;gt;Primary Company&amp;gt;&amp;gt;Membership (custom object) etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do we query from say a ContactID to get at whether their Primary company has Membership association (and drill into that object data as well as needed)?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 18:54:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/API-pull-of-data-through-association-tied-to-custom-object/m-p/958873#M72696</guid>
      <dc:creator>BBirch6</dc:creator>
      <dc:date>2024-04-11T18:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: API pull of data through association tied to custom object</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/API-pull-of-data-through-association-tied-to-custom-object/m-p/958899#M72698</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/708323"&gt;@BBirch6&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can make an GET API call to the &lt;A href="https://developers.hubspot.com/docs/api/crm/contacts" target="_blank" rel="noopener"&gt;contacts endpoint&lt;/A&gt; to retrieve the properties of that specific contact. You can simply pass ?associations=companies in the URL to get the associated companies in that response as well. It will also state the association types, so its quite easy to retrieve the primary company.&lt;/P&gt;
&lt;P&gt;Once you have the ID of the primary company, you can make a second GET request to the &lt;A href="https://developers.hubspot.com/docs/api/crm/companies" target="_blank" rel="noopener"&gt;companies&lt;/A&gt; endpoint and pass the ?associations=memberships in that call. That will give you the ID of the associated membership record. (The internal name of your custom object might be different). Once you have the ID of the membership record, you can make your final API call to retrieve that records properties to the custom object endpoint.&lt;/P&gt;
&lt;P&gt;Another approach is to use a &lt;A href="https://developers.hubspot.com/docs/cms/data/query-hubspot-data-using-graphql" target="_blank" rel="noopener"&gt;GraphQL&lt;/A&gt; query to retrieve all that data in a single API call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 19:26:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/API-pull-of-data-through-association-tied-to-custom-object/m-p/958899#M72698</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2024-04-11T19:26:17Z</dc:date>
    </item>
  </channel>
</rss>

