Update product bundle
curl --request PATCH \
--url https://api.shoppex.io/dev/v1/products/bundles/{uniqid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"items": [
{
"product_id": "<string>",
"variant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"discount_amount": 123,
"active": true,
"priority": 100,
"max_applications_per_cart": null,
"starts_at": "<string>",
"ends_at": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
items: [{product_id: '<string>', variant_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}],
discount_amount: 123,
active: true,
priority: 100,
max_applications_per_cart: null,
starts_at: '<string>',
ends_at: '<string>'
})
};
fetch('https://api.shoppex.io/dev/v1/products/bundles/{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/bundles/{uniqid}"
payload = {
"title": "<string>",
"items": [
{
"product_id": "<string>",
"variant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"discount_amount": 123,
"active": True,
"priority": 100,
"max_applications_per_cart": None,
"starts_at": "<string>",
"ends_at": "<string>"
}
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/bundles/{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>',
'items' => [
[
'product_id' => '<string>',
'variant_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'discount_amount' => 123,
'active' => true,
'priority' => 100,
'max_applications_per_cart' => null,
'starts_at' => '<string>',
'ends_at' => '<string>'
]),
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/bundles/{uniqid}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"items\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"discount_amount\": 123,\n \"active\": true,\n \"priority\": 100,\n \"max_applications_per_cart\": null,\n \"starts_at\": \"<string>\",\n \"ends_at\": \"<string>\"\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 bundle
Developer API operation for PATCH /dev/v1/products/bundles/.
PATCH
/
dev
/
v1
/
products
/
bundles
/
{uniqid}
Update product bundle
curl --request PATCH \
--url https://api.shoppex.io/dev/v1/products/bundles/{uniqid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"items": [
{
"product_id": "<string>",
"variant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"discount_amount": 123,
"active": true,
"priority": 100,
"max_applications_per_cart": null,
"starts_at": "<string>",
"ends_at": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
items: [{product_id: '<string>', variant_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}],
discount_amount: 123,
active: true,
priority: 100,
max_applications_per_cart: null,
starts_at: '<string>',
ends_at: '<string>'
})
};
fetch('https://api.shoppex.io/dev/v1/products/bundles/{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/bundles/{uniqid}"
payload = {
"title": "<string>",
"items": [
{
"product_id": "<string>",
"variant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"discount_amount": 123,
"active": True,
"priority": 100,
"max_applications_per_cart": None,
"starts_at": "<string>",
"ends_at": "<string>"
}
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/bundles/{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>',
'items' => [
[
'product_id' => '<string>',
'variant_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'discount_amount' => 123,
'active' => true,
'priority' => 100,
'max_applications_per_cart' => null,
'starts_at' => '<string>',
'ends_at' => '<string>'
]),
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/bundles/{uniqid}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"items\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"discount_amount\": 123,\n \"active\": true,\n \"priority\": 100,\n \"max_applications_per_cart\": null,\n \"starts_at\": \"<string>\",\n \"ends_at\": \"<string>\"\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 array length:
2Show child attributes
Show child attributes
Available options:
PERCENTAGE, FIXED Required range:
0 <= x <= 10000Required range:
1 <= x <= 9007199254740991Response
200
Successful response