Conflict error 409

Mobydick
Member

 

I am trying to create contacts using the batch create api. I get the error

 

`{"status":"error","message":"Contact already exists. Existing ID: 20775093475","correlationId":"467b6d05-30d1-4bb5-b097-de74e808dcba","category":"CONFLICT"}`
 
which causes the batch to fail, thus all contacts that are part of this batch are failed to be created. Even though the error says that the Contact already exists, this is not the case, because I've checked my contacts and the ones I'm trying to create dont exist in Hubspot.
Can you please help?
0 Upvotes
1 Accepted solution
Kevin-C
Solution
Recognized Expert | Partner
Recognized Expert | Partner

Hey @Mobydick 

 

When a contact is permanently deleted vs restorably deleted from your portal HS will store a record of the deletion in the background and prevent you from adding it via the UI or programmatically leading to the errors and inability to look up the contact that you're experiencing.

 

The only way to get that user back into the portal is for the contact to submit a form the,selves.

 

KevinC_0-1719720267943.png

 

Second, when you tried @DavidVoigt 's solution you've accidentally included a colon, thus triggering the error responce ("Object not found. objectId are usually numeric.") you're getting from the request:

KevinC_1-1719720396789.png

 

 

View solution in original post

3 Replies 3
Kevin-C
Solution
Recognized Expert | Partner
Recognized Expert | Partner

Hey @Mobydick 

 

When a contact is permanently deleted vs restorably deleted from your portal HS will store a record of the deletion in the background and prevent you from adding it via the UI or programmatically leading to the errors and inability to look up the contact that you're experiencing.

 

The only way to get that user back into the portal is for the contact to submit a form the,selves.

 

KevinC_0-1719720267943.png

 

Second, when you tried @DavidVoigt 's solution you've accidentally included a colon, thus triggering the error responce ("Object not found. objectId are usually numeric.") you're getting from the request:

KevinC_1-1719720396789.png

 

 

DavidVoigt
Top Contributor | Elite Partner
Top Contributor | Elite Partner

How exactly did you check whether the contact exists? You should use the API for that, too.

 

curl --request GET \
  --url 'https://api.hubapi.com/crm/v3/objects/contacts/20775093475?archived=false' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

 

Also try with archived=true

0 Upvotes
Mobydick
Member

hey @DavidVoigt thanks for your reply. 
I tried both archived true/false and the response is: 

{
    "status": "error",
    "message": "Object not found.  objectId are usually numeric.",
    "correlationId": "321b6f79-92fc-40fe-9e3a-378a4006500b",
    "context": {
        "id": [
            ":20775093475"
        ]
    },
    "category": "OBJECT_NOT_FOUND"
}

 

0 Upvotes