Get product reviews
curl --request GET \
--url http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/import requests
url = "http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/",
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 := "http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"currentPage": 1,
"data": [
{
"__v": 0,
"_id": "63f62da70bf12b7f208998d1",
"comment": "Good product mate",
"created": "2023-02-22T14:58:47.131Z",
"email": "adeyinkabadmus@gmail.com",
"fullName": "Ademi deyinka",
"isApproved": false,
"product": "61a961741a113f7e13c45c3a",
"rate": 2,
"shop": "61a956d91a113f7e13c45c15",
"subject": "I like it",
"updated": "2023-02-22T14:58:47.131Z"
},
{
"__v": 0,
"_id": "63f6164af036a4287d7f91ac",
"comment": "Good product mate",
"created": "2023-02-22T13:19:06.663Z",
"email": "adeyinkabadmus@gmail.com",
"fullName": "Ademi deyinka",
"isApproved": false,
"product": "61a961741a113f7e13c45c3a",
"rate": 2,
"shop": "61a956d91a113f7e13c45c15",
"subject": null,
"updated": "2023-02-22T13:19:06.663Z"
}
],
"next": null,
"noOfPages": 1,
"prev": null,
"totalRecord": 2
},
"msg": "Product reviews found",
"success": true
}Shops - Reviews
Get product reviews
GET
/
{shopId}
/
products
/
{productId}
/
reviews
/
Get product reviews
curl --request GET \
--url http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/import requests
url = "http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/",
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 := "http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/{shopId}/products/{productId}/reviews/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"currentPage": 1,
"data": [
{
"__v": 0,
"_id": "63f62da70bf12b7f208998d1",
"comment": "Good product mate",
"created": "2023-02-22T14:58:47.131Z",
"email": "adeyinkabadmus@gmail.com",
"fullName": "Ademi deyinka",
"isApproved": false,
"product": "61a961741a113f7e13c45c3a",
"rate": 2,
"shop": "61a956d91a113f7e13c45c15",
"subject": "I like it",
"updated": "2023-02-22T14:58:47.131Z"
},
{
"__v": 0,
"_id": "63f6164af036a4287d7f91ac",
"comment": "Good product mate",
"created": "2023-02-22T13:19:06.663Z",
"email": "adeyinkabadmus@gmail.com",
"fullName": "Ademi deyinka",
"isApproved": false,
"product": "61a961741a113f7e13c45c3a",
"rate": 2,
"shop": "61a956d91a113f7e13c45c15",
"subject": null,
"updated": "2023-02-22T13:19:06.663Z"
}
],
"next": null,
"noOfPages": 1,
"prev": null,
"totalRecord": 2
},
"msg": "Product reviews found",
"success": true
}Was this page helpful?
⌘I