Update
curl --request PATCH \
--url https://{defaultHost}/v1/saved_items/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"saved_item": {
"quantity": 3
}
}
'import requests
url = "https://{defaultHost}/v1/saved_items/{id}"
payload = { "saved_item": { "quantity": 3 } }
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({saved_item: {quantity: 3}})
};
fetch('https://{defaultHost}/v1/saved_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/saved_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([
'saved_item' => [
'quantity' => 3
]
]),
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/saved_items/{id}"
payload := strings.NewReader("{\n \"saved_item\": {\n \"quantity\": 3\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/saved_items/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"saved_item\": {\n \"quantity\": 3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/saved_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 \"saved_item\": {\n \"quantity\": 3\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "044ec3b3-fd6e-4d11-8d23-7cdd9d360d3d",
"object": "saved_item",
"ad_hoc_amount": null,
"bundle_component_variants": {},
"live_mode": true,
"note": null,
"price_changed": false,
"purchasable_status": "purchasable",
"quantity": 3,
"variant_changed": false,
"saved_list": "a92c07f5-c0da-4446-bbfc-8e6d48093252",
"product": "e57a34dc-bbb3-4318-8ad6-6375ef79ec4a",
"price": "866356df-20f1-4802-ba4a-3fdc1d45b933",
"variant": null,
"created_at": 1795639268,
"updated_at": 1795639268
}Saved Items
Update
Updates a specific saved item. Updating saved_list moves it to another list of the same customer.
PATCH
/
v1
/
saved_items
/
{id}
Update
curl --request PATCH \
--url https://{defaultHost}/v1/saved_items/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"saved_item": {
"quantity": 3
}
}
'import requests
url = "https://{defaultHost}/v1/saved_items/{id}"
payload = { "saved_item": { "quantity": 3 } }
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({saved_item: {quantity: 3}})
};
fetch('https://{defaultHost}/v1/saved_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/saved_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([
'saved_item' => [
'quantity' => 3
]
]),
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/saved_items/{id}"
payload := strings.NewReader("{\n \"saved_item\": {\n \"quantity\": 3\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/saved_items/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"saved_item\": {\n \"quantity\": 3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/saved_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 \"saved_item\": {\n \"quantity\": 3\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "044ec3b3-fd6e-4d11-8d23-7cdd9d360d3d",
"object": "saved_item",
"ad_hoc_amount": null,
"bundle_component_variants": {},
"live_mode": true,
"note": null,
"price_changed": false,
"purchasable_status": "purchasable",
"quantity": 3,
"variant_changed": false,
"saved_list": "a92c07f5-c0da-4446-bbfc-8e6d48093252",
"product": "e57a34dc-bbb3-4318-8ad6-6375ef79ec4a",
"price": "866356df-20f1-4802-ba4a-3fdc1d45b933",
"variant": null,
"created_at": 1795639268,
"updated_at": 1795639268
}Authorizations
Response
200 - application/json
Success
Expandable – The associated price ID.
Expandable – The associated product ID.
Whether this item can move into a checkout and, if not, why. Possible values are price_missing, price_gone, price_old_version, variant_missing, variant_gone, variant_old_version, out_of_stock, exceeds_purchase_limit, or purchasable. For a bundle, the status of the first blocking component is reported.
Expandable – The associated saved list ID.
Expandable – The associated variant ID.
Was this page helpful?