1

using API /V1/carts/mine/items I got the tutorials / blogs to add configurable, simple and bundle products to cart but how can we add grouped product using this api?

What should be the payload ?

asked Aug 8, 2023 at 9:34

1 Answer 1

0
  1. Authenticate and Obtain Access Token
  2. Create a Cart

POST /V1/carts/mine

  1. Add Product to Cart

POST /V1/carts/mine/items

Jason Body

{ "cartItem": { "sku": "your_group_product_sku", "qty": 1, "quote_id": "your_cart_id" } }

  1. Review Cart

GET /V1/carts/mine/items

answered Aug 8, 2023 at 11:06
4
  • @Parachi "message": "Please specify the quantity of product(s)." Commented Aug 8, 2023 at 11:27
  • Please mention quantity according your product Commented Aug 8, 2023 at 12:47
  • I got the issue in grouped product you need to individually add items to cart by mentioning the SKU of only childs products. Commented Aug 9, 2023 at 5:05
  • curl -X POST "your-magento-domain/rest/V1/carts/YOUR_CART_ID/items" \ -H "Authorization: Bearer YOUR_AUTH_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "cartItem": { "sku": "YOUR_SKU", "qty": YOUR_QTY, "quote_id": "YOUR_CART_ID", "product_option": { "extension_attributes": { "group_id": YOUR_GROUP_ID } } } }' Commented Aug 12, 2023 at 10:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.