APIs & Integrations

jcummins06
Member

API - Escaping ampersands in multiple checkbox values

Hi,
We are having trouble updating a multiple checkbox field. We are posting something like this:

{“properties”:[{“property”:“interest_areas”,“value”:“Technology;Benchmarking & Measurement”}]}

…which results in the error: Benchmarking & was not one of the allowed options

We don’t appear to be having any issues passing values containing ampersands for other field types. How should the ampersand be escaped?

Thanks
James

0 Upvotes
3 Replies 3
Dadams
HubSpot Employee
HubSpot Employee

API - Escaping ampersands in multiple checkbox values

Hi @jcummins06

Can you send me the Hub ID you’re seeing this with? If the ampersand is part of the value (and not just the label) for that option, you shouldn’t need any special handling for that.

0 Upvotes
jcummins06
Member

API - Escaping ampersands in multiple checkbox values

Hi David, thanks for getting back to me - the ID is 483419.

Cheers,
James

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

API - Escaping ampersands in multiple checkbox values

Thanks James. I’m not seeing this with a similar setup on a test portal and I need some more details. I’ll message you directly.

0 Upvotes