<?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 Updated 409 Conflict responses in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Updated-409-Conflict-responses/m-p/951534#M72327</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I’ve noticed an updated response on the Contacts API (perhaps other objects too?) when a 409 conflict happens.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;{
    "message": "Contact already exists. Existing ID: 2926551",
    "identityProfile": {
        "vid": 2926551,
        "identity": [
            {
                "value": "066239b5-a5b8-4caf-af47-ead811935663",
                "type": "LEAD_GUID",
                "timestamp": 1665417061496
            },
            {
                "value": "lee@xyz.co.uk",
                "type": "EMAIL",
                "timestamp": 1665417061370,
                "isPrimary": true
            }
        ],
        "linkedVid": [
            2928301,
            ...
        ],
        "isContact": true,
        "isCanonicalProfile": true,
        "savedAtTimestamp": 1699288594350,
        "promotedToContact": true
    },
    "errors": [
        {
            "message": "A contact with email lee@xyz.co.uk already exists. Existing ID: 2926551",
            "in": "email"
        }
    ],
    "status": "error",
    "correlationId": "b6881283-187e-4088-a778-5c933a14547c",
    "category": "OBJECT_ALREADY_EXISTS",
    "error": "CONTACT_EXISTS"
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is a mostly welcome change (not having to parse strings for the conflicting object record is great) however we have several processes running which rely on the&amp;nbsp;category being returned as&amp;nbsp;"category": "CONFLICT" which is now returned as&amp;nbsp;"category": "OBJECT_ALREADY_EXISTS" instead. This is resulting in a number of failures which could have been prevented with a bit of notice.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone clarify whether this is a permanent change or not, and if so has it been documented or announced anywhere?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;CODE class="" data-stringify-type="code"&gt;&lt;SPAN&gt;&lt;CODE class="" data-stringify-type="code"&gt;&lt;SPAN&gt;&lt;CODE class="" data-stringify-type="code"&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2024 17:28:09 GMT</pubDate>
    <dc:creator>leemcd63</dc:creator>
    <dc:date>2024-03-28T17:28:09Z</dc:date>
    <item>
      <title>Updated 409 Conflict responses</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Updated-409-Conflict-responses/m-p/951534#M72327</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I’ve noticed an updated response on the Contacts API (perhaps other objects too?) when a 409 conflict happens.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;{
    "message": "Contact already exists. Existing ID: 2926551",
    "identityProfile": {
        "vid": 2926551,
        "identity": [
            {
                "value": "066239b5-a5b8-4caf-af47-ead811935663",
                "type": "LEAD_GUID",
                "timestamp": 1665417061496
            },
            {
                "value": "lee@xyz.co.uk",
                "type": "EMAIL",
                "timestamp": 1665417061370,
                "isPrimary": true
            }
        ],
        "linkedVid": [
            2928301,
            ...
        ],
        "isContact": true,
        "isCanonicalProfile": true,
        "savedAtTimestamp": 1699288594350,
        "promotedToContact": true
    },
    "errors": [
        {
            "message": "A contact with email lee@xyz.co.uk already exists. Existing ID: 2926551",
            "in": "email"
        }
    ],
    "status": "error",
    "correlationId": "b6881283-187e-4088-a778-5c933a14547c",
    "category": "OBJECT_ALREADY_EXISTS",
    "error": "CONTACT_EXISTS"
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is a mostly welcome change (not having to parse strings for the conflicting object record is great) however we have several processes running which rely on the&amp;nbsp;category being returned as&amp;nbsp;"category": "CONFLICT" which is now returned as&amp;nbsp;"category": "OBJECT_ALREADY_EXISTS" instead. This is resulting in a number of failures which could have been prevented with a bit of notice.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone clarify whether this is a permanent change or not, and if so has it been documented or announced anywhere?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;CODE class="" data-stringify-type="code"&gt;&lt;SPAN&gt;&lt;CODE class="" data-stringify-type="code"&gt;&lt;SPAN&gt;&lt;CODE class="" data-stringify-type="code"&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 17:28:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Updated-409-Conflict-responses/m-p/951534#M72327</guid>
      <dc:creator>leemcd63</dc:creator>
      <dc:date>2024-03-28T17:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Updated 409 Conflict responses</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Updated-409-Conflict-responses/m-p/951546#M72328</link>
      <description>&lt;P&gt;I've also observed that change. All good - and I was going to use the retured "existing ID" information until I realized that it wasn't really part of a JSON structured response, just an ID embedded in a string. Given this I'm not sure we can rely on this format as a documented feature.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd love to hear a HubSpot product team response on this one!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 17:36:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Updated-409-Conflict-responses/m-p/951546#M72328</guid>
      <dc:creator>SteveHTM</dc:creator>
      <dc:date>2024-03-28T17:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Updated 409 Conflict responses</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Updated-409-Conflict-responses/m-p/952103#M72365</link>
      <description>&lt;P&gt;On 2024.03.28 at 9:08AM Pacific Time, our APIs started failing due to this unexpected change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our systems were relying on this CONFLICT category in order to divert our logic to update a Contact instead in the scenario a Contact already existed with the given email address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We purposefully lock our HubSpot SDK (&lt;A href="https://github.com/HubSpot/hubspot-api-python" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/HubSpot/hubspot-api-python&lt;/A&gt;) to a particular version to aviod updates (planned and unexpected). This change occurred outside the scope of the SDK&amp;nbsp; and seemingly directly from the closed-source API&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://api.hubapi.com/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.hubapi.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These changes to the API Response objects should be communicated with enough time to make necessary changes to end-users.&lt;/P&gt;&lt;P&gt;Ideally changes to a Response object warrant a new version of the API such that Production systems are not impaired.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At least the change did not happen on a Friday.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 22:21:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Updated-409-Conflict-responses/m-p/952103#M72365</guid>
      <dc:creator>SBraverman</dc:creator>
      <dc:date>2024-03-29T22:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Updated 409 Conflict responses</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Updated-409-Conflict-responses/m-p/952768#M72408</link>
      <description>&lt;P&gt;We also experienced API responses in a couple scenarios that were changed on Friday March 29, 2024 (&lt;STRONG&gt;without ANY notice&lt;/STRONG&gt;). We also were relying on the keys that were previously passed in the response in order to detect CONFLICTS or invalid emails.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What is more frustrating, is we had to hotfix this on our end, and the changes were &lt;STRONG&gt;TEMPORARILY&lt;/STRONG&gt; reverted today on April 1st. I literally have 3 logs in a row that show it went from the "new" API to the "old" API back to the "new" API. This is really unacceptable considering there has been 0 communication about these breaking changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also going to dump out the responses that changed that we were using. As you can see, the keys and data structures are different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H4&gt;Email Response&lt;/H4&gt;&lt;P&gt;This response is how it looked prior to the unannounced March 28th change (which was incidently resurrected today on April 1st)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"response": {
  "statusCode": 400,
  "body": {
    "status": "error",
    "message": "Property values were not valid: [{\"isValid\":false,\"message\":\"Email address ****** is invalid\",\"error\":\"INVALID_EMAIL\",\"name\":\"email\"}]",
    "category": "VALIDATION_ERROR"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What the response changed to between March 28 - April 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"response": {
  "statusCode": 400,
  "body": {
    "validationResults": [
      {
        "isValid": false,
        "message": "Email address ****** is invalid",
        "error": "INVALID_EMAIL",
        "name": "email"
      }
    ],
    "status": "error",
    "message": "Property values were not valid",
  }
}&lt;/LI-CODE&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;H4&gt;Unique Validation Response&lt;/H4&gt;&lt;P&gt;This response is how it looked prior to the unannounced March 28th change (which was incidently resurrected today on April 1st)&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;LI-CODE lang="javascript"&gt;"response": {
  "statusCode": 400,
  "body": {
    "message": "Cannot set PropertyValueCoordinates{portalId=00000000, objectTypeId=ObjectTypeId{legacyObjectType=COMPANY}, propertyName=XXXXXXXXXXX, value=${XXXXXXXXXXX}} on 0000000000. ${hubSpotId} already has that value.",
    "category": "VALIDATION_ERROR"
  }
}&lt;/LI-CODE&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;What the response changed to between March 28 - April 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"response": {
  "statusCode": 400,
  "body": {
    "message": "Cannot set PropertyValueCoordinates{portalId=00000000, objectTypeId=ObjectTypeId{legacyObjectType=COMPANY}, propertyName=XXXXXXXXXXX, value=${XXXXXXXXXXX}} on 0000000000. ${hubSpotId} already has that value.",        
    "errorType": "UNIQUE_VALUE_CONFLICT"
  }
}&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 16:54:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Updated-409-Conflict-responses/m-p/952768#M72408</guid>
      <dc:creator>codymoorhouse</dc:creator>
      <dc:date>2024-04-01T16:54:59Z</dc:date>
    </item>
  </channel>
</rss>

