<?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: Pulling through companies - looking for ones that are specifically 'targeted' accounts in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/335666#M32635</link>
    <description>Hey Wendy!&lt;BR /&gt;&lt;BR /&gt;I am using contact lists for contacts, but the filtering question/issue was about getting companies using more than just 3 filters. Sorry if that wasn’t clear and than you as always for your reply. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
    <pubDate>Thu, 30 Apr 2020 07:32:20 GMT</pubDate>
    <dc:creator>ZamurphDev</dc:creator>
    <dc:date>2020-04-30T07:32:20Z</dc:date>
    <item>
      <title>Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/332512#M32231</link>
      <description>&lt;P&gt;Howdy folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently working to build an application that integrates the Hubspot API. I've got OAuth up and running and was able to pull through all the companies for an authenticated account. However, I have two questions, on about the API, and one about the Node hubspot client that was recommended in the API docs.&lt;BR /&gt;&lt;BR /&gt;1. Currently, I'm trying to pull through all the companies, and then of those, find the ones that show in the 'Targeted Accounts (Beta)' section of the Hubspot website. As I understand it, in order to do this I need to be looking for/requesting a specific property to be included with the returned companies in order to do this. I've tried looking asking for the 'hs_target_account' property, but when I do that none of the companies I get back have properties defined. But if I request the 'name' for example, I get all the name information for all the companies, as you'd expect. Does anyone know if this is just because it's a beta feature? Or am I using the incorrect property name here?&lt;BR /&gt;&lt;BR /&gt;2. This is more of a general question about the recommended hubspot client for Node from the docs. I've read through their documentation in the repository, and it's not super in-depth. When using the hubspot.companies.get(opts) method - how do I include multiple properties? In the API docs it says to include the properties query param multiple times in the request URL. However, when using the client, you just pass an object, with 'properties' as a key. If I pass just one property it's fine, but if I try to pass multiple, like 'name hs_target_account website' or 'name, hs_target_account, website' it fails to return anything. Presumably, because it's not parsing those properties into multiple different query params under the hood. Anyone have experience working with this client and know how to do that?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 02:01:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/332512#M32231</guid>
      <dc:creator>ZamurphDev</dc:creator>
      <dc:date>2020-04-19T02:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/332583#M32237</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127940"&gt;@ZamurphDev&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's walk through your query one by one!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Do you mind sharing with me an example company in the 'Targeted Accounts (Beta)' and the following so that I can further dig into things on my end:&lt;/P&gt;
&lt;P&gt;- Portal ID&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- The exact request endpoint that you're using&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. To clarify, how are you including multiple properties on the request URL? Do you have an example of your request url?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 01:12:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/332583#M32237</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-04-20T01:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/332586#M32239</link>
      <description>&lt;P&gt;Hey Wendy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Happy to walk through this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the I am attempting to pull data from an account with the portal ID&amp;nbsp;1917620. This account has 6 accounts that show up under the 'Targeted Accounts (Beta)'.&lt;BR /&gt;&lt;BR /&gt;As far as the endpoint, I am actually using the node HubSpot client found here:&amp;nbsp;&lt;A href="https://github.com/MadKudu/node-hubspot" target="_blank"&gt;https://github.com/MadKudu/node-hubspot&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was the client recommended in the documentation, though, I don't think it's an official client so I understand if you're not able to provide support for it. I am using the hubspot.companies.get() method and passing the following parameters as a JavaScript Object:&amp;nbsp;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;properties&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'name'&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;limit&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;250&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&amp;nbsp;- this works, but if I tried to request multiple properties, like this:&amp;nbsp;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;properties&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'name hs_is_target_account'&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;limit&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;250&lt;/SPAN&gt;&lt;SPAN&gt;} it fails (returns the companies still, but all of the properties on the companies are empty.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For what it's worth, I did some digging into this on my own, and when logged into an account that has access to the Targeted Accounts (Beta), if I navigate there through HubSpot's website in a browser using the navbar - the browser makes a POST request to the following endpoint &lt;A href="https://api.hubspot.com/contacts/search/v1/search/companies/v2?portalId=1917620&amp;amp;clienttimeout=60000" target="_blank"&gt;https://api.hubspot.com/contacts/search/v1/search/companies/v2?portalId=1917620&amp;amp;clienttimeout=60000&lt;/A&gt; and makes use of a filter object attached to the request which appears to be how it's getting at the data that I am looking for. I glanced at the docs for both the v1 and v2 API's that ya'll provide and wasn't able to find documentation on this endpoint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can point me in the right direction, that'd be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 02:31:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/332586#M32239</guid>
      <dc:creator>ZamurphDev</dc:creator>
      <dc:date>2020-04-20T02:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/333229#M32311</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127940"&gt;@ZamurphDev&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to clarify, are you looking to retrieve account that are under 'Targeted Accounts (Beta)'? Specifically the 6 accounts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, I'd suggest for you to use the&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/crm/search" target="_blank"&gt;CRM v3 API&lt;/A&gt;&amp;nbsp;as it allows you to search and filter CRM objects.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;POST &lt;EM&gt;&lt;A href="https://api.hubspot.com/crm/v3/objects/companies/search?hapikey={{hapikey" target="_blank"&gt;https://api.hubspot.com/crm/v3/objects/companies/search?hapikey={{hapikey&lt;/A&gt;}}&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;POST body&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "hs_is_target_account",
            "operator": "EQ",
            "value": "true"
          }
        ]
      }
    ]
  }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 03:43:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/333229#M32311</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-04-22T03:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/333535#M32357</link>
      <description>&lt;P&gt;Awesome, that's correct and looks like it should work. I'll mark your reply as the solution once I test it. Just to confirm, this will work with OAuth as opposed to the API key as well, correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this will endpoint will also work for retrieving all companies with multiple properties - i.e. name and website, is that correct?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 20:59:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/333535#M32357</guid>
      <dc:creator>ZamurphDev</dc:creator>
      <dc:date>2020-04-22T20:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/333578#M32362</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127940"&gt;@ZamurphDev&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is right! This will work with OAuth and HAPI Key.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This endpoint will also work for retrieving all companies with multiple properties set.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 01:06:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/333578#M32362</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-04-23T01:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/333584#M32364</link>
      <description>&lt;P&gt;Awesome, thanks Wendy. I have just one more question - can we get emails associated with a company, or do you have to get the contacts associate with that company and then pull the emails off of those contacts? Also, you've been a huge help, so thank you very much. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 01:16:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/333584#M32364</guid>
      <dc:creator>ZamurphDev</dc:creator>
      <dc:date>2020-04-23T01:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/333618#M32368</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127940"&gt;@ZamurphDev&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're most welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When looking to get emails associated with a company, you're spot on! As the email property is a contact property, you'd need to get the contact associated with the company and pull the email from there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One other workaround is to copy the contact email property value to a company email property (&lt;A href="https://blog.hubspot.com/customers/using-custom-properties-in-hubspot-crm" target="_self"&gt;you can create a custom company property for this&lt;/A&gt;) using a workflow and here's a useful guide on how you can implement this setup:&amp;nbsp;&lt;A href="https://blog.hubspot.com/customers/working-around-workflows" target="_blank"&gt;Working Around Workflows: A Guide to Copying Property Values&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 03:06:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/333618#M32368</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-04-23T03:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/335602#M32619</link>
      <description>&lt;P&gt;Great, thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, sorry for the late reply, but I do have another question (might have a few more as they come up, and will just bump this thread as necessary - if that's OK?) currently the CRM API only allows for three filters per filter group. If I wanted to query for more than just 3 AND properties - is there an easy way to do this? Currently, it seems like the only way to do this would be to have some kind of logic on my end that will filter the return values, but my concern is that editing the returned values on my end might interfere with pagination (by changing the indexes/values in the returned data.)&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 01:07:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/335602#M32619</guid>
      <dc:creator>ZamurphDev</dc:creator>
      <dc:date>2020-04-30T01:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/335648#M32630</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127940"&gt;@ZamurphDev&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, have you explore the option of &lt;A href="https://knowledge.hubspot.com/lists/how-can-i-create-a-list-of-all-my-hubspot-contacts" target="_self"&gt;creating a contact list&lt;/A&gt; and using the&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/lists/get_list_contacts" target="_blank"&gt;Get contacts in a list | Contact Lists API&lt;/A&gt;? This might work better for your use case if you're looking to set more filters.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 06:06:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/335648#M32630</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-04-30T06:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/335666#M32635</link>
      <description>Hey Wendy!&lt;BR /&gt;&lt;BR /&gt;I am using contact lists for contacts, but the filtering question/issue was about getting companies using more than just 3 filters. Sorry if that wasn’t clear and than you as always for your reply. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 30 Apr 2020 07:32:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/335666#M32635</guid>
      <dc:creator>ZamurphDev</dc:creator>
      <dc:date>2020-04-30T07:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling through companies - looking for ones that are specifically 'targeted' accounts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/336271#M32713</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127940"&gt;@ZamurphDev&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the further clarification!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, are you looking to have more than three filterGroups? If so, that's not possible. However, you should be able to have 3 filterGroups in which it consists 3 filters as stated on this &lt;A href="https://developers.hubspot.com/docs/api/crm/search" target="_self"&gt;documentation&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;The system supports a maximum of three&amp;nbsp;&lt;CODE class="inline-code"&gt;filterGroups&lt;/CODE&gt;&amp;nbsp;with up to three&amp;nbsp;&lt;CODE class="inline-code"&gt;filters&lt;/CODE&gt;&amp;nbsp;each.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 03:56:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Pulling-through-companies-looking-for-ones-that-are-specifically/m-p/336271#M32713</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-05-04T03:56:07Z</dc:date>
    </item>
  </channel>
</rss>

