APIs & Integrations

joeolsenmm
Participant

How do I set dropdown property to unknown or unselected through API

SOLVE

Hi! I have a dropdown property on a deal in Hubspot that has had a value selected. I would like to (through the API) change the value back to nothing/unselected/unkown.

 

I tried sending in "" as a value and the the API sees that as sending nothing.

 

Please help 🙂

0 Upvotes
1 Accepted solution
joeolsenmm
Solution
Participant

How do I set dropdown property to unknown or unselected through API

SOLVE

UPDATE

 

Turns out setting it to blank ("") works and the field is then recognized as "unknown" in HS.

I was using the "Update Deal" zap in Zapier. The Zap did not throw an error for "" but instead just did nothing. However upon entering a "0" it gave me an error that 0 did not match a selection option.

So effectively, the zap is not working properly. It should take a "" as the same desired value/behavior of the API "Update Deal" call.

My solution was to use a Webhook custom PUT zap in Zapier and call the Update Deal API call manually using JSON to set the property's value to "". Worked great.

Can someone on the dev team please update the API documentation (would have immediately lead me to the issue here) and update the Zap for Zapier to allow "" values to reset the enumerated property as the raw API call does? 

View solution in original post

0 Upvotes
2 Replies 2
joeolsenmm
Solution
Participant

How do I set dropdown property to unknown or unselected through API

SOLVE

UPDATE

 

Turns out setting it to blank ("") works and the field is then recognized as "unknown" in HS.

I was using the "Update Deal" zap in Zapier. The Zap did not throw an error for "" but instead just did nothing. However upon entering a "0" it gave me an error that 0 did not match a selection option.

So effectively, the zap is not working properly. It should take a "" as the same desired value/behavior of the API "Update Deal" call.

My solution was to use a Webhook custom PUT zap in Zapier and call the Update Deal API call manually using JSON to set the property's value to "". Worked great.

Can someone on the dev team please update the API documentation (would have immediately lead me to the issue here) and update the Zap for Zapier to allow "" values to reset the enumerated property as the raw API call does? 

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

How do I set dropdown property to unknown or unselected through API

SOLVE

Hi, @joeolsenmm.

 

It sounds like you're asking someone to update Zapier's documentation and Zaps relating to updating HubSpot deals. Is that correct?

 

If so, Zapier built and supports that integration, so contact@zapier.com will be your best bet (also listed on this pageMoreContact support).

 

If I've misunderstood you and something needs to be updated in this HubSpot article, please specify what you'd like changed.

Isaac Takushi

Associate Certification Manager
0 Upvotes