I am a beginner to Magento. I am trying to extend the current API classes in Magento to fulfill my requirements and retrieve data in JSON format. I need:
Any blog/Forum topic? Any kind of help?
Thanks in advance.
The Magento REST API defines a set of functions that a developer can use to perform requests and receive responses. These interactions are performed using the HTTP protocol. The caller issues an HTTP request, which contains the following elements: An HTTP header that provides authentication and other instructions.
Magento uses Swagger to display REST APIs for all installed products and allows you to try out the APIs.
Please refer to this Magento wiki page http://www.magentocommerce.com/wiki/doc/webservices-api/custom-api#creating_custom_adapter_for_api.
Steps:
You need to create a new API Server Adapter that should implement Mage_Api_Model_Server_Adapter_Interface
.
Create a controller that will run your api server adapter
Implement Mage_Api_Model_Server_Adapter_Interface::run()
method for process JSON request and return result in JSON. See Mage_Api_Model_Server_Handler_Abstract
for understanding Magento API workflow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With