Sign in

Add item to cart

documented

Adds a line item (variant) to the current cart.

POST /api/v2/storefront/cart/add_itemCartno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

npx -y keychains@latest curl "https://demo.spreecommerce.org/api/v2/storefront/cart/add_item" \
  -X POST \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Spree-Order-Token: {{SPREECOMMERCE_API_KEY}}" \
  -d '{"variant_id": "{{$variant_id}}", "quantity": {{$quantity}}, "public_metadata": { "first_item_order": {{$first_item_order}} }, "private_metadata": { "recommended_by_us": {{$recommended_by_us}} } }'
Add item to cart · Spree Commerce · OpenIntegrations