<?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: Question about bulk contacts update API in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1098285#M79766</link>
    <description>&lt;P&gt;Hi JFade,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have other questions.&lt;/P&gt;&lt;P&gt;I am using the /crm/v3/objects/$objType/batch/read POST API to detect deleted or merged objects on HubSpot, but I have a few questions about its behavior to ensure I use it correctly and avoid unintended deletions in my system.&lt;BR /&gt;Scenario 1: Deleted Objects&lt;BR /&gt;When an object is deleted on HubSpot, the API returns the following response:&lt;BR /&gt;{&lt;BR /&gt;"results": [],&lt;BR /&gt;"errors": [&lt;BR /&gt;{&lt;BR /&gt;"status": "error",&lt;BR /&gt;"category": "OBJECT_NOT_FOUND",&lt;BR /&gt;"message": "Could not get some COMPANY objects, they may be deleted or not exist. Check that ids are valid.",&lt;BR /&gt;"context": {&lt;BR /&gt;"ids": [&lt;BR /&gt;"8380080352",&lt;BR /&gt;"8144745976",&lt;BR /&gt;"7440157923"&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;In this case, if category is OBJECT_NOT_FOUND, I can extract the ids from the errors.context.ids array and handle them as deleted objects in my system.&lt;BR /&gt;Scenario 2: Merged Objects&lt;BR /&gt;Sometimes, contacts in HubSpot are merged. In such cases, the API can return the following response:&lt;BR /&gt;{&lt;BR /&gt;"results": [&lt;BR /&gt;{&lt;BR /&gt;"id": "84805801",&lt;BR /&gt;"properties": {&lt;BR /&gt;"email": "mary.miller@usfoods.com",&lt;BR /&gt;"createdate": "2020-03-03T20:18:42.589Z",&lt;BR /&gt;"firstname": "Mary",&lt;BR /&gt;"hs_object_id": "84805801",&lt;BR /&gt;"lastname": "Miller",&lt;BR /&gt;"lastmodifieddate": "2024-08-10T23:13:12.293Z"&lt;BR /&gt;},&lt;BR /&gt;"createdAt": "2020-03-03T20:18:42.589Z",&lt;BR /&gt;"updatedAt": "2024-08-10T23:13:12.293Z"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;Here, the id in the response (84805801) is different from the id in my original request (62241). This indicates that the contact was merged. In such cases, I also need to remove this record (62241) from my system.&lt;BR /&gt;Questions:&lt;BR /&gt;1. Are there other scenarios I should consider to avoid mistakenly deleting or overwriting data in my system?&lt;BR /&gt;2. For merged objects, is it safe to assume that if the id in the response differs from the id in my request, the object has been merged, and the new ID should be used?&lt;BR /&gt;3. Is there a recommended approach to handle errors and results together to ensure I don’t miss any edge cases?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jan 2025 02:40:53 GMT</pubDate>
    <dc:creator>LZhao</dc:creator>
    <dc:date>2025-01-23T02:40:53Z</dc:date>
    <item>
      <title>Question about bulk contacts update API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1080349#M78815</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I encountered an issue with the bulk API (/crm/v3/objects/contacts/batch/update) while updating contacts. When I included certain contact IDs in the bulk request body, the update for some specific contacts failed, because the IDs of these contacts were absent in the update result.&lt;/P&gt;&lt;P&gt;To investigate further, I used another API (/crm/v3/objects/contacts/$id) to retrieve one of these contacts. Interestingly, the API response returned a different ID. For example, the contact ID in the request was 1, but the response showed 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upon further investigation, I found that both of these contacts (IDs 1 and 2) are associated with the same company ID. This raised questions about the relationship between these two contacts. To check if they were merged, I used HubSpot APIs but found no evidence suggesting a merge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any insights into what might be causing this behavior?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 07 Dec 2024 01:43:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1080349#M78815</guid>
      <dc:creator>LZhao</dc:creator>
      <dc:date>2024-12-07T01:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Question about bulk contacts update API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1080418#M78821</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;A href="https://gamingcy.com/en-us/destiny-2-boost" target="_blank" rel="noopener"&gt;@LZhao&amp;nbsp;&lt;/A&gt;wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I encountered an issue with the bulk API (/crm/v3/objects/contacts/batch/update) while updating contacts. When I included certain contact IDs in the bulk request body, the update for some specific contacts failed, because the IDs of these contacts were absent in the update result.&lt;/P&gt;&lt;P&gt;To investigate further, I used another API (/crm/v3/objects/contacts/$id) to retrieve one of these contacts. Interestingly, the API response returned a different ID. For example, the contact ID in the request was 1, but the response showed 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upon further investigation, I found that both of these contacts (IDs 1 and 2) are associated with the same company ID. This raised questions about the relationship between these two contacts. To check if they were merged, I used HubSpot APIs but found no evidence suggesting a merge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any insights into what might be causing this behavior?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The issue occurs because the contact IDs used in the bulk update request are likely outdated or inactive due to internal HubSpot processes, such as merging or ID reassignment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When a contact is merged, its original ID becomes inactive, and a new primary ID is assigned. This explains why the /crm/v3/objects/contacts/{id} API returns a different ID than the one used in your bulk update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally, the fact that both IDs are associated with the same company suggests they might be part of a merge, even if no direct evidence of merging is found.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To resolve this, ensure that only active contact IDs are used in the bulk request by validating each ID with the /crm/v3/objects/contacts/{id} API before updating. If the response returns a different ID, replace it with the active ID in your bulk operation to avoid failures.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Dec 2024 10:23:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1080418#M78821</guid>
      <dc:creator>HMir</dc:creator>
      <dc:date>2024-12-07T10:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Question about bulk contacts update API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1080494#M78826</link>
      <description>&lt;P&gt;Thank you, this is very helpful. From your reply, it seems we don't need these outdated or inactive contacts, so we can go ahead and mark these records as deleted in our system, right?&lt;/P&gt;&lt;P&gt;However, I’m not sure if deleting these contacts might cause issues if they are still being used somewhere in HubSpot. Could this potentially break any functionality? Also for this case, fetch contacts API can't return outdated or inactive records, right?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Dec 2024 22:07:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1080494#M78826</guid>
      <dc:creator>LZhao</dc:creator>
      <dc:date>2024-12-07T22:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Question about bulk contacts update API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1086229#M79100</link>
      <description>&lt;P&gt;so we can safely delete these kind of contacts in our system if we can detect contacts are merged in hubspot, right?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 19:38:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1086229#M79100</guid>
      <dc:creator>LZhao</dc:creator>
      <dc:date>2024-12-20T19:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Question about bulk contacts update API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1094919#M79538</link>
      <description>&lt;P&gt;&lt;A title="@Lzhao" href="https://onlyfarms.gg/" target="_blank" rel="noopener"&gt;@Lzhao&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It sounds like you're experiencing issues due to inactive or outdated contact IDs that were likely merged or reassigned in HubSpot. When a contact is merged, the original ID becomes inactive, and a new primary ID is assigned, which explains why the /crm/v3/objects/contacts/{id} API returns a different ID than the one used in your bulk update.&lt;/P&gt;&lt;P&gt;The connection of both IDs with the same company ID might imply a merge, even without explicit evidence from HubSpot APIs. To address this, ensure that only active contact IDs are used in your bulk updates. You can validate each ID before using it to ensure that no inactive or reassigned IDs are included in your requests.&lt;/P&gt;&lt;P&gt;If issues persist, I recommend reaching out to HubSpot support or consulting their API documentation for further insights on handling merged contact IDs effectively.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 20:15:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1094919#M79538</guid>
      <dc:creator>JFade</dc:creator>
      <dc:date>2025-01-15T20:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Question about bulk contacts update API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1098284#M79765</link>
      <description>&lt;P&gt;I have some questions related to this:&lt;/P&gt;&lt;P&gt;I am using the /crm/v3/objects/$objType/batch/read POST API to detect deleted or merged objects on HubSpot, but I have a few questions about its behavior to ensure I use it correctly and avoid unintended deletions in my system.&lt;BR /&gt;Scenario 1: Deleted Objects&lt;BR /&gt;When an object is deleted on HubSpot, the API returns the following response:&lt;BR /&gt;{&lt;BR /&gt;"results": [],&lt;BR /&gt;"errors": [&lt;BR /&gt;{&lt;BR /&gt;"status": "error",&lt;BR /&gt;"category": "OBJECT_NOT_FOUND",&lt;BR /&gt;"message": "Could not get some COMPANY objects, they may be deleted or not exist. Check that ids are valid.",&lt;BR /&gt;"context": {&lt;BR /&gt;"ids": [&lt;BR /&gt;"8380080352",&lt;BR /&gt;"8144745976",&lt;BR /&gt;"7440157923"&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;In this case, if category is OBJECT_NOT_FOUND, I can extract the ids from the errors.context.ids array and handle them as deleted objects in my system.&lt;BR /&gt;Scenario 2: Merged Objects&lt;BR /&gt;Sometimes, contacts in HubSpot are merged. In such cases, the API can return the following response:&lt;BR /&gt;{&lt;BR /&gt;"results": [&lt;BR /&gt;{&lt;BR /&gt;"id": "84805801",&lt;BR /&gt;"properties": {&lt;BR /&gt;"email": "mary.miller@usfoods.com",&lt;BR /&gt;"createdate": "2020-03-03T20:18:42.589Z",&lt;BR /&gt;"firstname": "Mary",&lt;BR /&gt;"hs_object_id": "84805801",&lt;BR /&gt;"lastname": "Miller",&lt;BR /&gt;"lastmodifieddate": "2024-08-10T23:13:12.293Z"&lt;BR /&gt;},&lt;BR /&gt;"createdAt": "2020-03-03T20:18:42.589Z",&lt;BR /&gt;"updatedAt": "2024-08-10T23:13:12.293Z"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;Here, the id in the response (84805801) is different from the id in my original request (62241). This indicates that the contact was merged. In such cases, I also need to remove this record (62241) from my system.&lt;BR /&gt;Questions:&lt;BR /&gt;1. Are there other scenarios I should consider to avoid mistakenly deleting or overwriting data in my system?&lt;BR /&gt;2. For merged objects, is it safe to assume that if the id in the response differs from the id in my request, the object has been merged, and the new ID should be used?&lt;BR /&gt;3. Is there a recommended approach to handle errors and results together to ensure I don’t miss any edge cases?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 02:39:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1098284#M79765</guid>
      <dc:creator>LZhao</dc:creator>
      <dc:date>2025-01-23T02:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Question about bulk contacts update API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1098285#M79766</link>
      <description>&lt;P&gt;Hi JFade,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have other questions.&lt;/P&gt;&lt;P&gt;I am using the /crm/v3/objects/$objType/batch/read POST API to detect deleted or merged objects on HubSpot, but I have a few questions about its behavior to ensure I use it correctly and avoid unintended deletions in my system.&lt;BR /&gt;Scenario 1: Deleted Objects&lt;BR /&gt;When an object is deleted on HubSpot, the API returns the following response:&lt;BR /&gt;{&lt;BR /&gt;"results": [],&lt;BR /&gt;"errors": [&lt;BR /&gt;{&lt;BR /&gt;"status": "error",&lt;BR /&gt;"category": "OBJECT_NOT_FOUND",&lt;BR /&gt;"message": "Could not get some COMPANY objects, they may be deleted or not exist. Check that ids are valid.",&lt;BR /&gt;"context": {&lt;BR /&gt;"ids": [&lt;BR /&gt;"8380080352",&lt;BR /&gt;"8144745976",&lt;BR /&gt;"7440157923"&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;In this case, if category is OBJECT_NOT_FOUND, I can extract the ids from the errors.context.ids array and handle them as deleted objects in my system.&lt;BR /&gt;Scenario 2: Merged Objects&lt;BR /&gt;Sometimes, contacts in HubSpot are merged. In such cases, the API can return the following response:&lt;BR /&gt;{&lt;BR /&gt;"results": [&lt;BR /&gt;{&lt;BR /&gt;"id": "84805801",&lt;BR /&gt;"properties": {&lt;BR /&gt;"email": "mary.miller@usfoods.com",&lt;BR /&gt;"createdate": "2020-03-03T20:18:42.589Z",&lt;BR /&gt;"firstname": "Mary",&lt;BR /&gt;"hs_object_id": "84805801",&lt;BR /&gt;"lastname": "Miller",&lt;BR /&gt;"lastmodifieddate": "2024-08-10T23:13:12.293Z"&lt;BR /&gt;},&lt;BR /&gt;"createdAt": "2020-03-03T20:18:42.589Z",&lt;BR /&gt;"updatedAt": "2024-08-10T23:13:12.293Z"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;Here, the id in the response (84805801) is different from the id in my original request (62241). This indicates that the contact was merged. In such cases, I also need to remove this record (62241) from my system.&lt;BR /&gt;Questions:&lt;BR /&gt;1. Are there other scenarios I should consider to avoid mistakenly deleting or overwriting data in my system?&lt;BR /&gt;2. For merged objects, is it safe to assume that if the id in the response differs from the id in my request, the object has been merged, and the new ID should be used?&lt;BR /&gt;3. Is there a recommended approach to handle errors and results together to ensure I don’t miss any edge cases?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 02:40:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-about-bulk-contacts-update-API/m-p/1098285#M79766</guid>
      <dc:creator>LZhao</dc:creator>
      <dc:date>2025-01-23T02:40:53Z</dc:date>
    </item>
  </channel>
</rss>

