Create
curl --request POST \
--url https://{defaultHost}/v1/saved_items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"saved_item": {
"saved_list": "6ed0510a-d67a-45d6-8a72-b324dd18f35f",
"product": "b78226e6-ef39-4f74-b5c1-4916e95598b9",
"price": "748bfcd7-29b0-4f98-b0cf-344dd7d530d1",
"quantity": 2
}
}
'import requests
url = "https://{defaultHost}/v1/saved_items"
payload = { "saved_item": {
"saved_list": "6ed0510a-d67a-45d6-8a72-b324dd18f35f",
"product": "b78226e6-ef39-4f74-b5c1-4916e95598b9",
"price": "748bfcd7-29b0-4f98-b0cf-344dd7d530d1",
"quantity": 2
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
saved_item: {
saved_list: '6ed0510a-d67a-45d6-8a72-b324dd18f35f',
product: 'b78226e6-ef39-4f74-b5c1-4916e95598b9',
price: '748bfcd7-29b0-4f98-b0cf-344dd7d530d1',
quantity: 2
}
})
};
fetch('https://{defaultHost}/v1/saved_items', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'saved_item' => [
'saved_list' => '6ed0510a-d67a-45d6-8a72-b324dd18f35f',
'product' => 'b78226e6-ef39-4f74-b5c1-4916e95598b9',
'price' => '748bfcd7-29b0-4f98-b0cf-344dd7d530d1',
'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/saved_items"
payload := strings.NewReader("{\n \"saved_item\": {\n \"saved_list\": \"6ed0510a-d67a-45d6-8a72-b324dd18f35f\",\n \"product\": \"b78226e6-ef39-4f74-b5c1-4916e95598b9\",\n \"price\": \"748bfcd7-29b0-4f98-b0cf-344dd7d530d1\",\n \"quantity\": 2\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://{defaultHost}/v1/saved_items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"saved_item\": {\n \"saved_list\": \"6ed0510a-d67a-45d6-8a72-b324dd18f35f\",\n \"product\": \"b78226e6-ef39-4f74-b5c1-4916e95598b9\",\n \"price\": \"748bfcd7-29b0-4f98-b0cf-344dd7d530d1\",\n \"quantity\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/saved_items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"saved_item\": {\n \"saved_list\": \"6ed0510a-d67a-45d6-8a72-b324dd18f35f\",\n \"product\": \"b78226e6-ef39-4f74-b5c1-4916e95598b9\",\n \"price\": \"748bfcd7-29b0-4f98-b0cf-344dd7d530d1\",\n \"quantity\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "787dc5b4-b0cb-4131-8fdd-17842dcab545",
"object": "saved_item",
"ad_hoc_amount": null,
"bundle_component_variants": {},
"live_mode": true,
"note": null,
"price_changed": false,
"purchasable_status": "purchasable",
"quantity": 2,
"variant_changed": false,
"saved_list": "6ed0510a-d67a-45d6-8a72-b324dd18f35f",
"product": "b78226e6-ef39-4f74-b5c1-4916e95598b9",
"price": "748bfcd7-29b0-4f98-b0cf-344dd7d530d1",
"variant": null,
"created_at": 1795639267,
"updated_at": 1795639267
}Saved Items
Create
Saves an item to a saved list. Saving the same item again adds to its quantity.
POST
/
v1
/
saved_items
Create
curl --request POST \
--url https://{defaultHost}/v1/saved_items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"saved_item": {
"saved_list": "6ed0510a-d67a-45d6-8a72-b324dd18f35f",
"product": "b78226e6-ef39-4f74-b5c1-4916e95598b9",
"price": "748bfcd7-29b0-4f98-b0cf-344dd7d530d1",
"quantity": 2
}
}
'import requests
url = "https://{defaultHost}/v1/saved_items"
payload = { "saved_item": {
"saved_list": "6ed0510a-d67a-45d6-8a72-b324dd18f35f",
"product": "b78226e6-ef39-4f74-b5c1-4916e95598b9",
"price": "748bfcd7-29b0-4f98-b0cf-344dd7d530d1",
"quantity": 2
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
saved_item: {
saved_list: '6ed0510a-d67a-45d6-8a72-b324dd18f35f',
product: 'b78226e6-ef39-4f74-b5c1-4916e95598b9',
price: '748bfcd7-29b0-4f98-b0cf-344dd7d530d1',
quantity: 2
}
})
};
fetch('https://{defaultHost}/v1/saved_items', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'saved_item' => [
'saved_list' => '6ed0510a-d67a-45d6-8a72-b324dd18f35f',
'product' => 'b78226e6-ef39-4f74-b5c1-4916e95598b9',
'price' => '748bfcd7-29b0-4f98-b0cf-344dd7d530d1',
'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/saved_items"
payload := strings.NewReader("{\n \"saved_item\": {\n \"saved_list\": \"6ed0510a-d67a-45d6-8a72-b324dd18f35f\",\n \"product\": \"b78226e6-ef39-4f74-b5c1-4916e95598b9\",\n \"price\": \"748bfcd7-29b0-4f98-b0cf-344dd7d530d1\",\n \"quantity\": 2\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://{defaultHost}/v1/saved_items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"saved_item\": {\n \"saved_list\": \"6ed0510a-d67a-45d6-8a72-b324dd18f35f\",\n \"product\": \"b78226e6-ef39-4f74-b5c1-4916e95598b9\",\n \"price\": \"748bfcd7-29b0-4f98-b0cf-344dd7d530d1\",\n \"quantity\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/saved_items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"saved_item\": {\n \"saved_list\": \"6ed0510a-d67a-45d6-8a72-b324dd18f35f\",\n \"product\": \"b78226e6-ef39-4f74-b5c1-4916e95598b9\",\n \"price\": \"748bfcd7-29b0-4f98-b0cf-344dd7d530d1\",\n \"quantity\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "787dc5b4-b0cb-4131-8fdd-17842dcab545",
"object": "saved_item",
"ad_hoc_amount": null,
"bundle_component_variants": {},
"live_mode": true,
"note": null,
"price_changed": false,
"purchasable_status": "purchasable",
"quantity": 2,
"variant_changed": false,
"saved_list": "6ed0510a-d67a-45d6-8a72-b324dd18f35f",
"product": "b78226e6-ef39-4f74-b5c1-4916e95598b9",
"price": "748bfcd7-29b0-4f98-b0cf-344dd7d530d1",
"variant": null,
"created_at": 1795639267,
"updated_at": 1795639267
}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?