10 min reading time

REST API with Magento 2

On October the second I was at the second Yireo Magento 2 Seminar at Utrecht (Netherlands). There was a short talk about "APIs in Magento 2" presented by Andra Lungu, Magento developer at BitBull_IT.

At this moment we are building a very big Magento 2 shop for one of our customers. For this project we have to integrate with several external systems/platforms. For example: we must send order information to their CRM at regular basis during the order flow. To create a PDF of the order / invoice, we need the relationnumber of the customer to print in the header of the document. Because the relationnumber isn't stored in Magento we must set up a REST API to retrieve this number from CRM.

I will give you a general overview how to build your own web API with Magento 2 based on code examples.