PHP Classes

PHP AmoCRM API Client: Manage accounts of AmoCRM using its REST API

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 167 All time: 8,889 This week: 49Up
Version License PHP version Categories
amocrm-rest-api 1.0.14BSD License5.0PHP 5, Web services
Description 

Author

This class can Manage accounts of AmoCRM using its REST API.

It can obtain an authorization token for a given account, so it can send HTTP requests to the AmoCRM REST API in order to perform several types of operations.

Currently it can the current accounts, set and get contacts, contact links, leads, companies, tasks, notes and fields.

Picture of Dmitry Mamontov
  Performance   Level  
Name: Dmitry Mamontov <contact>
Classes: 16 packages by
Country: Russian Federation Russian Federation
Innovation award
Innovation award
Nominee: 6x

Example

<?
require 'AmoRestApi.php';

//Getting information about the leads
$leadsId = 2556;
$amo = new AmoRestApi($subDomain, $login, $key);
$order = $amo->getLeadsList(1, 0, $leadsId);

//Creating a contacts
$amo = new AmoRestApi($subDomain, $login, $key);
$contacts['add'] = array(
   
'name' => 'Test',
   
'request_id' => '2555',
   
'date_create' => time()
);
$result = $amo->setContacts($contacts);
?>


Details

Latest Stable Version License Total Downloads

AmoCRM API Client

This class can Manage accounts of AmoCRM using its REST API.

It can obtain an authorization token for a given account, so it can send HTTP requests to the AmoCRM Rest API in order to perform several types of operations.

Currently it can the current accounts, set and get contacts, contact links, leads, companies, tasks, notes and fields.

Requirements

  • PHP version >5.0
  • curl

Available methods

  • `getAccounts`
  • `setContacts`, `getContactsList`, `getContactsLinks`
  • `setLeads`, `getLeadsList`
  • `setCompany`, `getCompanyList`
  • `setTasks`, `getTasksList`
  • `setNotes`, `getNotesList`
  • `setFields`

Installation

1) Install composer

2) Follow in the project folder:

composer require dmamontov/amo-restapi ~1.0.3

In config composer.json your project will be added to the library dmamontov/amo-restapi, who settled in the folder vendor/. In the absence of a config file or folder with vendors they will be created.

If before your project is not used composer, connect the startup file vendors. To do this, enter the code in the project:

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

Examples of use

Getting information about the leads

$amo = new AmoRestApi($subDomain, $login, $key);
$order = $amo->getLeadsList(1, 0, 2556);

Creating a contacts

$amo = new AmoRestApi($subDomain, $login, $key);
$contacts['add'] = array(
    'name' => 'Test',
    'request_id' => '2555',
    'date_create' => time()
);
$result = $amo->setContacts($contacts);

  Files folder image Files (5)  
File Role Description
Plain text file AmoRestApi.php Class Class source
Accessible without login Plain text file composer.json Output Sample output
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:167
This week:0
All time:8,889
This week:49Up