<?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: I am not able to fetch the primary company from the deal api in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/I-am-not-able-to-fetch-the-primary-company-from-the-deal-api/m-p/1142243#M81840</link>
    <description>&lt;P&gt;My example:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I created a Deal&lt;/LI&gt;
&lt;LI&gt;Associated 4 companies with it, with one being the Primary&lt;/LI&gt;
&lt;LI&gt;Used the Deal ID to make a request to the Associations API&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;View the label “Primary”&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Request&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;GET {{API URL}}/crm/v4/objects/0-3/36526838310/associations/0-2 &lt;/LI-CODE&gt;
&lt;P&gt;Response&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "results": [
        {
            "toObjectId": 10202231613,
            "associationTypes": [
                {
                    "category": "HUBSPOT_DEFINED",
                    "typeId": 5,
                    "label": "Primary"
                },
                {
                    "category": "HUBSPOT_DEFINED",
                    "typeId": 341,
                    "label": null
                }
            ]
        },
        {
            "toObjectId": 11685858563,
            "associationTypes": [
                {
                    "category": "HUBSPOT_DEFINED",
                    "typeId": 341,
                    "label": null
                }
            ]
        },
        {
            "toObjectId": 13861282304,
            "associationTypes": [
                {
                    "category": "HUBSPOT_DEFINED",
                    "typeId": 341,
                    "label": null
                }
            ]
        },
        {
            "toObjectId": 16053398365,
            "associationTypes": [
                {
                    "category": "HUBSPOT_DEFINED",
                    "typeId": 341,
                    "label": null
                }
            ]
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
    <pubDate>Tue, 29 Apr 2025 15:50:14 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2025-04-29T15:50:14Z</dc:date>
    <item>
      <title>I am not able to fetch the primary company from the deal api</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/I-am-not-able-to-fetch-the-primary-company-from-the-deal-api/m-p/1141974#M81827</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am using Hubspot API and fetching data through Airbyte, for deals api, I can see that there are multiple companies id, how do I identify the which is primary company associated to that deal?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;"archived": false,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;"companies": [&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;"19642076053",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;"19473581391",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;"19642076053"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;],&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;"contacts": [&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;"20437202"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;],&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;"createdAt": "2024-02-08T03:51:49.123Z",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;"id": "18040077916",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;"line_items": [&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;"28045840280"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;],&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;"properties": {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;"account_legal_name": null,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;"account_manager": null,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;"ace_opportunity_id_url": null,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;"activation": null,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;"activation_type": "One Time",&lt;/DIV&gt;&lt;DIV&gt;.......&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;"updatedAt": "2025-04-17T09:14:31.024Z"&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;This is how receive data through Airbyte, but I can't identify which is primary company?&lt;BR /&gt;&lt;BR /&gt;there is no associated fields also in this.&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 05:52:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/I-am-not-able-to-fetch-the-primary-company-from-the-deal-api/m-p/1141974#M81827</guid>
      <dc:creator>SKumar00</dc:creator>
      <dc:date>2025-04-29T05:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: I am not able to fetch the primary company from the deal api</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/I-am-not-able-to-fetch-the-primary-company-from-the-deal-api/m-p/1142240#M81839</link>
      <description>&lt;P&gt;Hey &lt;SPAN&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/935656"&gt;@SKumar00&lt;/a&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Welcome to our community! Thank you very much for your post. It may be worth checking with Airbyte on this question as well. I found their support forum &lt;A href="https://github.com/airbytehq/airbyte/discussions" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;here&lt;/STRONG&gt;&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stepping outside the connector, we would get those labels, such as Primary, from making a request to the Associations API endpoints and the response will include the labels you are after. I am not sure how Airbyte handles this, as it is not listed in the &lt;A href="https://docs.airbyte.com/integrations/sources/hubspot" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;documentation&lt;/STRONG&gt;&lt;/A&gt; specifically.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll add a quick example of what the response from the &lt;A href="https://developers.hubspot.com/docs/guides/api/crm/associations/associations-v4#retrieve-associated-records" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Associations API&lt;/STRONG&gt;&lt;/A&gt; looks like so you know what to expect from it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know this is not the answer you are after, and I want to share our available and documented options for meeting your goal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have fun testing! — Jaycee&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 15:47:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/I-am-not-able-to-fetch-the-primary-company-from-the-deal-api/m-p/1142240#M81839</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2025-04-29T15:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: I am not able to fetch the primary company from the deal api</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/I-am-not-able-to-fetch-the-primary-company-from-the-deal-api/m-p/1142243#M81840</link>
      <description>&lt;P&gt;My example:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I created a Deal&lt;/LI&gt;
&lt;LI&gt;Associated 4 companies with it, with one being the Primary&lt;/LI&gt;
&lt;LI&gt;Used the Deal ID to make a request to the Associations API&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;View the label “Primary”&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Request&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;GET {{API URL}}/crm/v4/objects/0-3/36526838310/associations/0-2 &lt;/LI-CODE&gt;
&lt;P&gt;Response&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "results": [
        {
            "toObjectId": 10202231613,
            "associationTypes": [
                {
                    "category": "HUBSPOT_DEFINED",
                    "typeId": 5,
                    "label": "Primary"
                },
                {
                    "category": "HUBSPOT_DEFINED",
                    "typeId": 341,
                    "label": null
                }
            ]
        },
        {
            "toObjectId": 11685858563,
            "associationTypes": [
                {
                    "category": "HUBSPOT_DEFINED",
                    "typeId": 341,
                    "label": null
                }
            ]
        },
        {
            "toObjectId": 13861282304,
            "associationTypes": [
                {
                    "category": "HUBSPOT_DEFINED",
                    "typeId": 341,
                    "label": null
                }
            ]
        },
        {
            "toObjectId": 16053398365,
            "associationTypes": [
                {
                    "category": "HUBSPOT_DEFINED",
                    "typeId": 341,
                    "label": null
                }
            ]
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 15:50:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/I-am-not-able-to-fetch-the-primary-company-from-the-deal-api/m-p/1142243#M81840</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2025-04-29T15:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: I am not able to fetch the primary company from the deal api</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/I-am-not-able-to-fetch-the-primary-company-from-the-deal-api/m-p/1142616#M81861</link>
      <description>&lt;P&gt;Thank you so much, I am able to get it.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2025 11:29:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/I-am-not-able-to-fetch-the-primary-company-from-the-deal-api/m-p/1142616#M81861</guid>
      <dc:creator>SKumar00</dc:creator>
      <dc:date>2025-04-30T11:29:04Z</dc:date>
    </item>
  </channel>
</rss>

