magento-api-xmlrpc

Magento XMLRPC wrapper for Node.js. This is the most reliable and up to date wrapper, including bug fixes.

Usage no npm install needed!

<script type="module">
  import magentoApiXmlrpc from 'https://cdn.skypack.dev/magento-api-xmlrpc';
</script>

README

Magento XMLRPC API Wrapper

This wrapper lets you talk to Magento via SOAP. This is the most reliable and up to date magento wrapper, with lots of bug fixes.

Original wrapper: bitbucket.org/icecom/magentoapi , developed by https://www.npmjs.com/~icecom and https://www.npmjs.com/~2ps.

This copy exists so I can rapidly fix any bugs I run into.

Installation

npm install git+ssh://git@github.com/wolakec/magento-api-xmlrpc.git

Usage

var MagentoAPI = require('magento-api');
var magento = new MagentoAPI({
  host: 'your.host',
  port: 80,
  path: '/api/xmlrpc/',
  login: 'your_username',
  pass: 'your_pass'
});

magento.login(function(err, sessId) {
  if (err) {
    // deal with error
    return;
  }

  // use magento
});

If need be, you can manually change the session id.

magento.changeSession(newSessionId);

All of the API methods take an object of params as the first argument, and a callback as the second.

Or, if no params are sent, just a callback as the first argument.

Methods