PHP code example of nikitanp / alfacrm-api-php
1. Go to this page and download the library: Download nikitanp/alfacrm-api-php library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nikitanp / alfacrm-api-php example snippets
$apiClient = new \Nikitanp\AlfacrmApiPhp\Client(
$psr18Client,
$psr17RequestFactory,
$psr17StreamFactory
);
$apiClient->setDomain('domain.alfacrm.pro');
$apiClient->setEmail('[email protected] ');
$apiClient->setApiKey('application-api-key');
$apiClient->authorize();
$customer = new \Nikitanp\AlfacrmApiPhp\Entities\Customer($apiClient);
$customer->fields();
$customer->count();
$customer->get();
$customer->getAll();
$customer->getAllArchived();
$customer->create(['customer_data']);
$customer->delete(1);
$customer->update(1, ['customer_data']);
bash
composer
get(int $page = 0, array $filterData = []): array
getAll(array $filterData = []): \Generator
getFirst(array $filterData = []): array
count(array $filterData = []): int
fields(array $filterData = []): array
create(array $entityData): array
update(int $entityId, array $updateData): array
delete(int $entityId): array