<?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: Using Both Company / Contact Batch Read APIs in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Using-Both-Company-Contact-Batch-Read-APIs/m-p/933335#M71453</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/470702"&gt;@KLeswing&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To read the company use the following API curl, where &lt;STRONG&gt;hs_object_id&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;reference - &lt;STRONG&gt;hs_Object_id = company_id&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl --location 'https://api.hubapi.com/crm/v3/objects/companies/batch/read?archived=false' \
--header 'authorization: Bearer ACCESS TOKEN' \
--header 'content-type: application/json' \
--data '{
  "idProperty": "hs_object_id",
  "inputs": [
    {
      "id": "1234567"
    }
  ],
  "properties": [
    "domain"
  ]
}'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To read the contact use the following API curl,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl --location 'https://api.hubapi.com/crm/v3/objects/contacts/batch/read?archived=false' \
--header 'authorization: Bearer ACCESS TOKEN' \
--header 'content-type: application/json' \
--data '{
  "idProperty": "email",
  "inputs": [
    {
      "id": "email address"
    }
  ],
  "properties": [
    "email","firstname","lastname"
  ]
}'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-sheets-root="1" data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.\nThanks!&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:769,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;11&amp;quot;:4,&amp;quot;12&amp;quot;:0}"&gt;I hope this will help you out. Please mark it as &lt;STRONG&gt;Solution Accepted and upvote&lt;/STRONG&gt; to help another Community member.&lt;BR /&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2024 08:54:37 GMT</pubDate>
    <dc:creator>GRajput</dc:creator>
    <dc:date>2024-02-27T08:54:37Z</dc:date>
    <item>
      <title>Using Both Company / Contact Batch Read APIs</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Using-Both-Company-Contact-Batch-Read-APIs/m-p/932868#M71438</link>
      <description>&lt;P&gt;I am having an issue using the endpoint:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://api.hubapi.com/crm/v3/objects/companies/batch/read" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/companies/batch/read&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My problem is that using this simple JSON request:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;{ "properties": [ "domain" ], "idProperty": "domain", "inputs": [ { "id": "aspencot.co.uk" } ] }&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I always seem to get this response...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;{ "status": "COMPLETE", "results": [], "numErrors": 1, "errors": [ { "status": "error", "category": "OBJECT_NOT_FOUND", "message": "Could not get some COMPANY objects, they may be deleted or not exist. Check that ids are valid.", "context": { "ids": [ "aspencot.co.uk" ] } } ], "startedAt": "2024-02-26T18:49:55.761Z", "completedAt": "2024-02-26T18:49:55.790Z" }&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I checked the "hasUniqueValue" property of the domain property of the customer and it is presently set to false.&amp;nbsp; Reading a different post here on the forums, it appears that in order for me to use this endpoint with that 'idProperty' within the JSON request that this attribute needs to be set to true.&amp;nbsp; (I checked the object using the properties API).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HOWEVER, I can successfully use the same batch read contact API endpoint below with the email id property where the "hasUniqueValue" is false and get a successful response when passing the email address in the inputs array.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://api.hubapi.com/crm/v3/objects/contact/batch/read" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/contact/batch/read&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;Is there something else here I am missing in a configuration with HubSpot to turn on the ability to search a company object by domain and/or name?&lt;/U&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If my only possible way of doing this is to set the 'hasUniqueValue' attribute to true, what are the existing rammifications to my data already captured in the 60K company records I have in HubSpot?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any guidance here is greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 19:13:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Using-Both-Company-Contact-Batch-Read-APIs/m-p/932868#M71438</guid>
      <dc:creator>KLeswing</dc:creator>
      <dc:date>2024-02-26T19:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using Both Company / Contact Batch Read APIs</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Using-Both-Company-Contact-Batch-Read-APIs/m-p/933244#M71449</link>
      <description>&lt;P&gt;What is the maximum capacity of this batch of calls at one time?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 06:38:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Using-Both-Company-Contact-Batch-Read-APIs/m-p/933244#M71449</guid>
      <dc:creator>hli6</dc:creator>
      <dc:date>2024-02-27T06:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using Both Company / Contact Batch Read APIs</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Using-Both-Company-Contact-Batch-Read-APIs/m-p/933335#M71453</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/470702"&gt;@KLeswing&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To read the company use the following API curl, where &lt;STRONG&gt;hs_object_id&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;reference - &lt;STRONG&gt;hs_Object_id = company_id&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl --location 'https://api.hubapi.com/crm/v3/objects/companies/batch/read?archived=false' \
--header 'authorization: Bearer ACCESS TOKEN' \
--header 'content-type: application/json' \
--data '{
  "idProperty": "hs_object_id",
  "inputs": [
    {
      "id": "1234567"
    }
  ],
  "properties": [
    "domain"
  ]
}'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To read the contact use the following API curl,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl --location 'https://api.hubapi.com/crm/v3/objects/contacts/batch/read?archived=false' \
--header 'authorization: Bearer ACCESS TOKEN' \
--header 'content-type: application/json' \
--data '{
  "idProperty": "email",
  "inputs": [
    {
      "id": "email address"
    }
  ],
  "properties": [
    "email","firstname","lastname"
  ]
}'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-sheets-root="1" data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.\nThanks!&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:769,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;11&amp;quot;:4,&amp;quot;12&amp;quot;:0}"&gt;I hope this will help you out. Please mark it as &lt;STRONG&gt;Solution Accepted and upvote&lt;/STRONG&gt; to help another Community member.&lt;BR /&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 08:54:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Using-Both-Company-Contact-Batch-Read-APIs/m-p/933335#M71453</guid>
      <dc:creator>GRajput</dc:creator>
      <dc:date>2024-02-27T08:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Both Company / Contact Batch Read APIs</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Using-Both-Company-Contact-Batch-Read-APIs/m-p/933664#M71466</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/717593"&gt;@hli6&lt;/a&gt;&amp;nbsp;I am only making one batch call at a time looking to pass one domain value to find the one company object.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 15:20:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Using-Both-Company-Contact-Batch-Read-APIs/m-p/933664#M71466</guid>
      <dc:creator>KLeswing</dc:creator>
      <dc:date>2024-02-27T15:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Both Company / Contact Batch Read APIs</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Using-Both-Company-Contact-Batch-Read-APIs/m-p/933666#M71467</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/346639"&gt;@GRajput&lt;/a&gt;&amp;nbsp;Thank you for your two examples but I need the ability to find the Company object (hs_object_id) by passing the domain name to the batch read; not the other way around.&amp;nbsp; And, when I try by using the aforementioned JSON structure where I am passing the domain and setting the idProperty : "domain".&amp;nbsp; I get nothing.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 15:22:42 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Using-Both-Company-Contact-Batch-Read-APIs/m-p/933666#M71467</guid>
      <dc:creator>KLeswing</dc:creator>
      <dc:date>2024-02-27T15:22:42Z</dc:date>
    </item>
  </channel>
</rss>

