我正在尝试用他们的api向Zurmo添加联系人。 可以找到完整的文档here 登录成功:
Array
(
[status] => SUCCESS
[data] => Array
(
[sessionId] => 6qkdhn85vrn2kg37r7f690hu62
[token] => bd64877aa701ee957105f5cbea91018c
)
[message] =>
[errors] =>
)
$data = Array(
'firstName' => $fields['firstName'],
'lastName' => $fields['lastName'],
'jobTitle' => '',
'department' => $fields['rank'],
'officePhone' => $fields['businessPhone'],
'mobilePhone' => $fields['privatePhone'],
'officeFax' => '',
'description' => '',
'companyName' => '',
'website' => '',
'industry' => Array
(
'value' => ''
),
'source' => Array
(
'value' => 'Outbound'
),
'title' => Array
(
'value' => $fields['appeal']
),
'state' => Array
(
'id' => 5
),
'account' => Array
(
'id' => 1
),
'primaryEmail' => Array
(
'emailAddress' => $fields['email'],
'optOut' => 1,
),
'secondaryEmail' => Array
(
'emailAddress' => "",
'optOut' => 0,
'isInvalid' => 1,
),
'primaryAddress' => Array
(
'street1' => $fields['street'],
'street2' => '',
'city' => $fields['city'],
'postalCode' => $fields['zipCode'],
'country' => $fields['country'],
),
'secondaryAddress' => Array
(
'street1' => '',
'street2' => '',
'city' => '',
'postalCode' => '',
'country' => '',
),
);
$data['modelRelations'] = array(
'opportunities' => array(
array(
'action' => 'add',
'modelId' => 3
),
),
);
$response = $this->createApiCall('http://zurmo_url/app/index.php/contacts/contact/api/create/', 'POST', $headers, array('data' => $data));
$response = json_decode($response, true);
我添加的网址是为了演示目的,但我已经把正确的网址。 我回来的回应是
[status] => FAILURE
[data] =>
[message] =>
[errors] =>
别的失败。我也在错误日志中收到错误
[Fri May 06 14:35:37.459049 2016] [fcgid:warn] [pid 31399] [client 86.123.146.201:53303] mod_fcgid:stderr:PHP注意:尝试在/ var /中获取非对象的属性第145行的www / clients / client0 / web1 / web / app / protected / config / common.php
任何想法为什么会发生这种情况?