Hi everyone, I'm trying to batch update Contacts through the API using 'idProperty'=>'email' without success. I'm using the PHP library. If I do the update with regular ids it works, but with 'idProperty' I get an error message 'Could not get some CONTACT objects, they may be deleted or not exist. Check that ids are valid.'
I tried rearranging the input and moving around 'idProperty' as I don't know which is the right syntax, but none worked for me.
pretty sure idProperty is not available in the Batch Update endpoint. I've looked at the files of the BatchInputSimplePublicObjectBatchInput and there is no avail be parameter. It's a different story for Batch Read.
Unless I'm missing something here, I'm sorry to disappoint you here.
Yes that is what I ended up doing. Which was use a query to retrieve by email to get the associated integer Id for that email. Less than ideal but got the job done.
pretty sure idProperty is not available in the Batch Update endpoint. I've looked at the files of the BatchInputSimplePublicObjectBatchInput and there is no avail be parameter. It's a different story for Batch Read.
Unless I'm missing something here, I'm sorry to disappoint you here.
An email address is theprimary unique identifierfor a contact in HubSpot. For existing contacts, the contact ID is also unique and will deduplicate contacts. To update a contact via the API, you can use either the contact ID or the contact's email.
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.
It would seem a reasonable expectation that the batch update would work in a similar manner by specifying
Gordon, I'm solving the same problem now. It seems ONLY Contact ID / HubSpot Vid is the only way to do it... but we don't have HubSpot Contact IDs stored locally.
Did you have to update to run a contact lookup to retrieve integer ID, than use that to update?