Two or more custom fields Contacts

  • 21 November 2017
  • 3 replies
  • 52 views


Hi,




I'm saving the contacts through the API...





How i send two or more custom fields in request. I get validation errors "Value set is of type Array.It should be a/an key/value pair"




All examples that found are: {"custom_field": {"my_field_name": "value"}}




Should not the API receive an array?


{


   "custom_fields": [


       {"my_field_1": "value_1"}, 


       {"my_field_2": "value_2" }


   ]


}




I'm building these fields dynamically by my application!




Thanks for all!



This topic has been closed for comments

3 replies

Userlevel 4
Badge +12

Hello Diego,




Thanks for posting this on our community forums. Can you please share the X-Request ID received in the response so that we can help you fix this?




Cheers!



Hi @Aravind




Please, disregard...


I was putting the wrong request. sorry!




It's ok




Now, i send:


{


"custom_fields": {"my_field_1": "value_1", "my_field_2": "value_2"}


}


Userlevel 4
Badge +12

No worries,Diego. Should you have any further questions, drop us a note here or write to us on support(at)freshdesk(com)




Cheers!