Merchants have been asking for a fast and secure way to integrate more business applications within Magento. We’ve met this request by introducing the Magento REST API as part of the Magento Enterprise 1.12 and Community 1.7 releases.
Noteworthy benefits of the REST API include simplicity, ease of testing and troubleshooting, and better performance. It allows you to manage customers, customer addresses, sales orders, inventories and products using HTTP verbs such as GET, POST, PUT and DELETE. Data requests and responses can be in XML or JSON format.
REST resources are simply the entities or identities that are exposed to the developer. REST defines the identity of the resource via the URI (uniform resource identifier). Each resource has a unique URL address and any interaction with a resource takes place at its URI. The following resources are supported in CE 188.8.131.52.
- Products: Allows you to retrieve the list of products, create a simple product, and update or delete a product.
- Product Categories: Allows you to retrieve the list of categories assigned to a product and assign or unassign a category to a product.
- Product Websites: Allows you to retrieve the list of websites assigned to a product and assign or unassign a website to a product
- Customers: Allows you to retrieve the list of customers and create, update, or delete a customer.
- Customer Addresses: Allows you to retrieve the list of customer addresses, and create, update, or delete an address.
- Inventory: Allows you to retrieve the list of stock items and update a stock item.
- Sales Orders: Allows you to retrieve the list of sales orders and specific order information.
- Sales Order Items: Allows you to retrieve the items for a specific order.
- Sales Order Addresses: Allows you to retrieve billing and shipping addresses for an order.
- Sales Order Comments: Allows you to retrieve comments for a specific order.
Preparing to Use REST API with Magento
From the Magento store admin panel:
- Set up permissions to operate with resources for the three different user types: admin, customer, and guest. The admin is the backend logged-in user, the customer is the frontend logged-in user, and the guest is a non-logged-in frontend user.
- Configure which attributes will be allowed to retrieve or update for the different user types
- Register the third-party application (setting up consumer) and provide the information to the third-party application.
For a more detailed explanation with sample data, check out magento's wiki page. As always, we welcome your feedback and are eager to help with any issues you may encounter. Please use magento's bug tracker and choose the Webservices API from the Category selection.