Android Connect to Magento


Android Connect to Magento : While creating android application of magento we first need to understand how to connect with magento and how to pull the data from the magento using magento api. Here in this tutorial we are going to give the brief introduction how to connection with magento from andoid or ios using the soap or rest api.


Android Connect to Magento

ios

Magento provides the SOAP and REST api for application development. Here are main points which needs to start with android or ios app of magento.

1.SOAP API – http://www.magentocommerce.com/api/soap/introduction.html

2.REST API – http://www.magentocommerce.com/api/rest/introduction.html

3. Now create a New User in your Magento Store with roles. Login to magento Admin and go to system->WebServices->User&Roles.

4. Here create role and a user. Then assign the roles to this User.
Magento connect to android soap rest example

Now you can call the soap method as in example below –

Android Connect to Magento Soap Example:

$client = new SoapClient('http://mydomain.com/soap/api/?wsdl');

$session = $client->login('apiUser', 'apiKey');
// get both from apiUser detail in magento.
$params = array(array(
    'status'=>array('eq'=>'pending')
));
$result = $client->call($session, 'sales_order.list', $params);

The above example will give you the sales order data.


Advertisements

Add Comment

📖 Read More