PHPackages                             syniah/onecrmclient - 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. syniah/onecrmclient

ActiveLibrary[API Development](/categories/api)

syniah/onecrmclient
===================

Client wrapper for the 1CRM REST service

v1.2.1(8y ago)118[1 issues](https://github.com/Syniah/OneCRMClient/issues)MITPHPPHP &gt;=5.4.0

Since Apr 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Syniah/OneCRMClient)[ Packagist](https://packagist.org/packages/syniah/onecrmclient)[ RSS](/packages/syniah-onecrmclient/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

1CRM REST Interface PHP Client Class
====================================

[](#1crm-rest-interface-php-client-class)

[1CRM](http://1crm.com/) is a powerful open-source CRM system originally derived from SugarCRM, and it retains compatibility with its legacy REST API. This class provides a wrapper to make connecting and calling API methods easier, faster, safer, and more efficient. SugarCRM provides its own PHP client class that will work when talking to SugarCRM or 1CRM, however, it's poorly designed, outdated and inefficient, so I wrote this class as a better alternative.

1CRM supports the [SugarCRM v4 REST API](http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_7.5/70_API/Web_Services/40_Legacy_REST/SOAP_APIs/01_REST/), not the newer v10 API. Prior to v10, SugarCRM's REST interface is a misnomer; there's nothing REST-like about it. It's simply a wrapper around the SOAP API that supports JSON instead of XML for requests and responses, so don't expect to be able to use POST/PUT/GET/DELETE HTTP verbs!

Because of this, the best way to discover available functions and parameters is to browse the SOAP WSDL available at `/soap.php` in your 1CRM installation. All the functions and parameters are described there and may be passed to the `call` function as appropriate.

The class is compatible with TLS (which you should be using anyway!), HTTP/2, SPDY, IPv4 and IPv6, and makes use of HTTP compression and keep-alive for greatest efficiency. Certificate verification is enabled, so you will get errors if you try to use a self-signed, invalid, or expired TLS certificate.

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

[](#requirements)

The class requires that you are running PHP 5.4 or later, and have the PHP `curl` extension enabled. If you are serving your site over HTTP/2, and have a recent enough CURL library with nghttp2 support compiled into PHP, this client will use HTTP/2.

Usage
-----

[](#usage)

This class is available in [composer](https://getcomposer.org) via [packagist](https://packagist.org/packages/syniah/onecrmclient); either run `composer require syniah/onecrmclient "~1.0"` or add this line to your `composer.json` file manually, then run `composer update`:

```
"syniah/onecrmclient": "~1.0"

```

The class is structured according to the PSR-4 convention, uses the PSR-2 coding standard, is compatible with PHP 5.4 and later, and uses the `OneCRM` namespace.

```
