How to Integrate Magento API in PHP

Magento API provides ability to manage your eCommerce website by accessing api calls for Products, customers, sales order and categories etc. You can also manage inventory and shopping cart via magento api calls.

Magento API Integration using PHP:

1) Create a Web Service User Role:

Very first step is to create a web service user role in your magento store. To create it Go to System -> Web Services -> Roles in your admin panel. Click on Add New Role and enter the your role name in Role Information box.

create magento api roles

2) Now click on the Role Resources tab. Select the resource access for this user role and than save the role.

magento api roles

3) Create Web Service User:

Now create a new user, go to System -> Web Services -> Users and click on Add New User option. Fill all the required information in form. Must choose unique Api key, and make account as active.

create magento api user

Under User role tab make sure that assign previous created API Role than save the user. Now you are ready to use Magento API. Check below one api code sample to get List of Order via Magento api call in PHP.

Get Magento List Order Data Via Api Call in PHP:

Using above code sample you can use other Magento API methods. Check here for complete list of Magento Methods:

If any issue get feel free to contact me. Thanks

Leave a Comment