Please can somebody help me. I’m trying to send signup details using REST API but although I can send the email address I’m not sure how to send the additional ‘data fields’. This is the JSON output:
stdClass Object
(
[id] => 123456789
[email] => test@email
[optInType] => Unknown
[emailType] => Html
[dataFields] => Array
(
[0] => stdClass Object
(
[key] => FIRSTNAME
[value] =>
)
[1] => stdClass Object
(
[key] => FULLNAME
[value] =>
)
[2] => stdClass Object
(
[key] => GENDER
[value] =>
)
[3] => stdClass Object
(
[key] => LASTNAME
[value] =>
)
)
and I’m trying to send the details like this:
$data = array(
'Email' => 'test@email',
'EmailType' => 'Html',
'datafields' => array(
'key' => 'FIRSTNAME',
'value'=> 'Fred',
'key' => 'LASTNAME',
'value'=> 'Fred Smith',
'key' => 'FULLNAME',
'value'=> 'Fred Smith',
'key' => 'GENDER',
'value'=> 'Male',)
);
but the datafields aren’t being sent.