Skip to content

Instantly share code, notes, and snippets.

@molotovbliss
molotovbliss / gist:3c7352f774873fb737c3
Last active February 22, 2021 12:28
Using cURL via CLI to debug Magento's XML-RPC API calls
If any exceptions are encountered due to 3rd party/local observers debugging can be questionable as no log
is created to determine root cause. This mini doc covers how to use the XML-RPC API in Magento to test a
product update API call that is returning a 500 internal server error due to an observer firing in 3rd party
code. Using some simple XML docs prepared for login and the request it is easier to see the Fatal error
returned for a request, in this example product.update.
xmlrpclogin.xml contents:
<?xml version="1.0"?>
<methodCall>
@poly-glot
poly-glot / magento_api.php
Created May 16, 2013 19:35
Magento XMLRPC Api Client using ZendFramework
<?php
$api = MagentoApi::get_instance();
$api->setHost('your_magento_url/api/xmlrpc/')
->setCredentials('your_magento_api_user','your_magento_api_key');
/***
* For list of Supported Method Please visit
* http://www.magentocommerce.com/api/soap/catalog/catalog.html
*