X
X
xaam2018-09-12 10:17:49
CRM
xaam, 2018-09-12 10:17:49

How to add a contact to Bitrix CRM via API?

Good day, yesterday I spent the whole day trying to add a contact to CRM via API
Problems with adding the BIRTHDATE field.
The most working options are
$arParams['BIRTHDATE'] = "10/11/1984"
and
$arParams['BIRTHDATE'] = "10/11/1984 19:49:13"
but they throw errors in different places. :o
In the first case,
[ErrorException] E_NOTICEUndefined offset: 3 (0)
/home/bitrix/www/bitrix/modules/main/tools.php:543 swears that the array does not have enough parameters.
in the second case
[ErrorException] E_NOTICEUndefined index: MI (0)
/home/bitrix/www/bitrix/modules/main/tools.php:510 swears that there are too many parameters and he does not know them (((((
I add this function
$new_contact_id = $ct->Add($arParams, true, array('DISABLE_USER_FIELD_CHECK' => true));

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory KOVALENKO, 2019-07-03
@otwebsafe

Try passing the date in another format, ISO 8601

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question