Update product quantity deal
curl --request PATCH \
--url https://api.shoppex.io/dev/v1/products/quantity-deals/{uniqid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"product_id": "<string>",
"required_quantity": 4503599627370496,
"discounted_quantity": 4503599627370496,
"discount_value": 0,
"max_applications_per_cart": 4503599627370496,
"priority": 100,
"active": true,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
product_id: '<string>',
required_quantity: 4503599627370496,
discounted_quantity: 4503599627370496,
discount_value: 0,
max_applications_per_cart: 4503599627370496,
priority: 100,
active: true,
starts_at: '2023-11-07T05:31:56Z',
ends_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.shoppex.io/dev/v1/products/quantity-deals/{uniqid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/products/quantity-deals/{uniqid}"
payload = {
"title": "<string>",
"product_id": "<string>",
"required_quantity": 4503599627370496,
"discounted_quantity": 4503599627370496,
"discount_value": 0,
"max_applications_per_cart": 4503599627370496,
"priority": 100,
"active": True,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/products/quantity-deals/{uniqid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'product_id' => '<string>',
'required_quantity' => 4503599627370496,
'discounted_quantity' => 4503599627370496,
'discount_value' => 0,
'max_applications_per_cart' => 4503599627370496,
'priority' => 100,
'active' => true,
'starts_at' => '2023-11-07T05:31:56Z',
'ends_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/products/quantity-deals/{uniqid}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"product_id\": \"<string>\",\n \"required_quantity\": 4503599627370496,\n \"discounted_quantity\": 4503599627370496,\n \"discount_value\": 0,\n \"max_applications_per_cart\": 4503599627370496,\n \"priority\": 100,\n \"active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Products
Update product quantity deal
Developer API operation for PATCH /dev/v1/products/quantity-deals/.
PATCH
/
dev
/
v1
/
products
/
quantity-deals
/
{uniqid}
Update product quantity deal
curl --request PATCH \
--url https://api.shoppex.io/dev/v1/products/quantity-deals/{uniqid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"product_id": "<string>",
"required_quantity": 4503599627370496,
"discounted_quantity": 4503599627370496,
"discount_value": 0,
"max_applications_per_cart": 4503599627370496,
"priority": 100,
"active": true,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
product_id: '<string>',
required_quantity: 4503599627370496,
discounted_quantity: 4503599627370496,
discount_value: 0,
max_applications_per_cart: 4503599627370496,
priority: 100,
active: true,
starts_at: '2023-11-07T05:31:56Z',
ends_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.shoppex.io/dev/v1/products/quantity-deals/{uniqid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/products/quantity-deals/{uniqid}"
payload = {
"title": "<string>",
"product_id": "<string>",
"required_quantity": 4503599627370496,
"discounted_quantity": 4503599627370496,
"discount_value": 0,
"max_applications_per_cart": 4503599627370496,
"priority": 100,
"active": True,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/products/quantity-deals/{uniqid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'product_id' => '<string>',
'required_quantity' => 4503599627370496,
'discounted_quantity' => 4503599627370496,
'discount_value' => 0,
'max_applications_per_cart' => 4503599627370496,
'priority' => 100,
'active' => true,
'starts_at' => '2023-11-07T05:31:56Z',
'ends_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/products/quantity-deals/{uniqid}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"product_id\": \"<string>\",\n \"required_quantity\": 4503599627370496,\n \"discounted_quantity\": 4503599627370496,\n \"discount_value\": 0,\n \"max_applications_per_cart\": 4503599627370496,\n \"priority\": 100,\n \"active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Authorizations
Use your Shoppex API key in the Authorization header.
Path Parameters
Body
application/json
Required string length:
1 - 120Minimum string length:
1Required range:
1 <= x <= 9007199254740991Required range:
1 <= x <= 9007199254740991Available options:
PERCENTAGE, FREE Required range:
0 <= x <= 100Required range:
1 <= x <= 9007199254740991Required range:
0 <= x <= 10000Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Response
200
Successful response