<?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: `category` field in associations in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/category-field-in-associations/m-p/1174163#M83097</link>
    <description>&lt;P&gt;Hey &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127312"&gt;@Sachavskyi&lt;/a&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; You've correctly identified a current limitation of the API. There's no better workaround at the moment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The best way to get this in front of our product team is to submit your findings through the official &lt;A href="https://developers.hubspot.com/feedback" target="_blank"&gt;&lt;STRONG&gt;Developer Feedback form&lt;/STRONG&gt;&lt;/A&gt;. That's the most effective channel for suggesting the exact kind of improvement you've detailed here. — Jaycee&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jul 2025 16:57:02 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2025-07-08T16:57:02Z</dc:date>
    <item>
      <title>`category` field in associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/category-field-in-associations/m-p/1168633#M82822</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm retrieving the association configuration (specifically, I want to know&amp;nbsp;&lt;CODE data-start="206" data-end="222"&gt;maxToObjectIds&lt;/CODE&gt;) using the&amp;nbsp;&lt;CODE data-start="234" data-end="255"&gt;/crm/v3/schemas/0-1&lt;/CODE&gt;&amp;nbsp;endpoint. In the response, I see two associations with the same ID:&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;{&lt;BR /&gt;    ....&lt;BR /&gt;    &lt;SPAN&gt;"associations"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;[&lt;BR /&gt;        {&lt;BR /&gt;            &lt;SPAN&gt;"fromObjectTypeId"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"0-1"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"toObjectTypeId"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"0-2"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"CONTACT_TO_COMPANY"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"cardinality"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"ONE_TO_ONE"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"inverseCardinality"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"ONE_TO_MANY"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"hasUserEnforcedMaxToObjectIds"&lt;/SPAN&gt;&lt;SPAN&gt;: false,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"hasUserEnforcedMaxFromObjectIds"&lt;/SPAN&gt;&lt;SPAN&gt;: false,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"maxToObjectIds"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"maxFromObjectIds"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;50000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"id"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"1"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"createdAt"&lt;/SPAN&gt;&lt;SPAN&gt;: null,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"updatedAt"&lt;/SPAN&gt;&lt;SPAN&gt;: null&lt;BR /&gt;&lt;/SPAN&gt;        }&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;        {&lt;BR /&gt;            &lt;SPAN&gt;"fromObjectTypeId"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"0-1"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"toObjectTypeId"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"0-2"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"referredby"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"cardinality"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"ONE_TO_ONE"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"inverseCardinality"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"ONE_TO_MANY"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"hasUserEnforcedMaxToObjectIds"&lt;/SPAN&gt;&lt;SPAN&gt;: false,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"hasUserEnforcedMaxFromObjectIds"&lt;/SPAN&gt;&lt;SPAN&gt;: false,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"maxToObjectIds"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"maxFromObjectIds"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;50000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"id"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"1"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"createdAt"&lt;/SPAN&gt;&lt;SPAN&gt;: null,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"updatedAt"&lt;/SPAN&gt;&lt;SPAN&gt;: null&lt;BR /&gt;&lt;/SPAN&gt;        }&lt;BR /&gt;    ]&lt;BR /&gt;}&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;SPAN&gt;Notice: we don't have&amp;nbsp;&lt;CODE data-start="1708" data-end="1716"&gt;category&lt;/CODE&gt;&amp;nbsp;field here.&lt;BR /&gt;The next step: I want to know labels for these associations and&amp;nbsp;&lt;/SPAN&gt;I sent a request to retrieve all association labels between Contact and Company:&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;GET https://api.hubapi.com/crm/v4/associations/0-1/0-2/labels HTTP/1.1&lt;/PRE&gt;
&lt;P&gt;And got the following response:&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;HTTP/1.1 200 OK&lt;BR /&gt;.....&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;    "results": [&lt;BR /&gt;        {&lt;BR /&gt;            "category": "USER_DEFINED",&lt;BR /&gt;            "typeId": 1,&lt;BR /&gt;            "label": "Referred By"&lt;BR /&gt;        },&lt;BR /&gt;        {&lt;BR /&gt;            "category": "HUBSPOT_DEFINED",&lt;BR /&gt;            "typeId": 1,&lt;BR /&gt;            "label": "Primary"&lt;BR /&gt;        }&lt;BR /&gt;    ]&lt;BR /&gt;}&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG data-start="1571" data-end="1590"&gt;My question is:&lt;/STRONG&gt;&lt;BR data-start="1590" data-end="1593" /&gt;How can I determine which label corresponds to which association configuration when they both share the same&amp;nbsp;&lt;CODE data-start="1708" data-end="1716"&gt;typeId&lt;/CODE&gt;?&lt;BR /&gt;&lt;BR /&gt;I need&amp;nbsp;&lt;CODE data-start="1708" data-end="1716"&gt;category&lt;/CODE&gt; field in the&amp;nbsp;&lt;CODE data-start="234" data-end="255"&gt;/crm/v3/schemas/0-1&lt;/CODE&gt; response.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 14:50:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/category-field-in-associations/m-p/1168633#M82822</guid>
      <dc:creator>Sachavskyi</dc:creator>
      <dc:date>2025-06-24T14:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: `category` field in associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/category-field-in-associations/m-p/1169299#M82853</link>
      <description>&lt;P&gt;Hey, &lt;SPAN style="color:var(--ck-color-mention-text);"&gt;&lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127312"&gt;@Sachavskyi&lt;/a&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Great question. And one that uncovers a current limitation in the API design.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried something like:&lt;/P&gt;
&lt;UL&gt;
 &lt;LI&gt;call the `&lt;A href="https://api.hubapi.com/crm/v4/associations/{fromObjectType}/{toObjectType}/labels" target="_blank"&gt;GET /crm/v4/associations/{fromObjectTypeId}/{toObjectTypeId}/labels&lt;/A&gt;` endpoint to get the `typeId` and category for all association types&lt;/LI&gt;
 &lt;LI&gt;filter this list and find your target association (e.g., where label is "Referred By" and category is USER_DEFINED). Note its `typeId`&lt;/LI&gt;
 &lt;LI&gt;call the `&lt;A href="https://api.hubapi.com/crm-object-schemas/v3/schemas/{objectType}" target="_blank"&gt;GET /crm-object-schemas/v3/schemas/{objectType}&lt;/A&gt;` endpoint&lt;/LI&gt;
 &lt;LI&gt;find the association where the `id` matches the `typeId` from step 2 and the name logically matches your custom association's name (e.g., `referredby`)&lt;/LI&gt;
 &lt;LI&gt;you can then pull the `maxToObjectIds` from that object&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;And if this doesn't work, please let us know, as that is useful in continued troubleshooting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 20:32:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/category-field-in-associations/m-p/1169299#M82853</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2025-06-25T20:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: `category` field in associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/category-field-in-associations/m-p/1169480#M82865</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127312"&gt;@Sachavskyi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you want to know which type ID is corresponding to which association. If so, here is the link that will tell the typeID and Association type -&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/guides/api/crm/associations/associations-v4" target="_blank"&gt;https://developers.hubspot.com/docs/guides/api/crm/associations/associations-v4&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I hope this will help you out. Please mark it as &lt;/SPAN&gt;&lt;STRONG&gt;Solution Accepted and upvote&lt;/STRONG&gt;&lt;SPAN&gt; to help another Community member.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 07:01:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/category-field-in-associations/m-p/1169480#M82865</guid>
      <dc:creator>GRajput</dc:creator>
      <dc:date>2025-06-26T07:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: `category` field in associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/category-field-in-associations/m-p/1169556#M82873</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;!&lt;/P&gt;
&lt;P data-start="66" data-end="127"&gt;Thank you for your response, but it doesn’t work as expected:&lt;/P&gt;
&lt;BLOCKQUOTE data-start="129" data-end="285"&gt;
&lt;P data-start="131" data-end="285"&gt;&lt;EM data-start="131" data-end="285"&gt;Find the association where the &lt;CODE data-start="163" data-end="167"&gt;id&lt;/CODE&gt; matches the &lt;CODE data-start="180" data-end="188"&gt;typeId&lt;/CODE&gt; from step 2 and the name logically matches your custom association's name (e.g., &lt;CODE data-start="270" data-end="282"&gt;referredby&lt;/CODE&gt;).&lt;/EM&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P data-start="287" data-end="608"&gt;What do you mean by "the name logically matches your custom association's name"? How can I reliably do that in my code?&lt;BR data-start="406" data-end="409" /&gt;For example, what if I have an association with &lt;CODE data-start="457" data-end="481"&gt;"label": "Referred By"&lt;/CODE&gt; and &lt;CODE data-start="486" data-end="502"&gt;"name": "test"&lt;/CODE&gt;? In that case, I wouldn’t be able to find the correct association based on a "logical" match to the name.&lt;/P&gt;
&lt;P data-start="610" data-end="759"&gt;That’s why I believe the best solution would be to include the &lt;CODE data-start="129" data-end="139"&gt;category&lt;/CODE&gt; field in the response of &lt;CODE data-start="165" data-end="214"&gt;GET /crm-object-schemas/v3/schemas/{objectType}&lt;/CODE&gt;, so we can reliably match associations using both &lt;CODE data-start="265" data-end="273"&gt;typeId&lt;/CODE&gt; and &lt;CODE data-start="278" data-end="288"&gt;category&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 09:29:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/category-field-in-associations/m-p/1169556#M82873</guid>
      <dc:creator>Sachavskyi</dc:creator>
      <dc:date>2025-06-26T09:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: `category` field in associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/category-field-in-associations/m-p/1174163#M83097</link>
      <description>&lt;P&gt;Hey &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127312"&gt;@Sachavskyi&lt;/a&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; You've correctly identified a current limitation of the API. There's no better workaround at the moment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The best way to get this in front of our product team is to submit your findings through the official &lt;A href="https://developers.hubspot.com/feedback" target="_blank"&gt;&lt;STRONG&gt;Developer Feedback form&lt;/STRONG&gt;&lt;/A&gt;. That's the most effective channel for suggesting the exact kind of improvement you've detailed here. — Jaycee&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 16:57:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/category-field-in-associations/m-p/1174163#M83097</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2025-07-08T16:57:02Z</dc:date>
    </item>
  </channel>
</rss>

