PHPackages                             nikitanp/alfacrm-api-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. nikitanp/alfacrm-api-php

ActiveLibrary[API Development](/categories/api)

nikitanp/alfacrm-api-php
========================

API for AlfaCRM

v2.0.0(3y ago)21751MITPHPPHP ^7.4|^8.0

Since May 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nikitanp/alfacrm-api-php)[ Packagist](https://packagist.org/packages/nikitanp/alfacrm-api-php)[ Docs](https://github.com/nikitanp/alfacrm_api_php)[ RSS](/packages/nikitanp-alfacrm-api-php/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

API для AlfaCRM
===============

[](#api-для-alfacrm)

[![Latest Version on Packagist](https://camo.githubusercontent.com/09312bdaec441ec4a210794c405f106e5a31985725cb88551ce96a559969275f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e696b6974616e702f616c666163726d2d6170692d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nikitanp/alfacrm-api-php)

---

Описание
--------

[](#описание)

Данный пакет является PHP клиентом для [REST API AlfaCRM](https://alfacrm.pro/rest-api)

Клиент использует [PSR-18](https://www.php-fig.org/psr/psr-18/) и [PSR-17](https://www.php-fig.org/psr/psr-17/) для своей работы. Например, можно использовать в качестве http клиента библиотеку [guzzlehttp/guzzle](https://github.com/guzzle/guzzle)и PSR-17 имплементацию для нее [http-interop/http-factory-guzzle](https://github.com/http-interop/http-factory-guzzle).

Установка
---------

[](#установка)

```
composer require nikitanp/alfacrm-api-php
```

Базовые методы для работы
-------------------------

[](#базовые-методы-для-работы)

Базовые методы находятся в классе `\Nikitanp\AlfacrmApiPhp\Entities\AbstractEntity`:

- `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` Удаляет сущность

Пример использования
--------------------

[](#пример-использования)

```
$apiClient = new \Nikitanp\AlfacrmApiPhp\Client(
     $psr18Client,
     $psr17RequestFactory,
     $psr17StreamFactory
);
$apiClient->setDomain('domain.alfacrm.pro');
$apiClient->setEmail('admin@domain.exaple');
$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']);
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~663 days

Total

2

Last Release

1216d ago

Major Versions

v1.0.4 → v2.0.02023-03-04

PHP version history (2 changes)v1.0.4PHP ^7.3|^8.0

v2.0.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c7928cc1c1e7f8b3839edd50df4871b3013eac6c5ac664d024e37594d93d48a?d=identicon)[Nikita\_NoMix](/maintainers/Nikita_NoMix)

---

Top Contributors

[![nikitanp](https://avatars.githubusercontent.com/u/19794930?v=4)](https://github.com/nikitanp "nikitanp (8 commits)")[![nikitam-se](https://avatars.githubusercontent.com/u/294480124?v=4)](https://github.com/nikitam-se "nikitam-se (1 commits)")

---

Tags

nikitanpalfacrm-api-phpalfacrm

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nikitanp-alfacrm-api-php/health.svg)

```
[![Health](https://phpackages.com/badges/nikitanp-alfacrm-api-php/health.svg)](https://phpackages.com/packages/nikitanp-alfacrm-api-php)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60216.0M83](/packages/mollie-mollie-api-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M419](/packages/drupal-core-recommended)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
