Langsung ke konten utama
PATCH
/
v3
/
stores
/
{store_id}
/
public
/
cart
/
items
/
{item_id}
Update a guest storefront cart item
curl --request PATCH \
  --url https://api.scalev.com/v3/stores/{store_id}/public/cart/items/{item_id} \
  --header 'Content-Type: application/json' \
  --header 'X-Scalev-Storefront-Api-Key: <x-scalev-storefront-api-key>' \
  --data '{
  "quantity": 2
}'
{
  "id": 123,
  "item_count": 123,
  "total": "<string>",
  "items": [
    {
      "id": 123,
      "type": "variant",
      "variant_id": 123,
      "bundle_price_option_id": 123,
      "quantity": 2
    }
  ]
}

Header

X-Scalev-Storefront-Api-Key
string
wajib

Publishable storefront public API key for the target store. Page public API keys are not accepted on Storefront public routes.

X-Scalev-Guest-Token
string<uuid>

Browser-safe guest cart token returned by the first guest-cart response when no token is sent. Send it on later guest-cart and public checkout calls to keep the same cart after reloads.

Parameter Path

store_id
string
wajib

Store unique_id.

item_id
string
wajib

Body

application/json
quantity
integer
wajib
Rentang yang diperlukan: x >= 1

Respons

Guest cart

id
integer
item_count
integer
total
items
object[]