Skip to content

Instantly share code, notes, and snippets.

@ideaoforder
Last active February 10, 2017 17:47
Show Gist options
  • Save ideaoforder/6426a577f63bf2987493 to your computer and use it in GitHub Desktop.
Save ideaoforder/6426a577f63bf2987493 to your computer and use it in GitHub Desktop.
Make XML RPC requests to a Magento store
Using Mac's XML-RPC app
https://itunes.apple.com/us/app/xml-rpc-client/id424424203?mt=12
Get your session key
Endpoint URI: https://www.yourstore.com/index.php/api/xmlrpc/
Method: login
Params: 'username', 'password'
Using that session key, you can get a product's stock, for instance
Endpoint URI: https://www.yourstore.com/index.php/api/xmlrpc/
Method: call
Params: 'session_key', 'product_stock.list', ['product_id']
Additional resources:
http://www.magentocommerce.com/api/soap/introduction.html#Introduction-XMLRPC
Or update a product's quantity
Endpoint URI: https://www.yourstore.com/index.php/api/xmlrpc/
Method: call
Params: 'session_key', 'product_stock.update', ['product_id', {qty: '1'}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment