Fetch Single Product Reviews
2/7/25Less than 1 minute
Fetch Product Reviews
Description
This API retrieves all reviews for a specific product using the product's unique ID.
Endpoint
- URL:
/v1/reviews/product/{productId}
- Method:
GET
Query Parameters
Parameter | Type | Description |
---|---|---|
status | String | filter reviews by (ACTIVE or HIDDEN ). Default: ACTIVE . |
Required Headers
{
"X-MerchantApiKey": "MERCHANT_API_KEY",
"Content-Type": "application/json"
}
Example API Call (Using Fetch)
fetch("https://api.shopsynch.com/v1/reviews/product/679f8f5a3b5f2173201c2582", {
method: "GET",
headers: {
"X-MerchantApiKey": "MERCHANT_API_KEY",
"Content-Type": "application/json"
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
✅ Sample 200 Response (Success)
{
"status": true,
"message": "Reviews retrieved successfully",
"data": [
{
"id": "abc679f8f5a3b5f2173201c2582123",
"createdDate": "2025-02-08T10:30:00",
"rating": 5,
"comment": "Excellent product! Highly recommended.",
"user": {
"id": "678679f8f5a3b5f2173201c258290",
"name": "John Doe"
}
},
{
"id": "def679f8f5a3b5f2173201c2582456",
"createdDate": "2025-02-07T09:15:00",
"rating": 4,
"comment": "Great value for the price.",
"user": {
"id": "123679f8f5a3b5f2173201c258245",
"name": "Jane Smith"
}
}
]
}
❌ Sample 404 Response (Not Found Error)
{
"status": false,
"message": "Product not found"
}
Next Steps
- Learn more about Adding a Review
- Learn more about Updating a Review