This API server provides endpoints for managing and displaying product reviews on your Shopify store. Use it to fetch, submit, and moderate customer reviews, enhancing your store's credibility and customer engagement.
https://shopify-review-api.vercel.app/api/reviews?productId=<product-id>
const createReviews = async () => {
try {
const res = await fetch('https://shopify-review-api.vercel.app/api/reviews?productId=1234', {
method: 'POST',
headers: {
'Content-Type': 'application-json',
'x-api-secret': '832a239e-6909-4b10-bcf5-a69f44edaa89'
}
})
const data = await res.json()
// here data are used
} catch (err) {
console.log(err)
}
}
https://shopify-review-api.vercel.app/api/reviews?shopId=<shop-id>
https://shopify-review-api.vercel.app/api/reviews?shopId=1234
https://shopify-review-api.vercel.app/api/reviews?productId=<product-id>
{"x-api-secret": "832a239e-6909-4b10-bcf5-a69f44edaa89"}
{"productId": "10", "customerName": "Arif Islam", "rating": 4.3, "comment": "Nice Pc!" }
const createReviews = async () => {
try {
const res = await fetch('https://shopify-review-api.vercel.app/api/reviews?productId=1234', {
method: 'POST',
headers: {
'Content-Type': 'application-json',
'x-api-secret': '832a239e-6909-4b10-bcf5-a69f44edaa89'
},
body: JSON.stringify({
{
"productId": "12",
"shopName": "Saad Store",
"shopId": "13",
"customerName": "Dennis",
"rating": 4.6,
"title": "Good product",
"comment": "Heavy"
}
})
})
const data = await res.json()
} catch (err) {
console.log(err)
}
}