PHP Client for IntaroCRM REST API.
- PHP version 5.3 and above
- PHP-extension CURL
-
Install composer into the project directory.
-
Add IntaroCRM REST API client in your composer.json:
{
"require": {
"intarocrm/rest-api-client": "1.3.*"
}
}- Use command
php composer.phar update intarocrm/rest-api-clientto install new vendor intovendor/folder.
$crmApiClient = new \IntaroCrm\RestApi(
'https://demo.intarocrm.ru',
'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH'
);Constructor arguments are:
- Your IntaroCRM acount URL-address
- Your site API Token
try {
$orderTypes = $crmApiClient->orderTypesList();
}
catch (\IntaroCrm\Exception\CurlException $e) {
//$logger->addError('orderTypesList: connection error');
}
catch (\IntaroCrm\Exception\ApiException $e) {
//$logger->addError('orderTypesList: ' . $e->getMessage());
}