<?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: api v3 associations: are constants defined for &amp;quot;fromObjectType&amp;quot; and &amp;quot;toObjectType in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/api-v3-associations-are-constants-defined-for-quot/m-p/421287#M41777</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Sorry to disappoint you but I'm not using the&amp;nbsp; V3 of the API. On my side I'm still using the legacy API.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face_with_tongue:"&gt;😜&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92013"&gt;@danhammari&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you are using the new API V3 I *guess* it's one of the "string" described in this reference file :&lt;BR /&gt;&lt;A href="https://github.com/HubSpot/hubspot-api-php/blob/master/lib/Crm/ObjectType.php" target="_blank"&gt;https://github.com/HubSpot/hubspot-api-php/blob/master/lib/Crm/ObjectType.php&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you are using the legacy API it's probably an integer as described in this reference file :&lt;BR /&gt;&lt;A href="https://github.com/HubSpot/hubspot-php/blob/master/src/Resources/CrmAssociations.php" target="_blank"&gt;https://github.com/HubSpot/hubspot-php/blob/master/src/Resources/CrmAssociations.php&lt;/A&gt;&lt;BR /&gt;$hubspot-&amp;gt;CrmAssociations()-&amp;gt;get( {an object id}, {a from2object type id} );&lt;BR /&gt;&lt;BR /&gt;Hope this help.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Mar 2021 16:35:50 GMT</pubDate>
    <dc:creator>ph_alti_trading</dc:creator>
    <dc:date>2021-03-23T16:35:50Z</dc:date>
    <item>
      <title>api v3 associations: are constants defined for "fromObjectType" and "toObjectType"?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/api-v3-associations-are-constants-defined-for-quot/m-p/420856#M41739</link>
      <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;I have been searching through the API v3 documentation but have not been able to find a list of valid strings that would satisfy the &lt;FONT face="terminal,monaco" size="2" color="#800000"&gt;fromObjectType&lt;/FONT&gt;&amp;nbsp;or &lt;FONT face="terminal,monaco" size="2" color="#800000"&gt;toObjectType&lt;/FONT&gt;&amp;nbsp;parameters of the HubSpot CRM Associations API.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;&lt;A href="https://developers.hubspot.com/docs/api/crm/associations" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/api/crm/associations&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;DIV class="flex-no-wrap align-center"&gt;&lt;STRONG&gt;POST&amp;nbsp;&lt;/STRONG&gt;&lt;FONT face="terminal,monaco" size="2" color="#800000"&gt;&lt;SPAN class="PathUrl__StyledPath-sc-10tqimu-3 gRmkdQ"&gt;&lt;SPAN class="private-truncated-string"&gt;&lt;SPAN class="private-truncated-string__inner"&gt;&lt;SPAN class="private-truncated-string__reverse"&gt;&lt;SPAN class="private-truncated-string__reverse__tail"&gt;&lt;SPAN class="private-truncated-string__reverse__content"&gt;/crm/v3/associations/{fromObjectType}/{toObjectType}/batch/read&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;I am also interested in using the HubSpot CRM Companies API to fetch deals associated with a given company.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;&lt;A href="https://developers.hubspot.com/docs/api/crm/companies" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/api/crm/companies&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;DIV class="flex-no-wrap align-center"&gt;&lt;STRONG&gt;GET&amp;nbsp;&lt;/STRONG&gt;&lt;FONT face="terminal,monaco" size="2" color="#800000"&gt;&lt;SPAN class="PathUrl__StyledPath-sc-10tqimu-3 gRmkdQ"&gt;&lt;SPAN class="private-truncated-string"&gt;&lt;SPAN class="private-truncated-string__inner"&gt;&lt;SPAN class="private-truncated-string__reverse"&gt;&lt;SPAN class="private-truncated-string__reverse__tail"&gt;&lt;SPAN class="private-truncated-string__reverse__content"&gt;/crm/v3/objects/companies/{companyId}/associations/{toObjectType}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;I am using the Hubspot API library in PHP to query the v3 endpoints, but the PHP library also does not provide a definitions list or set of constants. All of the &lt;SPAN class="PathUrl__StyledPath-sc-10tqimu-3 gRmkdQ"&gt;&lt;SPAN class="private-truncated-string"&gt;&lt;SPAN class="private-truncated-string__inner"&gt;&lt;SPAN class="private-truncated-string__reverse"&gt;&lt;SPAN class="private-truncated-string__reverse__tail"&gt;&lt;SPAN class="private-truncated-string__reverse__content"&gt;&lt;FONT face="terminal,monaco" size="2" color="#800000"&gt;to_object_type&lt;/FONT&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;and &lt;SPAN class="PathUrl__StyledPath-sc-10tqimu-3 gRmkdQ"&gt;&lt;SPAN class="private-truncated-string"&gt;&lt;SPAN class="private-truncated-string__inner"&gt;&lt;SPAN class="private-truncated-string__reverse"&gt;&lt;SPAN class="private-truncated-string__reverse__tail"&gt;&lt;SPAN class="private-truncated-string__reverse__content"&gt;&lt;FONT face="terminal,monaco" size="2" color="#800000"&gt;from_object_type&lt;/FONT&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;parameters are simply defined as string variables without a closed list of options or reference to allowed constants.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco" size="2" color="#0000FF"&gt;&amp;nbsp;language: PHP&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco" size="2" color="#0000FF"&gt;namespace: HubSpot\Client\Crm\Companies\Api&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco" size="2" color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; class: AssociationsApi&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco" size="2" color="#0000FF"&gt;&amp;nbsp; &amp;nbsp;method: getAll&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Could someone point me to where I can find a list of allowed association values? I am unsure of whether to use "deal" or "deals" or "company" or "companies" and would rather not have to guess my way through trial and error to determine which association values are valid.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 18:29:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/api-v3-associations-are-constants-defined-for-quot/m-p/420856#M41739</guid>
      <dc:creator>danhammari</dc:creator>
      <dc:date>2021-03-22T18:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: api v3 associations: are constants defined for "fromObjectType" and "toObjectType</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/api-v3-associations-are-constants-defined-for-quot/m-p/421261#M41769</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92013"&gt;@danhammari&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;I am going to throw a bunch of folks at this for you&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/148828"&gt;@quentin_lamamy&lt;/a&gt; , &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/142469"&gt;@philx&lt;/a&gt; , &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/118428"&gt;@AndrewFisher&lt;/a&gt; , &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/162201"&gt;@twnk&lt;/a&gt; , &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/137533"&gt;@ph_alti_trading&lt;/a&gt;&amp;nbsp; could any of you all help out here?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 16:12:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/api-v3-associations-are-constants-defined-for-quot/m-p/421261#M41769</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-03-23T16:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: api v3 associations: are constants defined for "fromObjectType" and "toObjectType</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/api-v3-associations-are-constants-defined-for-quot/m-p/421287#M41777</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Sorry to disappoint you but I'm not using the&amp;nbsp; V3 of the API. On my side I'm still using the legacy API.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face_with_tongue:"&gt;😜&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92013"&gt;@danhammari&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you are using the new API V3 I *guess* it's one of the "string" described in this reference file :&lt;BR /&gt;&lt;A href="https://github.com/HubSpot/hubspot-api-php/blob/master/lib/Crm/ObjectType.php" target="_blank"&gt;https://github.com/HubSpot/hubspot-api-php/blob/master/lib/Crm/ObjectType.php&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you are using the legacy API it's probably an integer as described in this reference file :&lt;BR /&gt;&lt;A href="https://github.com/HubSpot/hubspot-php/blob/master/src/Resources/CrmAssociations.php" target="_blank"&gt;https://github.com/HubSpot/hubspot-php/blob/master/src/Resources/CrmAssociations.php&lt;/A&gt;&lt;BR /&gt;$hubspot-&amp;gt;CrmAssociations()-&amp;gt;get( {an object id}, {a from2object type id} );&lt;BR /&gt;&lt;BR /&gt;Hope this help.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 16:35:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/api-v3-associations-are-constants-defined-for-quot/m-p/421287#M41777</guid>
      <dc:creator>ph_alti_trading</dc:creator>
      <dc:date>2021-03-23T16:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: api v3 associations: are constants defined for "fromObjectType" and "toObjectType</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/api-v3-associations-are-constants-defined-for-quot/m-p/421288#M41778</link>
      <description>I forgive you &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/137533"&gt;@ph_alti_trading&lt;/a&gt; :wink</description>
      <pubDate>Tue, 23 Mar 2021 16:37:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/api-v3-associations-are-constants-defined-for-quot/m-p/421288#M41778</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-03-23T16:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: api v3 associations: are constants defined for "fromObjectType" and "toObjectType</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/api-v3-associations-are-constants-defined-for-quot/m-p/421393#M41793</link>
      <description>&lt;P&gt;Hi ph_alti_trading,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for pointing out the ObjectType.php file. I tested using both the plural and singular versions of each term (e.g. company/companies, deal/deals) and found that the API was able to treat the singular and plural variants of each entity without distinction. I guess the API designers thought through the possibility that users would provide either term and allowed the API to handle them without error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Meanwhile, I will use the ObjectType.php file as the source of my constants when I am scripting my association queries:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="terminal,monaco" size="2" color="#333399"&gt;namespace: HubSpot\Crm&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="terminal,monaco" size="2" color="#333399"&gt;&amp;nbsp; &amp;nbsp; class: ObjectType&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="terminal,monaco" size="2" color="#333399"&gt;&amp;nbsp; example:&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="terminal,monaco" size="2" color="#333399"&gt;$hubspot_api_company_helper-&amp;gt;associationsApi()-&amp;gt;getAll( $hubspot_company_id,&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="terminal,monaco" size="2" color="#333399"&gt;\HubSpot\Crm\&lt;SPAN&gt;ObjectType&lt;/SPAN&gt;::&lt;SPAN&gt;&lt;I&gt;DEALS&lt;/I&gt;&lt;/SPAN&gt;&amp;nbsp;);&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 19:40:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/api-v3-associations-are-constants-defined-for-quot/m-p/421393#M41793</guid>
      <dc:creator>danhammari</dc:creator>
      <dc:date>2021-03-23T19:40:04Z</dc:date>
    </item>
  </channel>
</rss>

