cloudloyalty / amocrm-client
AmoCRM PHP HTTP client library
Installs: 3 865
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 2
Open Issues: 0
Requires
- php: >=7.1
- guzzlehttp/guzzle: ^6.3|^7.0
- guzzlehttp/psr7: ^1.4|^2.0
Requires (Dev)
- phpstan/phpstan: ^1.4
This package is auto-updated.
Last update: 2024-10-22 14:58:56 UTC
README
PHP client for AmoCRM API
Usage example:
$client = new Client( $config['amocrm_subdomain'], $config['amocrm_login'], $config['amocrm_api_key'] ); $data = $client->createUnsortedForm() ->setSourceName('ourdomain.com') ->setSourceUid(date('YmdHis')) ->setFormId($formId) ->setFormPage('New request') ->setIp($clientIp) ->setServiceCode('wtf') ->setFormName($formName) ->setReferer($clientReferer) ->addIncomingContact( $client->createContact() ->setName($clientName) ->addCustomField( $client->createCustomField($config['amocrm_phone_id']) ->addValue($clientPhone, $config['amocrm_phone_enum']) ) ) ->addIncomingLead( $client->createLead() ->setName('New request from ' . $clientName) ); // send data to server $client->persist($data);