Skip to main content
PATCH
/
api
/
v2
/
storefront
/
wishlists
/
{token}
/
set_item_quantity
/
{item_id}
Set Wished Item Quantity
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
  body: JSON.stringify({quantity: 7})
};

fetch('https://demo.spreecommerce.org/api/v2/storefront/wishlists/{token}/set_item_quantity/{item_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{ "data": { "id": "1", "type": "wished_item", "attributes": { "quantity": 3, "price": "55.99", "total": "167.97", "display_price": "$55.99", "display_total": "$167.97" }, "relationships": { "variant": { "data": { "id": "149", "type": "variant" } } } } }

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

User token to authorize Cart and Checkout requests.

It is required to associate Cart with the User.

Path Parameters

token
string
required

The token is a unique string used to identify the target resource.

item_id
string
required

The wished item id

Body

application/vnd.api+json
quantity
number
required

Set the quantity value to an integer greater than 0

Response

200 Success - Returns an array of wished_item objects.

data
object
required
included
Wished Item Includes · object[]