uncategorized
frankebailey at April 25th, 2018 06:13 — #1
Hi folks, I'm doing an update via the API as follows:
{
"custom_fields":
{
"custom_field":{
"id":"5a6b0c0aaa7620bd07dfe0e1"
},
"value":"31/01/1972"
}
}
That ID is a custom field for the user's Birthday.
I get the following response:
[status] => 400
[message] => Invalid request data
[error_name] => invalid_request_data
[error_message] => A validation error has occurred
[errors] =>
(
[custom_fields] => Must be an array
)
As far as I can tell, custom_fields IS an array, so can anyone possibly tell me what I'm doing wrong please?
Thanks!
pawelsmolinski at April 25th, 2018 18:07 — #2
From what I see you are sending single JSON object not an array in here
frankebailey at April 26th, 2018 01:59 — #3
Hi Pawel,
Thanks for the quick response! You were 100% right, I'd missed out the parent array. When I added that in it began to work.
You guys rock!
Powered by Discourse, best viewed with JavaScript enabled