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 4d 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 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

1168d 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)")

---

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

[kbsali/redmine-api

Redmine API client

4221.1M24](/packages/kbsali-redmine-api)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)[wordpress/php-ai-client

A provider agnostic PHP AI client SDK to communicate with any generative AI models of various capabilities using a uniform API.

26236.6k14](/packages/wordpress-php-ai-client)[prokerala/astrology-sdk

Prokerala.com Astrology API Client Library for PHP.

2610.0k](/packages/prokerala-astrology-sdk)[luzrain/telegram-bot-api

PHP Wrapper for Telegram Bot API

1032.8k1](/packages/luzrain-telegram-bot-api)

PHPackages © 2026

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