Hello Everyone,
In this blog, we will learn how to install a Wishlist API extension in Magento 2.
The Wishlist API for Magento 2 developed by Magecurious provides a set of endpoints that enable administrators to interact with user wishlists. This includes functionalities such as adding, deleting, and viewing wishlists.
Don’t waste your time, let us guide you straight away. Follow the easy steps below to install and configure a Wishlist API extension.
Why Magecurious Wishlist API?
- Enable or disable it from Magento admin.
- Support Standard REST API for Wishlist operations.
- Easy to add and delete items from the Wishlist.
- Capable of viewing all products from the User’s wishlist.
- Optimised for mobile applications and business management in Magento 2.
Steps to Install Wishlist API in Magento 2.
STEP 1: Extract the downloaded extension package from your Magento root folder using FTP (File Transfer Protocol) Tools. For verification of the root folder, you can see some folders inside the Magento root folder like app, bin, lib, PHP server vendors, etc.
STEP 2: Next Need to run some Magento commands to install the extension in your system, so connect with your server via SSH, go to the Magento root folder (e.g: cd /var/www/html/magentp243), and run the below commands one by one.
- php bin/magento setup: upgrade
- php bin/magento setup:static-content:deploy-f
- php bin/magento indexer: reindex
- php bin/magento cache: clean
- php bin/magento cache: flush
- chmod-R 777 var/ pub/ generated/
STEP 3: If all your commands run successfully, then log in to your system Admin Panel and go to Store > Configuration, if you see a new Tab on the left sidebar with the MageCurious Logo it means the extension was installed successfully.
Steps for connecting wishlist API with Magento 2.
STEP 1:- To Configure Extensions, go to Stores > Settings > Configuration > MageCurious Tab > Wishlist API.
STEP 2:- Wishlist API Configuration:
Enable Wishlist Extension: Enable or Disable Module.
An API call with Swagger Tool
- Open your Swagger in a web browser.
- Look for the “Authorize” button on the Swagger UI. Click on it.
- You will see a dialogue where you can input the necessary authorization details (e.g., API key(token)).
- Open Postman and create a new request for the same endpoint.
- In Postman, input the required parameters for authentication as specified in Swagger.
- Sent the request.
- Once the request is successful, you can find the generated authorization token in the response.
1. Add Wishlist Item:
- Endpoint: /V1/Magecurious/AddWishlist/
- Method: POST
- Description: Allows This API To add items to the user’s wishlist.
- Request Parameters: Customer ID, Product ID, Store ID
2. Delete Wishlist Item:
- Endpoint: /V1/Magecurious/WishlistRemove
- Method: GET
- Description: Enables admins to remove items from a user’s wishlist.
- Request Parameters: Customer ID, Item ID (Product ID)
3. View Wishlist:
- Endpoint: /V1/Magecurious/Wishlist
- Method: GET
- Description: Retrieves the wishlist of a specific user.
- Request Parameters: User ID
Final Thought
This is the easiest way we can tell you in this blog. Here’s how you can install the Wishlist API in Magento 2. Hope you liked the blog.
So quickly go to the comment box and tell me how you like this blog.
Stay tuned to our site to get new updates on Magento.
Thanks for reading and visiting our site.
