magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.35k stars 9.28k forks source link

Create Order with Bundle Product using Rest API #38812

Open DevMagento-backend opened 3 weeks ago

DevMagento-backend commented 3 weeks ago

Preconditions and environment

{"items": [ { "base_price": "0", "name": "Bundle Item", "price": "0", "product_id": "1347", "product_type": "bundle", "qty_ordered": "1", "row_total": "0", "sku": "5630", "store_id": 1, "extension_attributes": {}, "product_option": { "extension_attributes": { "bundle_options": [ { "option_id": 19, "option_qty": "1", "option_selections": [ "22" ] }, { "option_id": 36, "option_qty": "1", "option_selections": [ "43" ] } ] } } }, { "base_price": "1", "name": "child1", "price": "11", "product_id": "1328", "product_type": "simple", "qty_ordered": "1", "row_total": "1", "sku": "child1", "store_id": 1, "parent_item": { "sku": "5630", "name": "bundle", "product_id": "1347", "product_type": "bundle", "is_virtual": 0, "product_option": { "extension_attributes": { "bundle_options": [ { "option_id": 19, "option_qty": "1", "option_selections": [ "22" ] }, { "option_id": 36, "option_qty": "1", "option_selections": [ "43" ] } ] } } }, "extension_attributes": {}, } ]}

Steps to reproduce

I checked the REST API document and tried to create a Order with bundle product using Magento Rest API

/rest/default/V1/orders/create

I created JSON as per the Payload reference but It is not creating order with child of Bundle.

Expected result

Order Needs to be create with Option Items of Bundle.

Actual result

It's not adding child item as Bundle option. Shows as Single line item in order.

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 3 weeks ago

Hi @DevMagento-backend. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 3 weeks ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Delta commented 1 week ago

Hi @DevMagento-backend ,

We have tried to verify this issue, but we are getting bad request with this input.

Screenshot 2024-06-16 at 11 55 38 PM

Could you please provide us the full JSON data to reproduce this issue.

Thanks,

engcom-Delta commented 3 days ago

Hi @DevMagento-backend ,

Awaiting your response on this issue to move further.

Thanks,