Product Bundles
Update product bundle
Updates the specified product bundle’s status, discount type, discount percentage, and discount rules. Supports partial updates where only provided fields are modified.
PATCH
/
api
/
v1
/
{team_slug}
/
{app_slug}
/
bundle-groups
/
{bundle_group_id}
/
bundles
/
{bundle_id}
Update product bundle
curl --request PATCH \
--url https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"discount_percentage": 50,
"discounts": [
{
"amount_cents": 1,
"currency_code": "<string>"
}
]
}
'import requests
url = "https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}"
payload = {
"discount_percentage": 50,
"discounts": [
{
"amount_cents": 1,
"currency_code": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
discount_percentage: 50,
discounts: [{amount_cents: 1, currency_code: '<string>'}]
})
};
fetch('https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}', 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 => "https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}",
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([
'discount_percentage' => 50,
'discounts' => [
[
'amount_cents' => 1,
'currency_code' => '<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.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}"
payload := strings.NewReader("{\n \"discount_percentage\": 50,\n \"discounts\": [\n {\n \"amount_cents\": 1,\n \"currency_code\": \"<string>\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.patch("https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"discount_percentage\": 50,\n \"discounts\": [\n {\n \"amount_cents\": 1,\n \"currency_code\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"discount_percentage\": 50,\n \"discounts\": [\n {\n \"amount_cents\": 1,\n \"currency_code\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": [
{
"created_at": "<string>",
"description": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"translatable": true,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"values": {}
}
],
"compliant": {
"info": [
"<string>"
],
"level": "none"
},
"created_at": "<string>",
"discount_percentage": 123,
"discount_type": "<string>",
"discounts": {},
"id": "<string>",
"rules": [
{
"bundle_id": "<string>",
"discount_percentage": 123,
"discount_type": "<string>",
"discounts": {},
"exclude_discounted_price": true,
"exclude_full_price": true,
"id": "<string>",
"items": [
{
"description": "<string>",
"id": "<string>",
"image_urls": [
"<string>"
],
"product_name": "<string>",
"product_number": "<string>",
"slug": "<string>"
}
],
"quantity": 123,
"tag_conditions": {
"brands": {
"mode": "include",
"values": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"categories": {
"mode": "include",
"values": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"collections": {
"mode": "include",
"values": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"series": {
"mode": "include",
"values": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"tags": {
"mode": "include",
"values": [
{
"id": "<string>",
"name": "<string>"
}
]
}
}
}
],
"status": "<string>",
"updated_at": "<string>"
},
"success": true,
"details": [
"<string>"
]
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}Authorizations
Management API token, sent as Authorization: Bearer <token>.
Path Parameters
App slug
Team slug
Product bundle group UUID
Product bundle UUID
Body
application/json
Product bundle update data
Used if discount_type is relative. This will apply to all markets it's added to
Required range:
0 <= x <= 100Available options:
relative, fixed Show child attributes
Show child attributes
Status of the bundle
Available options:
active, draft, inactive ⌘I
Update product bundle
curl --request PATCH \
--url https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"discount_percentage": 50,
"discounts": [
{
"amount_cents": 1,
"currency_code": "<string>"
}
]
}
'import requests
url = "https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}"
payload = {
"discount_percentage": 50,
"discounts": [
{
"amount_cents": 1,
"currency_code": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
discount_percentage: 50,
discounts: [{amount_cents: 1, currency_code: '<string>'}]
})
};
fetch('https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}', 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 => "https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}",
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([
'discount_percentage' => 50,
'discounts' => [
[
'amount_cents' => 1,
'currency_code' => '<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.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}"
payload := strings.NewReader("{\n \"discount_percentage\": 50,\n \"discounts\": [\n {\n \"amount_cents\": 1,\n \"currency_code\": \"<string>\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.patch("https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"discount_percentage\": 50,\n \"discounts\": [\n {\n \"amount_cents\": 1,\n \"currency_code\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v1/{team_slug}/{app_slug}/bundle-groups/{bundle_group_id}/bundles/{bundle_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"discount_percentage\": 50,\n \"discounts\": [\n {\n \"amount_cents\": 1,\n \"currency_code\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": [
{
"created_at": "<string>",
"description": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"translatable": true,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"values": {}
}
],
"compliant": {
"info": [
"<string>"
],
"level": "none"
},
"created_at": "<string>",
"discount_percentage": 123,
"discount_type": "<string>",
"discounts": {},
"id": "<string>",
"rules": [
{
"bundle_id": "<string>",
"discount_percentage": 123,
"discount_type": "<string>",
"discounts": {},
"exclude_discounted_price": true,
"exclude_full_price": true,
"id": "<string>",
"items": [
{
"description": "<string>",
"id": "<string>",
"image_urls": [
"<string>"
],
"product_name": "<string>",
"product_number": "<string>",
"slug": "<string>"
}
],
"quantity": 123,
"tag_conditions": {
"brands": {
"mode": "include",
"values": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"categories": {
"mode": "include",
"values": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"collections": {
"mode": "include",
"values": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"series": {
"mode": "include",
"values": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"tags": {
"mode": "include",
"values": [
{
"id": "<string>",
"name": "<string>"
}
]
}
}
}
],
"status": "<string>",
"updated_at": "<string>"
},
"success": true,
"details": [
"<string>"
]
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}