PHPackages                             resetnn/api-client-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. [HTTP &amp; Networking](/categories/http)
4. /
5. resetnn/api-client-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

resetnn/api-client-php
======================

PHP client for retailCRM API

v4.0.0(9y ago)035MITPHPPHP &gt;=5.3.0

Since Oct 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/resetnn/api-client-php)[ Packagist](https://packagist.org/packages/resetnn/api-client-php)[ Docs](http://www.retailcrm.pro/)[ RSS](/packages/resetnn-api-client-php/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (8)Versions (17)Used By (0)

retailCRM API PHP client
========================

[](#retailcrm-api-php-client)

PHP-client for [retailCRM API](http://www.retailcrm.pro/docs/Developers/ApiVersion3).

Use [API documentation](http://retailcrm.github.io/api-client-php)

Requirements
------------

[](#requirements)

- PHP 5.3 and above
- PHP's cURL support

Install
-------

[](#install)

1. Get [composer](https://getcomposer.org/download/)
2. Run into your project directory:

```
composer require resetnn/api-client-php ~3.0.0 --no-dev
```

If you have not used `composer` before, include autoloader into your project.

```
require 'path/to/vendor/autoload.php';
```

Usage
-----

[](#usage)

### Get order

[](#get-order)

```
$client = new \RetailCrm\ApiClient(
    'https://demo.retailcrm.pro',
    'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH'
);

try {
    $response = $client->ordersGet('M-2342');
} catch (\RetailCrm\Exception\CurlException $e) {
    echo "Connection error: " . $e->getMessage();
}

if ($response->isSuccessful()) {
    echo $response->order['totalSumm'];
    // or $response['order']['totalSumm'];
    // or
    //    $order = $response->getOrder();
    //    $order['totalSumm'];
} else {
    echo sprintf(
        "Error: [HTTP-code %s] %s",
        $response->getStatusCode(),
        $response->getErrorMsg()
    );

    // error details
    //if (isset($response['errors'])) {
    //    print_r($response['errors']);
    //}
}
```

### Create order

[](#create-order)

```
$client = new \RetailCrm\ApiClient(
    'https://demo.retailcrm.pro',
    'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH'
);

try {
    $response = $client->ordersCreate(array(
        'externalId' => 'some-shop-order-id',
        'firstName' => 'Vasily',
        'lastName' => 'Pupkin',
        'items' => array(
            //...
        ),
        'delivery' => array(
            'code' => 'russian-post',
        )
    ));
} catch (\RetailCrm\Exception\CurlException $e) {
    echo "Connection error: " . $e->getMessage();
}

if ($response->isSuccessful() && 201 === $response->getStatusCode()) {
    echo 'Order successfully created. Order ID into retailCRM = ' . $response->id;
        // or $response['id'];
        // or $response->getId();
} else {
    echo sprintf(
        "Error: [HTTP-code %s] %s",
        $response->getStatusCode(),
        $response->getErrorMsg()
    );

    // error details
    //if (isset($response['errors'])) {
    //    print_r($response['errors']);
    //}
}
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 52.1% 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 ~69 days

Recently: every ~143 days

Total

15

Last Release

3632d ago

Major Versions

1.3.0 → v3.0.12014-11-06

v3.0.5 → v4.0.02016-06-06

PHP version history (2 changes)v1.0.0PHP &gt;=5.2.0

v3.0.1PHP &gt;=5.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/af4d6947b358c402db99cd81ccb9d3811cc79a9401281f55d7ac3a02e522e658?d=identicon)[resetnn](/maintainers/resetnn)

---

Top Contributors

[![muxx](https://avatars.githubusercontent.com/u/461614?v=4)](https://github.com/muxx "muxx (49 commits)")[![gwinn](https://avatars.githubusercontent.com/u/477726?v=4)](https://github.com/gwinn "gwinn (26 commits)")[![pomadchin](https://avatars.githubusercontent.com/u/4929546?v=4)](https://github.com/pomadchin "pomadchin (10 commits)")[![tikijian](https://avatars.githubusercontent.com/u/1406569?v=4)](https://github.com/tikijian "tikijian (5 commits)")[![jools333](https://avatars.githubusercontent.com/u/7840724?v=4)](https://github.com/jools333 "jools333 (2 commits)")[![linniksa](https://avatars.githubusercontent.com/u/424343?v=4)](https://github.com/linniksa "linniksa (2 commits)")

---

Tags

apirestretailCRM

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/resetnn-api-client-php/health.svg)

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

###  Alternatives

[retailcrm/api-client-php

PHP client for RetailCRM API

68981.8k1](/packages/retailcrm-api-client-php)[xendit/xendit-php

Xendit PHP SDK

189730.6k6](/packages/xendit-xendit-php)[angelleye/paypal-php-library

PHP wrapper for PayPal APIs

243440.9k](/packages/angelleye-paypal-php-library)[infobip/infobip-api-php-client

PHP library for consuming Infobip's API

921.8M10](/packages/infobip-infobip-api-php-client)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[mediamonks/rest-api-bundle

MediaMonks Rest API Symfony Bundle

1656.2k1](/packages/mediamonks-rest-api-bundle)

PHPackages © 2026

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