1
0
mirror of synced 2024-11-24 14:26:06 +03:00
PHP client for RetailCRM API
Go to file
Ilyas Salikhov e5b07ed701 Merge pull request #2 from linniksa/patch-add-datetime-support
Add support to DateTime dates
2014-09-22 09:45:27 +04:00
lib/IntaroCrm Merge pull request #2 from linniksa/patch-add-datetime-support 2014-09-22 09:45:27 +04:00
.gitignore add_gitignore 2014-09-18 15:08:48 +04:00
composer.json Update composer.json 2013-07-05 14:18:52 +04:00
README.md Update README.md 2014-09-18 16:42:24 +04:00

IntaroCRM REST API client

PHP Client for IntaroCRM REST API.

Requirements

  • PHP version 5.3 and above
  • PHP-extension CURL

Installation

  1. Install composer into the project directory.

  2. Add IntaroCRM REST API client in your composer.json:

{
    "require": {
        "intarocrm/rest-api-client": "1.3.*"
    }
}
  1. Use command php composer.phar update intarocrm/rest-api-client to install new vendor into vendor/ folder.

Usage

Create API clent class


$crmApiClient = new \IntaroCrm\RestApi(
    'https://demo.intarocrm.ru',
    'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH'
);

Constructor arguments are:

  1. Your IntaroCRM acount URL-address
  2. Your site API Token

Example: get order types list


try {
    $orderTypes = $crmApiClient->orderTypesList();
}
catch (\IntaroCrm\Exception\CurlException $e) {
    //$logger->addError('orderTypesList: connection error');
}
catch (\IntaroCrm\Exception\ApiException $e) {
    //$logger->addError('orderTypesList: ' . $e->getMessage());
}