Ignore unknown properties when updating contact


#1

Is there a way for the API not to fail when sending an update contact request with “unknown” properties?
(So I won’t get “undefined: Property values were not valid” error)
For example, if I pass 3 props, and only 2 are listed, the contact will be updated with the 2 known props and the 3rd one will be ignored


#2

Hi @Roi_Divon,

Which API are you using? If you’re sending requests using the Update a contact endpoint in the Contacts API, you should omit any properties that you don’t want to update from the properties array. For example, if you want to update a contact’s firstname and lastname properties, but not their email property, you would omit the email from the request:

{
  "properties": [
    {
      "property": "firstname",
      "value": "Test"
    },
    {
      "property": "lastname",
      "value": "Contact"
    }
  ]
}