Get Store Coupons
curl --request GET \
--url http://staging.qshop.ng/apiv2/shops/{shopId}/coupons/publicimport requests
url = "http://staging.qshop.ng/apiv2/shops/{shopId}/coupons/public"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://staging.qshop.ng/apiv2/shops/{shopId}/coupons/public', 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}/coupons/public",
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}/coupons/public"
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}/coupons/public")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/shops/{shopId}/coupons/public")
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": [
{
"usageRestriction": {
"roles": {
"exclude": "<array>",
"accept": "<array>"
},
"users": {
"condition": "<string>",
"contains": "<array>"
},
"tags": {
"condition": "<string>",
"contains": "<array>"
},
"products": {
"condition": "<string>",
"contains": "<array>"
},
"categories": {
"condition": "<string>",
"contains": "<array>"
}
},
"usageLimit": {
"useIfNumberOfOrders": {
"count": null
},
"maxNumberOfUses": 123,
"canUseWithOtherCoupons": true,
"maxNumberOfUsesPerUser": null
},
"_id": "<string>",
"shop": "<string>",
"code_type": "<string>",
"amount": 123,
"min_order": null,
"max_order": null,
"starts": "<string>",
"expires": null,
"code": "<string>",
"description": "<string>",
"usageCount": 123,
"applyOn": "<string>",
"applyAutomatically": true,
"created": "<string>",
"isActive": true,
"uuid": "<string>",
"mediaType": "<string>",
"url": "<string>",
"isPublic": true,
"__v": 123
}
],
"next": null,
"prev": null,
"noOfPages": 123,
"currentPage": 123,
"totalRecord": 123
},
"success": true
}Coupons
Get Store Coupons
Host: http://qshop.ng
GET
/
shops
/
{shopId}
/
coupons
/
public
Get Store Coupons
curl --request GET \
--url http://staging.qshop.ng/apiv2/shops/{shopId}/coupons/publicimport requests
url = "http://staging.qshop.ng/apiv2/shops/{shopId}/coupons/public"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://staging.qshop.ng/apiv2/shops/{shopId}/coupons/public', 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}/coupons/public",
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}/coupons/public"
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}/coupons/public")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/shops/{shopId}/coupons/public")
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": [
{
"usageRestriction": {
"roles": {
"exclude": "<array>",
"accept": "<array>"
},
"users": {
"condition": "<string>",
"contains": "<array>"
},
"tags": {
"condition": "<string>",
"contains": "<array>"
},
"products": {
"condition": "<string>",
"contains": "<array>"
},
"categories": {
"condition": "<string>",
"contains": "<array>"
}
},
"usageLimit": {
"useIfNumberOfOrders": {
"count": null
},
"maxNumberOfUses": 123,
"canUseWithOtherCoupons": true,
"maxNumberOfUsesPerUser": null
},
"_id": "<string>",
"shop": "<string>",
"code_type": "<string>",
"amount": 123,
"min_order": null,
"max_order": null,
"starts": "<string>",
"expires": null,
"code": "<string>",
"description": "<string>",
"usageCount": 123,
"applyOn": "<string>",
"applyAutomatically": true,
"created": "<string>",
"isActive": true,
"uuid": "<string>",
"mediaType": "<string>",
"url": "<string>",
"isPublic": true,
"__v": 123
}
],
"next": null,
"prev": null,
"noOfPages": 123,
"currentPage": 123,
"totalRecord": 123
},
"success": true
}Was this page helpful?
⌘I