Update
curl --request PATCH \
--url https://{defaultHost}/v1/bundle_items/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bundle_item": {
"quantity": 2
}
}
'import requests
url = "https://{defaultHost}/v1/bundle_items/{id}"
payload = { "bundle_item": { "quantity": 2 } }
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({bundle_item: {quantity: 2}})
};
fetch('https://{defaultHost}/v1/bundle_items/{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://{defaultHost}/v1/bundle_items/{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([
'bundle_item' => [
'quantity' => 2
]
]),
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://{defaultHost}/v1/bundle_items/{id}"
payload := strings.NewReader("{\n \"bundle_item\": {\n \"quantity\": 2\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://{defaultHost}/v1/bundle_items/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bundle_item\": {\n \"quantity\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/bundle_items/{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 \"bundle_item\": {\n \"quantity\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "6b050461-d938-42ce-bcec-834320b38b54",
"object": "bundle_item",
"basis_amount": null,
"quantity": 2,
"current_version": true,
"metadata": {},
"position": 0,
"bundle_product": "43539d65-9ddb-4720-a439-c71d6f3c540a",
"component_product": "bb0f4e13-428b-4d02-9d96-c8c0fb44a4e4",
"created_at": 1794901744,
"updated_at": 1794901744
}Bundle Items
Update
Updates a specific bundle item.
PATCH
/
v1
/
bundle_items
/
{id}
Update
curl --request PATCH \
--url https://{defaultHost}/v1/bundle_items/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bundle_item": {
"quantity": 2
}
}
'import requests
url = "https://{defaultHost}/v1/bundle_items/{id}"
payload = { "bundle_item": { "quantity": 2 } }
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({bundle_item: {quantity: 2}})
};
fetch('https://{defaultHost}/v1/bundle_items/{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://{defaultHost}/v1/bundle_items/{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([
'bundle_item' => [
'quantity' => 2
]
]),
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://{defaultHost}/v1/bundle_items/{id}"
payload := strings.NewReader("{\n \"bundle_item\": {\n \"quantity\": 2\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://{defaultHost}/v1/bundle_items/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bundle_item\": {\n \"quantity\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/bundle_items/{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 \"bundle_item\": {\n \"quantity\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "6b050461-d938-42ce-bcec-834320b38b54",
"object": "bundle_item",
"basis_amount": null,
"quantity": 2,
"current_version": true,
"metadata": {},
"position": 0,
"bundle_product": "43539d65-9ddb-4720-a439-c71d6f3c540a",
"component_product": "bb0f4e13-428b-4d02-9d96-c8c0fb44a4e4",
"created_at": 1794901744,
"updated_at": 1794901744
}Authorizations
Response
200 - application/json
Success
Expandable – The associated bundle product ID.
Expandable – The associated component product ID.
Expandable – Property not returned unless expanded.
Expandable – Property not returned unless expanded.
Was this page helpful?