magentooauthwebhooksmagento-rest-apimagento-soap-api

Magento external access


I have a Shopify App and am willing to port it to Magento. Given a running Magento ecommerce URL, is there a way to:


Solution

  • Retrieve a [token / OAuth] to access the data from Magento using a RESTFul / SOAP / Whatever way?

    Yes. The REST API in Magento uses an OAuth authentication process and provides the endpoints required to get tokens, etc.

    Using Magento exposed API, register an external URL as a webhook endpoint to receive notifications whenever an Order gets created or when a Product gets created / updated / destroyed?

    No. Magento incorporates event driven architecture (EDA), so the best way to provide data to your external endpoint would be to create an observer in Magento, connect it to whichever event you want to monitor (for example, sales_order_place_after for new orders) and use the observer to send the data to your external endpoint.

    Technically what you asked is possible, but you would need to implement it yourself using a custom made API endpoint that registers new observers following the observer pattern mentioned above.

    If both things are possible, how do you take care of all those different Magento versions?

    I'm not sure I understand this question, but when you start using Magento you will choose a version to use. Obviously you should choose the latest version of either Magento 1 or 2 to use since it will be the most secure and up-to-date in terms of functionality and security patches, however the main question for you is whether you want to use Magento 1 or Magento 2. There are plenty of comparisons online about this, but I'd suggest you go with Magento 2 purely because Magento 1 will be deprecated in a couple of years time.