Book Image

Magento PHP Developer????s Guide, 2nd Edition

By : Allan MacGregor
Book Image

Magento PHP Developer????s Guide, 2nd Edition

By: Allan MacGregor

Overview of this book

Table of Contents (16 chapters)
Magento PHP Developer's Guide Second Edition
About the Author
About the Reviewers

Using the API

Now that we have clarified each of the available protocols, let's explore what we can do with the Magento API and how we can use it with each of the available protocols.

We will use the product endpoint as an example to access and work with the different API protocols.


The examples are provided in PHP and use the three different protocols. For complete examples in other programming languages, check out

Setting up the API credentials for XML-RPC/SOAP

Before we get started we, need to create a set of web service credentials in order to access the API functions.

The first thing that we need to set up is the API user role. Roles control the permissions for the API using Access Control List (ACL). By implementing this design pattern, Magento is able to restrict certain parts of its API to specific users.

Later on this chapter, we will learn how we can add our custom functions to the ACL and secure our custom extensions API methods. For now, we just need to...