A plugin for Medusa that enables product reviews in your e-commerce store.
- Customers can leave reviews on products
- Admins can moderate, approve, or delete reviews
- Ratings and comments support
- Aggregate product ratings
- Fully customizable through the Medusa admin panel
npm install medusa-plugin-reviews
const plugins = [
// ...other plugins
{
resolve: "medusa-plugin-reviews",
options: {},
},
];
Customers can submit reviews via the storefront or API.
Admins can manage reviews in the Medusa admin dashboard.
Submit a review.
{
"product_id": "prod_123",
"variant_id": "variant_123",
"rating": 4,
"comment": "Good quality",
"name": "Ali"
}
200 OK
{
"review": {
"id": "rev_456",
"product_id": "prod_123",
"rating": 4,
"comment": "Good quality",
"name": "Ali",
"approved": false,
"created_at": "2025-06-16T12:30:00.000Z"
}
}
400 Bad Request
{
"message": "Missing required fields"
}
Retrieve reviews for a specific product.
-
product_id
(string, optional): Filter reviews by Product ID. -
variant_id
(string, optional): Filter reviews by Variant ID.
200 OK
{
"reviews": [
{
"id": "rev_123",
"product_id": "prod_123",
"variant_id": "variant_123",
"rating": 5,
"comment": "Awesome product!",
"name": "Ali",
"approved": true,
"created_at": "2025-06-16T12:00:00.000Z"
}
],
"count": 1
}
404 Not Found
{
"message": "No reviews found for the provided criteria"
}
500 Internal Server Error
{
"message": "An error occurred while fetching reviews"
}
Get all reviews, optionally filtered by product or approval status.
-
product_id
(string, optional) -
variant_id
(string, optional) -
approved
(boolean, optional)
200 OK
{
"reviews": [
{
"id": "rev_123",
"product_id": "prod_123",
"variant_id": "variant_456",
"rating": 5,
"comment": "Great!",
"name": "Ali",
"approved": false,
"created_at": "2025-06-16T10:00:00.000Z"
}
],
"count": 1
}
500 Internal Server Error
{
"message": "An error occurred while fetching reviews"
}
Manually create a review (usually for admin input/testing).
{
"product_id": "prod_123",
"variant_id": "variant_123",
"rating": 5,
"comment": "Admin feedback",
"name": "Admin"
}
200 OK
{
"review": {
"id": "rev_789",
"product_id": "prod_123",
"rating": 5,
"comment": "Admin feedback",
"name": "Admin",
"approved": false,
"created_at": "2025-06-16T14:00:00.000Z"
}
}
500 Internal Server Error
{
"message": "An error occurred while creating the review"
}
Approve a pending review by ID.
{
"review_id": "rev_789"
}
200 OK
{
"message": "Review approved"
}
404 Not Found
{
"message": "Review not found"
}
500 Internal Server Error
{
"message": "An error occurred while approving the review"
}
You can configure the plugin options in medusa-config.js
as needed.
Example configuration:
{
resolve: "@decorotika/medusa-plugin-product-reviews",
options: {
// your options here
}
}
To add the review approval UI into your Medusa Admin panel:
medusa-admin/src/extensions/medusa-plugin-product-reviews.ts
import routes from "@decorotika/medusa-plugin-product-reviews/admin";
export default routes;
medusa-admin/src/extensions/index.ts
import productReviewRoutes from "./medusa-plugin-product-reviews";
const extensions = [...productReviewRoutes];
export default extensions;
MIT License. See LICENSE for more details.
💡 Bonus Tip:
Install the plugin via yarn
or npm
:
yarn add @decorotika/medusa-plugin-product-reviews
And configure the backend part in medusa-config.js
as shown above.
If you need any further help or have questions, feel free to ask! 🚀