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": "f267e2e5-f8d9-4fec-ab85-728f838a7202",
"object": "bundle_item",
"basis_amount": null,
"quantity": 2,
"current_version": true,
"metadata": {},
"position": 0,
"bundle_product": "9fa42e27-902b-4e5e-be33-0e1cb14be648",
"component_product": "ab2668e1-3b11-4543-9631-50ab515bbafd",
"created_at": 1787228347,
"updated_at": 1787228347
}Update
Updates a specific bundle item.
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": "f267e2e5-f8d9-4fec-ab85-728f838a7202",
"object": "bundle_item",
"basis_amount": null,
"quantity": 2,
"current_version": true,
"metadata": {},
"position": 0,
"bundle_product": "9fa42e27-902b-4e5e-be33-0e1cb14be648",
"component_product": "ab2668e1-3b11-4543-9631-50ab515bbafd",
"created_at": 1787228347,
"updated_at": 1787228347
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Show child attributes
Show child attributes
Response
Success
The UUID of the specific object.
A string describing the object type returned.
Optional relative weighting input (in cents) for this component. Nil uses default weighting by quantity.
The quantity of this component in the bundle.
The position of this item within the bundle.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Expandable – The associated bundle product ID.
Expandable – The associated component product ID.
Whether the returned version is the current one on the bundle item.
Expandable – Property not returned unless expanded.
Expandable – Property not returned unless expanded.
Time at which the object was created. Measured in seconds since the Unix epoch.
Time at which the object was last updated. Measured in seconds since the Unix epoch.
Was this page helpful?