Hello Magento Friends,

Welcome to MageComp’s “How To” Magento Blog series. Today we will find out, How to Get Quote Details with Custom Extension Attributes value using REST API In Magento 2.

When the customer sends a quote for any product, it is essential for Magento 2 store owners to get quote information. Handle quote requests smoothly by including Email Quote Pro Extension for Magento 2. REST API is used to fetch data. Hence, you can use REST API to get quote details. Previously we have discussed How to Get Quote Information using REST API in Magento 2.

But if we have used custom extension attributes, default Magento does not return its value. To get quote Details with Custom Extension Attributes value using REST API in Magento 2, use the below steps.

Steps to Get Quote Details with Custom Extension Attributes value using REST API In Magento 2:

Step 1: Firstly, go to the below path

app\code\Vendor\Extension\etc\extension_attributes.xml

And add the code as follows:

Step 2: Now go to the below path 

app\code\Vendor\Extension\etc\di.xml

And add the code as given below:

Step 3: Then, move to the below path

app\code\Vendor\Extension\Plugin\Cartrepositoryplugin.php

And add the code as below:

Step 4: Lastly, create getquotedetails.php in the Magento root directory and add the below code:

After that run URL as below:

https://yourdomain/getquotedetails.php

Conclusion:

Hence, with the help of the above steps, you can easily Get Quote Details with Custom Extension Attributes value using REST API In Magento 2. If you face any problem with the above code, let me know in the comment and I will help you out. Do share the article with your friends. Stay updated for more such Magento solutions.

Happy Coding!

[Total: 2   Average: 5/5]