curl --request PATCH \
--url https://demo.spreecommerce.org/api/v2/storefront/wishlists/{token}/set_item_quantity/{item_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"quantity": 123
}
'{
"data": {
"id": "<string>",
"type": "wished_item",
"attributes": {
"quantity": 123,
"price": "<string>",
"total": "<string>",
"display_price": "<string>",
"display_total": "<string>"
},
"relationships": {
"variant": {
"data": {
"id": "<string>",
"type": "<string>"
}
}
}
},
"included": [
{
"id": "1",
"type": "variant",
"attributes": {
"sku": "SKU-1001",
"price": "15.99",
"currency": "USD",
"display_price": "$15.99",
"weight": "10",
"height": "10",
"width": "10",
"depth": "10",
"is_master": true,
"options_text": "Size: small, Color: red",
"options": [
{
"name": "<string>",
"value": "<string>",
"presentation": "<string>"
}
],
"purchasable": true,
"in_stock": true,
"backorderable": true
},
"relationships": {
"product": {
"data": {
"id": "<string>",
"type": "<string>"
}
},
"images": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"option_values": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
}
}
}
]
}This endpoint sets the wished item quantity.
curl --request PATCH \
--url https://demo.spreecommerce.org/api/v2/storefront/wishlists/{token}/set_item_quantity/{item_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"quantity": 123
}
'{
"data": {
"id": "<string>",
"type": "wished_item",
"attributes": {
"quantity": 123,
"price": "<string>",
"total": "<string>",
"display_price": "<string>",
"display_total": "<string>"
},
"relationships": {
"variant": {
"data": {
"id": "<string>",
"type": "<string>"
}
}
}
},
"included": [
{
"id": "1",
"type": "variant",
"attributes": {
"sku": "SKU-1001",
"price": "15.99",
"currency": "USD",
"display_price": "$15.99",
"weight": "10",
"height": "10",
"width": "10",
"depth": "10",
"is_master": true,
"options_text": "Size: small, Color: red",
"options": [
{
"name": "<string>",
"value": "<string>",
"presentation": "<string>"
}
],
"purchasable": true,
"in_stock": true,
"backorderable": true
},
"relationships": {
"product": {
"data": {
"id": "<string>",
"type": "<string>"
}
},
"images": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"option_values": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
}
}
}
]
}User token to authorize Cart and Checkout requests.
It is required to associate Cart with the User.
The token is a unique string used to identify the target resource.
The wished item id
Set the quantity value to an integer greater than 0
200 Success - Returns an array of wished_item objects.
Show child attributes
Show child attributes
"1"
Show child attributes
"SKU-1001"
"15.99"
"USD"
"$15.99"
"10"
"10"
"10"
"10"
Indicates if Variant is the master Variant
"Size: small, Color: red"
Indicates if Variant is in stock or backorderable
Indicates if Variant is in stock
Show child attributes
Was this page helpful?