PHPackages                             canapecrm/api-client - 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. canapecrm/api-client

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

canapecrm/api-client
====================

CanapeCRM HTTP API client

1.0.0(9y ago)1212Apache-2.0PHPPHP &gt;=5.4.0CI failing

Since Jun 28Pushed 9y agoCompare

[ Source](https://github.com/CanapeCRM/api-client)[ Packagist](https://packagist.org/packages/canapecrm/api-client)[ Docs](https://www.canapecrm.ru/)[ RSS](/packages/canapecrm-api-client/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

canapecrm-client
================

[](#canapecrm-client)

Canape CRM API implementation

Package provides basic integration methods implementation. Deal creation and retrieving DealType and Event lists are available in the current version.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist canapecrm/api-client

```

or add

```
canapecrm/api-client

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Configure your canapecrm.ru domain and access token. The Deal creation example is below:

```
$oClient = new CanapeCrmApi\ClientLib( '.canapecrm.ru', CANAPECRM_ACCESS_TOKEN );

```

> For security, keep access token definition CANAPECRM\_ACCESS\_TOKEN in the secure place out from version control.

```
try {
    $oResponse = $oClient->createDeal(
        (new CanapeCrmApi\models\NewDeal())
            ->setDomain( $_SERVER['SERVER_NAME'] )
            ->setDealTitle( 'Deal Castle Manufacture website ' . date( "H:i:s d.m.Y" ) )
            ->setDealContent( 'A cannonball for riding on' )
            ->setContactClient( 'Baron Munchausen' )
            ->setContactEmail( 'baron@crm.saas' )
            ->setContactPhone( '+1720 (0511) 97-02-22' )
            /* Works only with auto invoice settings */
            ->addCatalogItem(
                (new CanapeCrmApi\models\Catalog())
                    ->setIndex('CB690')
                    ->setTitle( 'Pumhart von Steyr cannonball' )
                    ->setCount( 1 )
                    ->setPrice( 2000 )
            )
    );

    /**
     * Array with new deal id
     * [ 'id' =>  ]
     * Optionally returns a href to the generated document
     * [ 'id' => ,
     *    'form|offer|invoice' =>
     * ]
     */
    $oResponse->json();

} catch ( \CanapeCrmApi\exception\CanapeCrmClientException $e ) {

    /**
     * Catch api-client exceptions such as required fields validation errors
     */

} catch ( GuzzleHttp\Exception\RequestException $e ) {
    echo $e->getRequest() . "\n";
    if ( $e->hasResponse() ) {

        $e->getResponse()->json();
    }
}

```

To perform Deal separation by type and event use method results:

```
$oResponse = $oClient->getDealTypes(); // ->getEvents()
$oResponse->json();

```

Then you can set it on deal creation:

```
$oResponse = $oClient->createDeal(
    (new CanapeCrmApi\models\NewDeal())
        ...
        ->setEventId(  )
        ->setDealTypeId(  )
        ...
);

```

Provide a result of javascript counter via method:

```
   ...
   ->setCanapeUuid(  )
   ...

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~1 days

Total

2

Last Release

3289d ago

### Community

Maintainers

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

---

Top Contributors

[![CanapeCRM](https://avatars.githubusercontent.com/u/29756838?v=4)](https://github.com/CanapeCRM "CanapeCRM (1 commits)")

### Embed Badge

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

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.5k](/packages/aws-aws-sdk-php)[spatie/crawler

Crawl all internal links found on a website

2.8k18.5M62](/packages/spatie-crawler)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k36](/packages/neuron-core-neuron-ai)[illuminate/http

The Illuminate Http package.

11937.9M6.7k](/packages/illuminate-http)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[guzzlehttp/guzzle-services

Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.

25711.0M188](/packages/guzzlehttp-guzzle-services)

PHPackages © 2026

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