Get Product by Slug
curl --request GET \
--url http://staging.qshop.ng/apiv2/shops/{shopId}/products/{slug}import requests
url = "http://staging.qshop.ng/apiv2/shops/{shopId}/products/{slug}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://staging.qshop.ng/apiv2/shops/{shopId}/products/{slug}', 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/shops/{shopId}/products/{slug}",
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/shops/{shopId}/products/{slug}"
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/shops/{shopId}/products/{slug}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/shops/{shopId}/products/{slug}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"msg": "<string>",
"data": {
"reviews": {
"rates": {
"1": 123,
"2": 123,
"3": 123,
"4": 123,
"5": 123
},
"count": 123,
"average": 123
},
"categories": "<array>",
"costPrice": null,
"alwaysInStock": true,
"isHero": true,
"setAttributesForVariants": true,
"variantsInheritPrice": true,
"_id": "<string>",
"tags": [
{
"_id": "<string>",
"name": "<string>",
"tempId": "<string>",
"shop": "<string>",
"__v": 123,
"slug": "<string>",
"productCount": 123,
"imageUrl": "<string>"
}
],
"additional_media": "<array>",
"attributes": "<array>",
"variants": "<array>",
"stock": 123,
"digital": true,
"media": "<string>",
"media_type": "<string>",
"name": "<string>",
"price": 123,
"description": "<string>",
"shop": "<string>",
"created": "<string>",
"sale_price": 123,
"archived": true,
"__v": 123,
"draft": true,
"numberOfPurchase": 123,
"onSale": true,
"slug": "<string>",
"type": "<string>"
},
"success": true
}Product
Get Product by Slug
Host: http://qshop.ng
GET
/
shops
/
{shopId}
/
products
/
{slug}
Get Product by Slug
curl --request GET \
--url http://staging.qshop.ng/apiv2/shops/{shopId}/products/{slug}import requests
url = "http://staging.qshop.ng/apiv2/shops/{shopId}/products/{slug}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://staging.qshop.ng/apiv2/shops/{shopId}/products/{slug}', 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/shops/{shopId}/products/{slug}",
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/shops/{shopId}/products/{slug}"
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/shops/{shopId}/products/{slug}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/shops/{shopId}/products/{slug}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"msg": "<string>",
"data": {
"reviews": {
"rates": {
"1": 123,
"2": 123,
"3": 123,
"4": 123,
"5": 123
},
"count": 123,
"average": 123
},
"categories": "<array>",
"costPrice": null,
"alwaysInStock": true,
"isHero": true,
"setAttributesForVariants": true,
"variantsInheritPrice": true,
"_id": "<string>",
"tags": [
{
"_id": "<string>",
"name": "<string>",
"tempId": "<string>",
"shop": "<string>",
"__v": 123,
"slug": "<string>",
"productCount": 123,
"imageUrl": "<string>"
}
],
"additional_media": "<array>",
"attributes": "<array>",
"variants": "<array>",
"stock": 123,
"digital": true,
"media": "<string>",
"media_type": "<string>",
"name": "<string>",
"price": 123,
"description": "<string>",
"shop": "<string>",
"created": "<string>",
"sale_price": 123,
"archived": true,
"__v": 123,
"draft": true,
"numberOfPurchase": 123,
"onSale": true,
"slug": "<string>",
"type": "<string>"
},
"success": true
}Was this page helpful?
⌘I