Skip to main content

Two or more custom fields Contacts

  • November 21, 2017
  • 3 replies
  • 54 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!

Did this topic help you find an answer to your question?
This topic has been closed for comments

3 replies

aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+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!


  • Author
  • Apprentice
  • 2 replies
  • November 21, 2017

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"}

}


aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+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!