Magento Expert Forum - Improve your Magento experience

Results 1 to 4 of 4

How to Create Custom REST API in Magento 2?

  1. #1
    Junior Member
    Join Date
    Jun 2016
    Location
    Bhavnagar, Gujarat, India
    Posts
    343
    Thanks
    0
    Thanked 1 Time in 1 Post

    Post How to Create Custom REST API in Magento 2?

    Name:  How to Create Custom REST API in Magento 2.png
Views: 85
Size:  20.0 KB

    Today to build a powerful Ecommerce store apart from choosing the right CMS, you also have to integrate and connect some third-party services like payment gateways and delivery partners. However, Magento comes with an interface that lets third-party applications read and write to a system using programming language constructs or statements. And, Magento supports and provides REST and SOAP. You can also create a dynamic REST API documentation set on your server with live data. By default, Magento uses Swagger to display REST APIs for all installed products and allows you to try out the APIs.

    Many times it happens that you have to create your custom Rest API in your module to perform some action based on response. You still can use default API features Product API, Order API, Customer data API, etc. These all the APIs have multiple methods like GET, PUT, POST, etc. But if you want to create custom response apart from this you have no option left except creating custom API. So let’s learn how you can create your custom API in Magento 2.

    But before we start first we need to generate Access Token for accessing Magento. To generate access token inside for your Magento 2 store simply navigate to System -> Extensions -> Integrations and generate it.
    Now, we have to create a custom module by following the below steps.
    Firstly, we need to create a “registration.php” file inside our extension folder on this path.

    for more visit this: https://magecomp.com/blog/create-cus...-in-magento-2/

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Nov 2019
    Posts
    76
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    Great tips! Keep sharing such useful content.

  3. #3
    Junior Member kajal's Avatar
    Join Date
    Sep 2014
    Location
    Bangalore
    Posts
    1,249
    Thanks
    0
    Thanked 15 Times in 15 Posts

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •