<?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: How do I get the Company ID by searching by Company name? in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-get-the-Company-ID-by-searching-by-Company-name/m-p/984978#M74063</link>
    <description>&lt;P&gt;This helped as I also was using a mis-typed URL.&lt;/P&gt;&lt;P&gt;I had the v2 url and simply replaced v2 with v3 and had this bad url&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.hubapi.com/companies/v3/objects/companies/search" target="_blank"&gt;https://api.hubapi.com/companies/v3/objects/companies/search&lt;/A&gt;&lt;/P&gt;&lt;P&gt;when it should be as you noted and I know from the examples:&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.hubapi.com/crm/v3/objects/companies/search" target="_blank"&gt;https://api.hubapi.com/crm/v3/objects/companies/search&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So, using curl to get company ID from propertyName used the following command&lt;/P&gt;&lt;P&gt;Also, thought back to a previous post to use \" to delimit and pass a doublequote..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl.exe -X POST "&lt;A href="https://api.hubapi.com/crm/v3/objects/companies/search/" target="_blank"&gt;https://api.hubapi.com/crm/v3/objects/companies/search/&lt;/A&gt;" -H "authorization:Bearer myTokenHere" -H "Content-Type: application/json" -d "{\"filterGroups\":[{\"filters\":[{\"propertyName\":\"gss_company_code\",\"operator\":\"EQ\",\"value\":\"ASPDUN\"}]}]}" -o F:\Users\mypath\Documents\Consulting\ZHL\Hubspot\Company_byAcct_ASPDUN.json&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 May 2024 04:30:55 GMT</pubDate>
    <dc:creator>GSkidmore</dc:creator>
    <dc:date>2024-05-31T04:30:55Z</dc:date>
    <item>
      <title>How do I get the Company ID by searching by Company name?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-get-the-Company-ID-by-searching-by-Company-name/m-p/966681#M73116</link>
      <description>&lt;P&gt;I'm trying to get a Company Id via searching by Company name via so I can add Company engagement notes however; when I query the companies search object API via the name, it just returns individual contact objects for that company and NOT the company actual company ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the API:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;https://api.hubapi.com/crm/v3/objects/companies/search&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;My search query looks like this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "filterGroups": [
        {
            "filters": [
                {
                    "propertyName": "name",
                    "operator": "EQ",
                    "value": "McChicken Inc"
                }
            ]
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;What I get is an array of indiviudal "contact" objects related to that particular comapny and NOT the company ID. The response looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is just a contact for that company. If I search in Hubspot (UI) with that ID, it's just the contact object. The "hs_object_id" is just the contact ID. There is NO company ID in there.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "id": "122253",
    "properties": {
        "createdate": "2022-01-29T00:37:01.894Z",
        "email": "jim_bob@mcchicken.com",
        "firstname": "Jim",
        "hs_object_id": "122253",
        "lastmodifieddate": "2023-04-11T15:48:24.009Z",
        "lastname": "Bob"
    },
    "createdAt": "2023-01-29T00:27:01.894Z",
    "updatedAt": "2023-04-12T12:48:24.009Z",
    "archived": false
}&lt;/LI-CODE&gt;&lt;P&gt;How do I get the company ID??&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 14:42:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-get-the-Company-ID-by-searching-by-Company-name/m-p/966681#M73116</guid>
      <dc:creator>Bronette</dc:creator>
      <dc:date>2024-04-25T14:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the Company ID by searching by Company name?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-get-the-Company-ID-by-searching-by-Company-name/m-p/966793#M73127</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/751623"&gt;@Bronette&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Are you using Postman to test with? You might try again from scratch. I used your request body and created a matching company and associated contact in my test portal. When I test using Postman, I get the expected result.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Company + Contact&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2024-04-25 at 11.01.57.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/116197iBD89B08E119A8B84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2024-04-25 at 11.01.57.png" alt="CleanShot 2024-04-25 at 11.01.57.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Request&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;POST https://api.hubapi.com/crm/v3/objects/companies/search&lt;/LI-CODE&gt;
&lt;P&gt;Body&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "filterGroups": [
        {
            "filters": [
                {
                    "propertyName": "name",
                    "operator": "EQ",
                    "value": "McChicken Inc"
                }
            ]
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;Response&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "total": 1,
    "results": [
        {
            "id": "20461937810",
            "properties": {
                "createdate": "2024-04-25T16:33:48.608Z",
                "domain": null,
                "hs_lastmodifieddate": "2024-04-25T16:34:56.068Z",
                "hs_object_id": "20461937810",
                "name": "McChicken Inc"
            },
            "createdAt": "2024-04-25T16:33:48.608Z",
            "updatedAt": "2024-04-25T16:34:56.068Z",
            "archived": false
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;Postman&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2024-04-25 at 11.06.30.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/116198i31F6D7F6BBB6A4A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2024-04-25 at 11.06.30.png" alt="CleanShot 2024-04-25 at 11.06.30.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;I hope this helps get you moving forward. — Jaycee&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 17:07:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-get-the-Company-ID-by-searching-by-Company-name/m-p/966793#M73127</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2024-04-25T17:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the Company ID by searching by Company name?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-get-the-Company-ID-by-searching-by-Company-name/m-p/967275#M73165</link>
      <description>&lt;P&gt;It was in fact working. I had the call in a Python script and I was calling the wrong URL because I had two functions of the same name. User error on my part. Thank you for replying and verifying.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 13:01:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-get-the-Company-ID-by-searching-by-Company-name/m-p/967275#M73165</guid>
      <dc:creator>Bronette</dc:creator>
      <dc:date>2024-04-26T13:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the Company ID by searching by Company name?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-get-the-Company-ID-by-searching-by-Company-name/m-p/967378#M73171</link>
      <description>&lt;P&gt;Awesome. Thanks for the update, &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/751623"&gt;@Bronette&lt;/a&gt;&lt;/SPAN&gt;! Have a great weekend. — Jaycee&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 15:22:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-get-the-Company-ID-by-searching-by-Company-name/m-p/967378#M73171</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2024-04-26T15:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the Company ID by searching by Company name?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-get-the-Company-ID-by-searching-by-Company-name/m-p/984978#M74063</link>
      <description>&lt;P&gt;This helped as I also was using a mis-typed URL.&lt;/P&gt;&lt;P&gt;I had the v2 url and simply replaced v2 with v3 and had this bad url&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.hubapi.com/companies/v3/objects/companies/search" target="_blank"&gt;https://api.hubapi.com/companies/v3/objects/companies/search&lt;/A&gt;&lt;/P&gt;&lt;P&gt;when it should be as you noted and I know from the examples:&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.hubapi.com/crm/v3/objects/companies/search" target="_blank"&gt;https://api.hubapi.com/crm/v3/objects/companies/search&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So, using curl to get company ID from propertyName used the following command&lt;/P&gt;&lt;P&gt;Also, thought back to a previous post to use \" to delimit and pass a doublequote..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl.exe -X POST "&lt;A href="https://api.hubapi.com/crm/v3/objects/companies/search/" target="_blank"&gt;https://api.hubapi.com/crm/v3/objects/companies/search/&lt;/A&gt;" -H "authorization:Bearer myTokenHere" -H "Content-Type: application/json" -d "{\"filterGroups\":[{\"filters\":[{\"propertyName\":\"gss_company_code\",\"operator\":\"EQ\",\"value\":\"ASPDUN\"}]}]}" -o F:\Users\mypath\Documents\Consulting\ZHL\Hubspot\Company_byAcct_ASPDUN.json&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2024 04:30:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-get-the-Company-ID-by-searching-by-Company-name/m-p/984978#M74063</guid>
      <dc:creator>GSkidmore</dc:creator>
      <dc:date>2024-05-31T04:30:55Z</dc:date>
    </item>
  </channel>
</rss>

