<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error when posting to multiple checkbox contact field via Contacts API in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Error-when-posting-to-multiple-checkbox-contact-field-via/m-p/437871#M43374</link>
    <description>&lt;P&gt;I'm getting a validation error when posting values to a multiple checkbox field using the Contacts API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I'm using to post:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;array(
                'property' =&amp;gt; 'allteamguids',
                'value' =&amp;gt; str_replace(',', ';', $allTeamGUID)
            )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the response I get from the API:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"validationResults":[{"isValid":false,"message":"28287d04-9ca8-4aa2-ad82-853248fd58e6 was not one of the allowed options: [label: \"0035139a-bc65-4fc0-bca4-371631034395\"\nvalue: \"0035139a-bc65-4fc0-bca4-371631034395\"\n, label: \"02084cca-b689-42d6-85c4-47fd83d2dca2\"\nvalue: \"02084cca-b689-42d6-85c4-47fd83d2dca2\"\n, label: \"02a1843a-5b85-4ee1-ac27-7a956d8c3980\"\nvalue: \"02a1843a-5b85-4ee1-ac27-7a956d8c3980\"\n, label: \"05078554-f6dc-443e-8921-000dc95e7b58\"\nvalue: \"05078554-f6dc-443e&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 15 May 2021 12:09:53 GMT</pubDate>
    <dc:creator>IParsons</dc:creator>
    <dc:date>2021-05-15T12:09:53Z</dc:date>
    <item>
      <title>Error when posting to multiple checkbox contact field via Contacts API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-when-posting-to-multiple-checkbox-contact-field-via/m-p/437871#M43374</link>
      <description>&lt;P&gt;I'm getting a validation error when posting values to a multiple checkbox field using the Contacts API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I'm using to post:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;array(
                'property' =&amp;gt; 'allteamguids',
                'value' =&amp;gt; str_replace(',', ';', $allTeamGUID)
            )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the response I get from the API:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"validationResults":[{"isValid":false,"message":"28287d04-9ca8-4aa2-ad82-853248fd58e6 was not one of the allowed options: [label: \"0035139a-bc65-4fc0-bca4-371631034395\"\nvalue: \"0035139a-bc65-4fc0-bca4-371631034395\"\n, label: \"02084cca-b689-42d6-85c4-47fd83d2dca2\"\nvalue: \"02084cca-b689-42d6-85c4-47fd83d2dca2\"\n, label: \"02a1843a-5b85-4ee1-ac27-7a956d8c3980\"\nvalue: \"02a1843a-5b85-4ee1-ac27-7a956d8c3980\"\n, label: \"05078554-f6dc-443e-8921-000dc95e7b58\"\nvalue: \"05078554-f6dc-443e&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 May 2021 12:09:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-when-posting-to-multiple-checkbox-contact-field-via/m-p/437871#M43374</guid>
      <dc:creator>IParsons</dc:creator>
      <dc:date>2021-05-15T12:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error when posting to multiple checkbox contact field via Contacts API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-when-posting-to-multiple-checkbox-contact-field-via/m-p/438210#M43396</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/190347"&gt;@IParsons&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you confirm that that value exists in the possible property values?&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 14:57:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-when-posting-to-multiple-checkbox-contact-field-via/m-p/438210#M43396</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-05-17T14:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error when posting to multiple checkbox contact field via Contacts API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-when-posting-to-multiple-checkbox-contact-field-via/m-p/438222#M43398</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;&amp;nbsp;- thanks for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;These values don't exist as property values - I assumed the API would create them as options if they don't exist, but I realise now that's quite a big assumption &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll go do some research, but please let me know if it's possible to create additional values through the API?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 15:05:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-when-posting-to-multiple-checkbox-contact-field-via/m-p/438222#M43398</guid>
      <dc:creator>IParsons</dc:creator>
      <dc:date>2021-05-17T15:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error when posting to multiple checkbox contact field via Contacts API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-when-posting-to-multiple-checkbox-contact-field-via/m-p/438278#M43402</link>
      <description>&lt;P&gt;You can patch the property with aptly named &lt;A href="https://developers.hubspot.com/docs/api/crm/properties" target="_blank" rel="noopener"&gt;Properties API &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Test it out.&amp;nbsp; I believe you need to have all of the available values in your call when updating.&amp;nbsp; So if you sent a request with just the new value, it would remove all of the others and only have the one new value.&amp;nbsp; (I could be wrong, it has been a bit since I tested it)&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 16:31:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-when-posting-to-multiple-checkbox-contact-field-via/m-p/438278#M43402</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-05-17T16:31:03Z</dc:date>
    </item>
  </channel>
</rss>

