CRM

DTeam1
Mitglied

Unable to Update Contacts Via Email

lösung

We are attempting to update contacts via the email property rather than ID using a private app connection on Contacts API v3.

 

We can successfully make the call with the actual contact ID, but receive an error when attempting with email.

 

The CRM API Docs say:
"The idProperty query parameter doesn't appear on the Endpoints tab due to technical limitations, but it can be used for contacts exclusively with email. To use an email address as the unique identifier, set the idProperty as email and enter the email address in place of the contact ID. This should be set as a query parameter rather than added to the request body."

 

The bearer token/private app is verified to be working properly when making calls because I tested it before trying this specific action.

We have went through several articles and solutions like the one below and have not been able to resolve this issue.
>
https://community.hubspot.com/t5/APIs-Integrations/Update-contact-with-email-as-ID-through-the-Hubsp...

 

Here is the POST request I am attempting to make:

https://api.hubapi.com/crm/v3/objects/contacts/batch/update?idProperty=email

 

Here is the Body that is being attempted:

{
    "inputs": [
        {
            "id": "tstemail@gmail.com",
            "properties": {
                "company": "Company239",
                "email": "emailtes@gmail.com",
                "firstname": "Test Update",
                "lastname": "lnme",
                "phone": "(877) 999-9999",
                "website": "website.com"
            }
        }
    ]
}

 

Response:

"status": "error",
            "category": "OBJECT_NOT_FOUND",
            "message": "Could not get some CONTACT objects, they may be deleted or not exist. Check that ids are valid.",
            "context": {
                "ids": [
                    "tstemail@gmail.com"
                ]
 
 
1 Akzeptierte Lösung
MrJustinGivens
Lösung
Stratege/Strategin | Gold Partner
Stratege/Strategin | Gold Partner

Unable to Update Contacts Via Email

lösung

Hey @DTeam1,

 

I don't think idProperty=email works on the batch request. 

 

I was able to reproduce your problem.

 

When I used the single PATCH update for a contact using the email address as the contact ID. The API worked.

 

/crm/v3/objects/contacts/tstemail@gmail.com?idProperty=email

 

My guess is because BATCH wants the contact ID to make the updates faster and not have to search by email. (Just a guess).

 

Hope this helps.









Lösung in ursprünglichem Beitrag anzeigen

1 Antwort
MrJustinGivens
Lösung
Stratege/Strategin | Gold Partner
Stratege/Strategin | Gold Partner

Unable to Update Contacts Via Email

lösung

Hey @DTeam1,

 

I don't think idProperty=email works on the batch request. 

 

I was able to reproduce your problem.

 

When I used the single PATCH update for a contact using the email address as the contact ID. The API worked.

 

/crm/v3/objects/contacts/tstemail@gmail.com?idProperty=email

 

My guess is because BATCH wants the contact ID to make the updates faster and not have to search by email. (Just a guess).

 

Hope this helps.