Contact Upsert Post action with either null or "" doesn't clear value

Hi

I must upsert 200k of contacts, but I have also a lot of empty fields.
I’m using the following API endpoint: https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert

Here are two of my payload examples:

{
 "inputs": [{
 "properties": {
 "email": "test@gmail.com",
 "firstname": "",
 "phone": "1"
 },
 "id": "test@gmail.com",
 "idProperty": "email"
 }, {
 "properties": {
 "email": "hans.muster@gmail.com",
 "firstname": "",
 "phone": "1"
 },
 "id": "hans.muster@gmail.com",
 "idProperty": "email"
 }
 ]
}

The API also fails when I send a null

{
 "inputs": [{
 "properties": {
 "email": "test@screeningeagle.com",
 "firstname": null,
 "phone": "1"
 },
 "id": "test@screeningeagle.com",
 "idProperty": "email"
 }, {
 "properties": {
 "email": "hans.muste@screeningeagle.com",
 "firstname": null,
 "phone": "1"
 },
 "id": "hans.muste@screeningeagle.com",
 "idProperty": "email"
 }
 ]
}

My post seems to be a duplicate of this post: https://community.hubspot.com/t5/CRM/Not-Blank-the-value-while-using-batch-API-in-Upsert/td-p/1061237

I hope this post get’s some attention to the developers. Because it’s a problem for enterprise customers.

Hi @PFeldmann, I hope that you are well!
Thank you for reaching out to the Community and thanks for your valuable feedback!
I have shared it internally for more visibility!
I’d like to ask our Top Experts: Hi @zach_threadint, @louischausse and @jonchim do you have the same behavior, please? If yes, did you find a fix to help @PFeldmann, please?
Thanks so much and have a great weekend!
Best,
Bérangère

Hey @PFeldmann,
Actually, we have a new tool just for that, could you please share your feedback here: “Developer Feedback Tool”.
Thanks a lot!
Best,
Bérangère

Hi @PFeldmann,
I just heard from the Team and they are actually working on a fix for this, as we speak.
Thanks for your patience and your valuable feedback!
I’ll keep you updated on this.
Best,
Bérangère

Hi @PFeldmann, thanks for your patience as the Team was looking into this!
I am glad to share that this is now fixed!
If you set up a property to “”, then it resets it for upserts as usual as for updates.
Just to let you know, please be aware of this:
- Setting a property to null does nothing
- Setting a property to “” is the only way to “reset” it
I hope this helps!
Have a lovely day and please let me know if there is anything else I can help with. I’ll be delighted to do so!
Best,
Bérangère