Skip to main content
PATCH
/
api
/
v2
/
storefront
/
wishlists
/
{token}
/
set_item_quantity
/
{item_id}
Set 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>"
            }
          ]
        }
      }
    }
  ]
}

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[]