I am trying to hit an one api endpoint to batch update or create contacts using the email as a unique identifier. I am wondering if that is possible using API v3. This is to sync contacts from an external database.
I found out that I had additional requirements on how to update. I ended up doing a batch read to get current information for all emails. If information was returned for the email I was able to compare to current data record what needed updated. If there were updates for a read, I would do a batch update. At the very end of reading and updating, I used the https://api.hubapi.com/crm/v3/imports endpoint to do a bulk create. This proccess will hopefully work well for me since most of the time I need to create. The only downside is that I will be heavilly hitting the read and update bulk APIs.
Before I did implement it using only https://api.hubapi.com/crm/v3/imports. Bulk create and update did work as expected with the email as the property to match on an update. I didn't test if it would work with multiple updates in the same csv.
I managed to do my solution 100% in the v3 API since I didn't want to think about EOL of v1.
I found out that I had additional requirements on how to update. I ended up doing a batch read to get current information for all emails. If information was returned for the email I was able to compare to current data record what needed updated. If there were updates for a read, I would do a batch update. At the very end of reading and updating, I used the https://api.hubapi.com/crm/v3/imports endpoint to do a bulk create. This proccess will hopefully work well for me since most of the time I need to create. The only downside is that I will be heavilly hitting the read and update bulk APIs.
Before I did implement it using only https://api.hubapi.com/crm/v3/imports. Bulk create and update did work as expected with the email as the property to match on an update. I didn't test if it would work with multiple updates in the same csv.
I managed to do my solution 100% in the v3 API since I didn't want to think about EOL of v1.
Is this a dead end for what I am trying to do? I am currently trying to save the things that are updated or new in my database to a csv then uploading it here. I am hoping the behavior for duplicates will be to update them.
I am still working through errors in my own testing, but I will take a different route if I hear it won't work.
@JeremyD1 , I believe for your use case, that should do the trick. The csv will be deduplicated and the properties that have been changed should be updated.
If I were you, I would run a test with a small batch of contacts with various property changes. Just to confirm 😀
@dennisedson - I'm in a similar situation to the original poster, and want to use the Import endpoint. I'd like to determine whether I need to do multiple 'sets' of updates for each unique set of updated properties or if the import will simply skip fields in the CSV that do not contain any data. Essentially, we need to update many thousands of records on a daily basis and the current batch update limitations (10 records per batch) means that we cannot use the v3 batch endpoints. We want behavior similar to the batch endpoint where a non-specified property isn't updated, but the only way to achieve this via the import API endpoints appears to be multiple import calls (one for each 'subset' of properties across a set of contacts that need importing). Is this correct?
@dennisedson , could you please update us regarding this API feature? We were using the CreateOrUpdate Contact (Documentation link : https://legacydocs.hubspot.com/docs/methods/contacts/create_or_update) in many of our calls, and now we'll have to basically take that intelligence in our own system, doing a List and then, after receiving the reponse, make another API call Creating or Updating the Contact.
This means that for every create/update we have to do, we'll have to do two API calls.
It would be great to still have this single API call, could you please let us know if it's being developed?