Reviews
Get product reviews by product ID
GET
/
loyalty
/
cp
/
api
/
product-review-details
/
{productId}
Get product reviews by product ID
curl --request GET \
--url https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}import requests
url = "https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"body": "This product exceeded my expectations in every way.",
"createAt": "2025-01-15T10:30:00Z",
"productId": 12345,
"productImage": "https://cdn.shopify.com/image.jpg",
"productTitle": "Premium Widget",
"publishedStatus": true,
"rating": 5,
"reviewerName": "John Doe",
"title": "Excellent product!"
}
]Path Parameters
ID of the product to get reviews for
Query Parameters
Filter reviews by rating (1-5 stars)
Zero-based page index (0..N)
Required range:
x >= 0The size of the page to be returned
Required range:
x >= 1Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
Response
Product reviews retrieved successfully with pagination headers (X-Total-Count, Link)
⌘I
Get product reviews by product ID
curl --request GET \
--url https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}import requests
url = "https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://loyalty-admin.appstle.com/loyalty/cp/api/product-review-details/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"body": "This product exceeded my expectations in every way.",
"createAt": "2025-01-15T10:30:00Z",
"productId": 12345,
"productImage": "https://cdn.shopify.com/image.jpg",
"productTitle": "Premium Widget",
"publishedStatus": true,
"rating": 5,
"reviewerName": "John Doe",
"title": "Excellent product!"
}
]