XMLRPC API

Posted . Visible to the public.

The XMLRPC API parameters always confuse me, they're below:

Login:

<?xml version="1.0"?>
<methodCall>
  <methodName>login</methodName>
  <params>
    <param>
        <value><string>zapier</string></value>
    </param>
    <param>
        <value><string>monkey</string></value>
    </param>
  </params>
</methodCall>

Order list:

<?xml version="1.0"?>
<methodCall>
  <methodName>call</methodName>
  <params>
    <param>
        <value>
            <string>884e467da98500811ff3082f43c63277</string>
        </value>
    </param>
    <param>
        <value>
            <string>sales_order.list</string>
        </value>
    </param>
  </params>
</methodCall>

Order info:

<?xml version="1.0"?>
<methodCall>
  <methodName>call</methodName>
  <params>
    <param>
        <value>
            <string>884e467da98500811ff3082f43c63277</string>
        </value>
    </param>
    <param>
        <value>
            <string>sales_order.info</string>
        </value>
    </param>
    <param>
        <value>
            <string>0022066</string>
        </value>
    </param>
  </params>
</methodCall>

So login is unique in that the params you supply to it are real XMLRPC params, but all other calls are odd, in that the method is call, XMLRPC params 1 and 2 are the session id and the method to call (i.e. sales_order.info), and XMLRPC param is either a single string value (for methods that only need one value, like sales_order.info), or it is an array of params to the method.

Mike Whitby
Last edit
Mike Whitby
Posted by Mike Whitby to Magento (2016-05-13 11:00)