Im使用一个api将数据存储到JSON文件中。这些数据是从用户在我的网站上填写的表格中收集的。其插入方式如下:
$pers_payload = array(
'gender' => 'Unknown', //or Male / Female
'first_name' => $_POST['billing_first_name'],
'family_name' => $_POST ['billing_last_name'],
'email' => $_POST['billing_email'],
'linked_as_contact_to_organization' => array(
array(
'organization_id' => $organization_id, // add the person as a contact to the newly created organization
'work_email' => $_POST['billing_email'],
'work_phone' => $_POST['billing_phone']
)
),
'visiting_address' => array(
'country_code' => 'NL'
), // can be extented with other address data
'postal_address' => array(
'country_code' => $_POST['billing_country']
) // can be extented with other address data
);
然后:
$person = $SimplicateApi->makeApiCall('POST','/crm/person',json_encode($pers_payload));
现在,我想获得数据,而不是发布。我试着得到这样的数据:
$SimplicateApi->makeApiCall('GET','/crm/organization?q[name]=*my name*');
我不知道这是不是正确的方法,因为它不起作用,所以很明显它不是。
无论如何,我试图通过PHP实现的是,我想收集
name
现有人员的价值。此数据存储在
/api/v2/crm/person.json
Api文档(我读过但不太理解)
http://api.simplicate.nl/