Remove Discount from Cart
curl --request DELETE \
--url http://staging.qshop.ng/apiv2/shops/{shopId}/applydiscount/cart/{cartId}import requests
url = "http://staging.qshop.ng/apiv2/shops/{shopId}/applydiscount/cart/{cartId}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('http://staging.qshop.ng/apiv2/shops/{shopId}/applydiscount/cart/{cartId}', 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}/applydiscount/cart/{cartId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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}/applydiscount/cart/{cartId}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("http://staging.qshop.ng/apiv2/shops/{shopId}/applydiscount/cart/{cartId}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/shops/{shopId}/applydiscount/cart/{cartId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"msg": "<string>",
"data": {
"entityId": "<string>",
"shop": "<string>",
"email": null,
"items": [
{
"setAttributesForVariants": true,
"_id": "<string>",
"name": "<string>",
"shop": "<string>",
"tags": [
{
"_id": "<string>",
"name": "<string>",
"tempId": "<string>",
"shop": "<string>",
"__v": 123,
"slug": "<string>",
"productCount": 123,
"imageUrl": "<string>"
}
],
"costPrice": 123,
"price": 123,
"sku": "<string>",
"sale_price": 123,
"stock": 123,
"alwaysInStock": true,
"media": "<string>",
"media_type": "<string>",
"digital": true,
"draft": true,
"type": "<string>",
"variantsInheritPrice": true,
"slug": "<string>",
"__v": 123,
"qty": 123,
"originalPrice": 123,
"finalPrice": 123,
"subTotal": 123,
"downloadCount": 123,
"downloadLimit": null,
"cartItemId": "<string>"
}
],
"subTotal": 123,
"total": 123,
"created": "<string>",
"_id": "<string>",
"discountsApplied": "<array>",
"discountAmount": 123,
"shipping": 123,
"shippingRate": {},
"user": "<string>",
"exclusiveDiscount": true,
"order": null
},
"success": true
}Cart
Remove Discount from Cart
Host: http://qshop.ng
DELETE
/
shops
/
{shopId}
/
applydiscount
/
cart
/
{cartId}
Remove Discount from Cart
curl --request DELETE \
--url http://staging.qshop.ng/apiv2/shops/{shopId}/applydiscount/cart/{cartId}import requests
url = "http://staging.qshop.ng/apiv2/shops/{shopId}/applydiscount/cart/{cartId}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('http://staging.qshop.ng/apiv2/shops/{shopId}/applydiscount/cart/{cartId}', 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}/applydiscount/cart/{cartId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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}/applydiscount/cart/{cartId}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("http://staging.qshop.ng/apiv2/shops/{shopId}/applydiscount/cart/{cartId}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/shops/{shopId}/applydiscount/cart/{cartId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"msg": "<string>",
"data": {
"entityId": "<string>",
"shop": "<string>",
"email": null,
"items": [
{
"setAttributesForVariants": true,
"_id": "<string>",
"name": "<string>",
"shop": "<string>",
"tags": [
{
"_id": "<string>",
"name": "<string>",
"tempId": "<string>",
"shop": "<string>",
"__v": 123,
"slug": "<string>",
"productCount": 123,
"imageUrl": "<string>"
}
],
"costPrice": 123,
"price": 123,
"sku": "<string>",
"sale_price": 123,
"stock": 123,
"alwaysInStock": true,
"media": "<string>",
"media_type": "<string>",
"digital": true,
"draft": true,
"type": "<string>",
"variantsInheritPrice": true,
"slug": "<string>",
"__v": 123,
"qty": 123,
"originalPrice": 123,
"finalPrice": 123,
"subTotal": 123,
"downloadCount": 123,
"downloadLimit": null,
"cartItemId": "<string>"
}
],
"subTotal": 123,
"total": 123,
"created": "<string>",
"_id": "<string>",
"discountsApplied": "<array>",
"discountAmount": 123,
"shipping": 123,
"shippingRate": {},
"user": "<string>",
"exclusiveDiscount": true,
"order": null
},
"success": true
}Was this page helpful?
⌘I