1
0
mirror of synced 2024-11-22 05:16:07 +03:00
api-client-php/README.md
kruglov 623b667aef fix #15624
orderTypeMethods added
README.md fixed
composer.json fixed
2013-07-04 15:14:27 +04:00

48 lines
801 B
Markdown

IntaroCRM REST API client
=================
PHP Client for [IntaroCRM REST API](http://docs.intarocrm.ru/rest-api/).
Requirements
------------
* PHP version 5.2 and above
* PHP-extension CURL
Installation
------------
Add IntaroCRM REST API client in your composer.json:
```js
{
"require": {
"intarocrm/crm-rest-api": "dev-master"
}
}
```
Usage
------------
### Create API clent class
``` php
$crmApiClient = new \IntaroCrmRestApi('http://demo.intarocrm.ru',
'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH');
```
Constructor arguments are:
1. Your IntaroCRM acount URL-address
2. Your site API Token
### Example: get order types list
``` php
$orderTypes = $crmApiClient->orderTypesList();
if (!is_null($crmApiClient->getLastError()))
return $crmApiClient->getLastError();
```