APIs & Integrations

pritamgb
Membre

How to assign multiple values to a multiple checkboxes property using contact's create or update api

Résolue

I am using contact's create or update API to update the information of a contact. Also, I have created a custom property which is a multiple checkboxes property. I want to assign multiple values to this field using API. How I can achieve that?

 

Example:

custom property name:           abc_xyz

values: pqr, efg, uvw, etc.

 

Lets say I want to assign pqr, uvw to property abc_xyz.

1 Solution acceptée
Willson
Solution
HubSpot Employee
HubSpot Employee

How to assign multiple values to a multiple checkboxes property using contact's create or update api

Résolue

Hey @pritamgb 

 

You can send the selected options as strings with each option separated by a semi-colon.

{
"property_name":"internal_value1;internal_value2"
}

This would then update to show multiple values per the multi-checkbox selection.

 

I hope this helps!

Product Manager @ HubSpot

Voir la solution dans l'envoi d'origine

2 Réponses
GinoMaul
Participant

How to assign multiple values to a multiple checkboxes property using contact's create or update api

Résolue

How about if "property_name" has a value of "internal_value0" already. Will that get overwritten with "internal_value1;internal_value2"? 

Is the correct call to append to existing data? Adding a semi-colon to the start of the first data?

{
"property_name":";internal_value1;internal_value2"
}

 

0 Votes
Willson
Solution
HubSpot Employee
HubSpot Employee

How to assign multiple values to a multiple checkboxes property using contact's create or update api

Résolue

Hey @pritamgb 

 

You can send the selected options as strings with each option separated by a semi-colon.

{
"property_name":"internal_value1;internal_value2"
}

This would then update to show multiple values per the multi-checkbox selection.

 

I hope this helps!

Product Manager @ HubSpot