Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

npm-api-client-amocrm

0.6.3 • Public • Published

amoCRM API Client

NPM

An API client for amoCRM

Installation

Supports Node.js 4.0.0 and later. You can install amoApiClient in your project's node_modules folder, or you can install it globally.

To install the latest version available on NPM:

npm install npm-api-client-amocrm

To install the latest development version:

npm install git+https://github.com/Bolid1/npm-api-client-amocrm.git

Available methods and entities

For contacts, leads, companies, tasks and notes available add, list, update and set methods. For customers, transactions, catalogs and catalog elements available add, list, update, delete and set methods. Also available method auth to auth in account and method current to get info about current account.

Note: This client takes into account that amoCRM prohibits making requests to the API more than once per second.

Quick start

const amoClients = require('npm-api-client-amocrm');
const amoClient = amoClients.default();
const subdomain = 'test';
const login = 'test@test.test';
const key = 'test';
 
amoClient.auth(subdomain, login, key).then(function (res) {
  console.log('auth res: ', res);
  if (res.auth === true) {
    amoClient.addLeads([{name: 'Test'}]).then(function (leadsIds) {
      console.log('leadsIds: ', leadsIds);
      if (leadsIds[0] && leadsIds[0].id) {
        amoClient.listLeads({id: leadsIds[0].id}).then(function (leads) {
          console.log('lead: ', leads[0]);
        });
      }
    });
  }
});

Available methods and entities

To know more go to

Keywords

none

Install

npm i npm-api-client-amocrm

DownloadsWeekly Downloads

20

Version

0.6.3

License

MIT

Unpacked Size

1.59 MB

Total Files

72

Last publish

Collaborators

  • avatar