Update a wishlist item
Update a wishlist item
Changes the quantity of a wishlist item, or moves it to another variant
PATCH
Update a wishlist item
Authorizations
Publishable API key for store access
JWT token for authenticated customers
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
const options = {
method: 'PATCH',
headers: {
'x-spree-api-key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({variant_id: '<string>', quantity: 2})
};
fetch('http://{defaultHost}/api/v3/store/wishlists/{wishlist_id}/items/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url http://{defaultHost}/api/v3/store/wishlists/{wishlist_id}/items/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-spree-api-key: <api-key>' \
--data '
{
"variant_id": "<string>",
"quantity": 2
}
'{
"id": "wi_UkLWZg9DAJ",
"variant_id": "variant_UkLWZg9DAJ",
"product_id": "prod_UkLWZg9DAJ",
"wishlist_id": "wl_UkLWZg9DAJ",
"quantity": 2,
"variant": {
"id": "variant_UkLWZg9DAJ",
"product_id": "prod_UkLWZg9DAJ",
"sku": "SKU-557",
"options_text": "",
"track_inventory": true,
"media_count": 0,
"preorder_ships_at": null,
"thumbnail_url": null,
"purchasable": true,
"in_stock": false,
"backorderable": true,
"preorder": false,
"weight": 0,
"height": null,
"width": null,
"depth": null,
"weight_unit": "lb",
"dimensions_unit": "in",
"minimum_order_quantity": 1,
"order_multiple": 1,
"purchase_unit": "unit",
"units_per_carton": null,
"price": {
"id": "price_UkLWZg9DAJ",
"currency": "USD",
"amount": "19.99",
"compare_at_amount": null,
"amount_in_cents": 1999,
"compare_at_amount_in_cents": null,
"display_amount": "$19.99",
"display_compare_at_amount": null,
"price_list_id": null
},
"original_price": null,
"seller_id": null,
"option_values": []
}
}Changes the quantity of a wishlist item, or moves it to another variant
const options = {
method: 'PATCH',
headers: {
'x-spree-api-key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({variant_id: '<string>', quantity: 2})
};
fetch('http://{defaultHost}/api/v3/store/wishlists/{wishlist_id}/items/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url http://{defaultHost}/api/v3/store/wishlists/{wishlist_id}/items/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-spree-api-key: <api-key>' \
--data '
{
"variant_id": "<string>",
"quantity": 2
}
'{
"id": "wi_UkLWZg9DAJ",
"variant_id": "variant_UkLWZg9DAJ",
"product_id": "prod_UkLWZg9DAJ",
"wishlist_id": "wl_UkLWZg9DAJ",
"quantity": 2,
"variant": {
"id": "variant_UkLWZg9DAJ",
"product_id": "prod_UkLWZg9DAJ",
"sku": "SKU-557",
"options_text": "",
"track_inventory": true,
"media_count": 0,
"preorder_ships_at": null,
"thumbnail_url": null,
"purchasable": true,
"in_stock": false,
"backorderable": true,
"preorder": false,
"weight": 0,
"height": null,
"width": null,
"depth": null,
"weight_unit": "lb",
"dimensions_unit": "in",
"minimum_order_quantity": 1,
"order_multiple": 1,
"purchase_unit": "unit",
"units_per_carton": null,
"price": {
"id": "price_UkLWZg9DAJ",
"currency": "USD",
"amount": "19.99",
"compare_at_amount": null,
"amount_in_cents": 1999,
"compare_at_amount_in_cents": null,
"display_amount": "$19.99",
"display_compare_at_amount": null,
"price_list_id": null
},
"original_price": null,
"seller_id": null,
"option_values": []
}
}Publishable API key for store access
JWT token for authenticated customers
Was this page helpful?
