Guide for API Integration to Third-Party Applications in Magento 2

apicurlintegrationmagento2rest

The important questions i would like to know are:

  • Can I call a CURL from inside a Model or ResourceModel?
  • Is there any standardized way to handle API's to third party apps?

Please keep in mind that, i already know about third party to Magento REST/SOAP API, what i want to know about is Magento 2 to third party APIs

Best Answer

Of course you can call to external API from inside Magento 2. Just use \Magento\Framework\HTTP\ZendClient inside your class.

Read more here.

I have a sample project here in my Github

Related Topic