@OmarAlmonte, if you do not provide a proper array of the Email Addresses or Phone Numbers, the Contact - Create a Contact endpoint returns the following message.
JSON parse error: Cannot deserialize value of type `java.util.ArrayList<com.infusionsoft.api.rest.v2.common.dto.EmailAddressRequest>` from Object value (token `JsonToken.START_OBJECT`)
It should be checking the data structure and report a more appropriate message.
My apologies if this has been addressed.
Was there a doc. change re: the rfc for array handling? Addresses, Emails, Phones, et. al. covered by that rfc. Now I can’t find that ref.
Wasn’t there an admonition to send all such known array data w/ a Contact PUT or it would be erased? I don’t see that warning. @OmarAlmonte
@Jeffrey_Chimene Yes. For array fields, when doing a PATCH, you must send the complete array, including any existing values you want to keep. Array fields are treated as a full replacement, so if you omit items from the array, those items will be removed (i.e., the array will be updated to contain only the values included in the request).
@OmarAlmonte Thanks for checking. What about the RFC reference? That might shed some light on the expected error reporting.
I’m not seeing that admonition text in the online doc, though.
@OmarAlmonte Thanks. I guess boils down to some 4xx error and associated text. There’s probably not much more that can be reported.
These types of messages made life difficult when debugging similar messages returned by XMLRPC data guards. It would be nice to see that reporting mechanism clarified.