Langsung ke konten utama
POST
/
v3
/
stores
/
{store_id}
/
customers
/
me
/
cart
/
items
Add an item to the authenticated customer cart
curl --request POST \
  --url https://api.scalev.com/v3/stores/{store_id}/customers/me/cart/items \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "variant",
  "variant_id": 123,
  "quantity": 1
}
'
{
  "id": 123,
  "item_count": 123,
  "total": "<string>",
  "items": [
    {
      "id": 123,
      "type": "variant",
      "variant_id": 123,
      "bundle_price_option_id": 123,
      "quantity": 2
    }
  ]
}

Otorisasi

Authorization
string
header
wajib

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parameter Path

store_id
string
wajib

Store unique_id.

Body

application/json
type
enum<string>
wajib
Opsi yang tersedia:
variant
variant_id
wajib
quantity
integer
default:1
Rentang yang diperlukan: x >= 1

Respons

Updated authenticated customer cart

id
integer
item_count
integer
total
items
object[]