Get Products
curl --request GET \
--url http://staging.qshop.ng/apiv2/shops/{shopId}/productsimport requests
url = "http://staging.qshop.ng/apiv2/shops/{shopId}/products"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://staging.qshop.ng/apiv2/shops/{shopId}/products', 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",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/shops/{shopId}/products")
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": {
"data": [
{
"reviews": {
"rates": {
"1": 123,
"2": 123,
"3": 123,
"4": 123,
"5": 123
},
"count": 123,
"average": 123
},
"_id": "<string>",
"tags": [
"<string>"
],
"additional_media": [
{
"media_type": "<string>",
"media": "<string>",
"_id": "<string>",
"uuid": "<string>"
}
],
"attributes": [
{
"name": {
"name": "<string>",
"_id": "<string>"
},
"options": [
{
"name": "<string>",
"label": "<string>",
"id": "<string>"
}
]
}
],
"variants": [
{
"_id": "<string>",
"price": 123,
"sale_price": 123,
"costPrice": 123,
"stock": 123,
"alwaysInStock": true,
"isActive": true,
"sku": "<string>",
"options": [
{
"label": "<string>",
"name": "<string>",
"id": "<string>"
}
],
"weight": {
"base": {
"unit": "<string>",
"value": 123
},
"unit": "<string>",
"value": 123
},
"media": "<string>",
"media_type": "<string>",
"dimension": {
"unit": "<string>",
"length": 123,
"width": 123,
"height": 123
}
}
],
"stock": 123,
"digital": true,
"media": "<string>",
"media_type": "<string>",
"name": "<string>",
"description": "<string>",
"price": 123,
"shop": "<string>",
"created": "<string>",
"sale_price": 123,
"archived": true,
"__v": 123,
"draft": true,
"numberOfPurchase": 123,
"onSale": true,
"slug": "<string>",
"type": "<string>",
"alwaysInStock": true,
"brand": "<string>",
"categories": "<array>",
"costPrice": 123,
"dimension": {
"unit": "<string>",
"length": 123,
"width": 123,
"height": 123
},
"isHero": true,
"modified": "<string>",
"sku": "<string>",
"typeAttributes": {
"packaging": {
"weight": 123,
"length": 123,
"width": 123,
"height": 123
}
},
"weight": {
"base": {
"unit": "<string>",
"value": 123
},
"unit": "<string>",
"value": 123
},
"variantsInheritPrice": true,
"setAttributesForVariants": true
}
],
"next": 123,
"prev": null,
"noOfPages": 123,
"currentPage": 123,
"totalRecord": 123
},
"success": true
}Products
Get Products
Host: http://qshop.ng
GET
/
shops
/
{shopId}
/
products
Get Products
curl --request GET \
--url http://staging.qshop.ng/apiv2/shops/{shopId}/productsimport requests
url = "http://staging.qshop.ng/apiv2/shops/{shopId}/products"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://staging.qshop.ng/apiv2/shops/{shopId}/products', 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",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/shops/{shopId}/products")
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": {
"data": [
{
"reviews": {
"rates": {
"1": 123,
"2": 123,
"3": 123,
"4": 123,
"5": 123
},
"count": 123,
"average": 123
},
"_id": "<string>",
"tags": [
"<string>"
],
"additional_media": [
{
"media_type": "<string>",
"media": "<string>",
"_id": "<string>",
"uuid": "<string>"
}
],
"attributes": [
{
"name": {
"name": "<string>",
"_id": "<string>"
},
"options": [
{
"name": "<string>",
"label": "<string>",
"id": "<string>"
}
]
}
],
"variants": [
{
"_id": "<string>",
"price": 123,
"sale_price": 123,
"costPrice": 123,
"stock": 123,
"alwaysInStock": true,
"isActive": true,
"sku": "<string>",
"options": [
{
"label": "<string>",
"name": "<string>",
"id": "<string>"
}
],
"weight": {
"base": {
"unit": "<string>",
"value": 123
},
"unit": "<string>",
"value": 123
},
"media": "<string>",
"media_type": "<string>",
"dimension": {
"unit": "<string>",
"length": 123,
"width": 123,
"height": 123
}
}
],
"stock": 123,
"digital": true,
"media": "<string>",
"media_type": "<string>",
"name": "<string>",
"description": "<string>",
"price": 123,
"shop": "<string>",
"created": "<string>",
"sale_price": 123,
"archived": true,
"__v": 123,
"draft": true,
"numberOfPurchase": 123,
"onSale": true,
"slug": "<string>",
"type": "<string>",
"alwaysInStock": true,
"brand": "<string>",
"categories": "<array>",
"costPrice": 123,
"dimension": {
"unit": "<string>",
"length": 123,
"width": 123,
"height": 123
},
"isHero": true,
"modified": "<string>",
"sku": "<string>",
"typeAttributes": {
"packaging": {
"weight": 123,
"length": 123,
"width": 123,
"height": 123
}
},
"weight": {
"base": {
"unit": "<string>",
"value": 123
},
"unit": "<string>",
"value": 123
},
"variantsInheritPrice": true,
"setAttributesForVariants": true
}
],
"next": 123,
"prev": null,
"noOfPages": 123,
"currentPage": 123,
"totalRecord": 123
},
"success": true
}Was this page helpful?
⌘I