Closed vankaiser closed 6 years ago
IM - array
private function createContact($inputData)
{
$addData = array();
$addData['NAME'] = $inputData['NAME'];
$addData['SECOND_NAME'] = $inputData['SECOND_NAME'];
$addData['LAST_NAME'] = $inputData['LAST_NAME'];
$addData['IM'] = array($inputData['IM']);
$params = array();
$contact = new Contact($this->bx24);
$result = $contact->add($addData, $params);
if(empty($result['result'])) {
throw new \RuntimeException("Failed to contact create");
print_r('error: '.$result);
}
$contactId = $result['result'];
return $contactId;
}
@vankaiser I am trying to use the crm.lead.add, am always getting the error
The required field 'Lead Name' is missing.<br />
. I Checked necessary fields using the crm.lead.fields, and only "TITLE" has isRequired:True, even if i include TITLE, am getting the same error.
Did you face this bug?
This is my function in python ' def lead_add(id,phone=None): try: auth_code = get_auth_code() payload = {"auth": str(auth_code),"TITLE":str(id)} url=hit_url+'crm.lead.add' res=requests.get(url,params=payload) print(res.url) return res.json() except Exception as ex: print("EXCEPTION", ex) '
This is the request url
https://one.bitrix24.com/rest/crm.lead.add?TITLE=ROnald&auth=2v9g9a55vxeestrfgftyse
Have you tried to pass the name param as empty string? Name might be required.
Hi, crm.lead.add doesn't allow me to insert phone, email, and IM, but other info are Ok.