cancel
Showing results for 
Search instead for 
Did you mean: 

REST API bundle-data-option-interface does not return requ

Highlighted

REST API bundle-data-option-interface does not return requ

Hi,

For Bundled products, this interface is returned for each simple product in the options defined.

The Swagger definition shows required fields:

      "required": [

        "is_default",

        "price",

        "price_type"

      ]

However on making any request related to bundle products, price and price_type return null

To Reproduce:

Magento Version 2.3.3 Community 

Magento Sample Data

Example Request

http://{storeURL}/rest/default/V1/bundle-products/24-WG080/options/all

Expected Result:

Nodes including prices for example

            {
                "id": "1",
                "sku": "24-WG081-blue",
                "option_id": 1,
                "qty": 1,
                "position": 1,
                "is_default": true,
                "price": 23,
                "price_type": 1,
                "can_change_quantity": 1
            },

Acual Result:NULL values returned for all price and price_type nodes

[
    {
        "option_id": 1,
        "title": "Sprite Stasis Ball",
        "required": true,
        "type": "radio",
        "position": 1,
        "sku": "24-WG080",
        "product_links": [
            {
                "id": "1",
                "sku": "24-WG081-blue",
                "option_id": 1,
                "qty": 1,
                "position": 1,
                "is_default": true,
                "price": null,
                "price_type": null,
                "can_change_quantity": 1
            },
            {
                "id": "2",
                "sku": "24-WG082-blue",
                "option_id": 1,
                "qty": 1,
                "position": 2,
                "is_default": false,
                "price": null,
                "price_type": null,
                "can_change_quantity": 1
            },
            {
                "id": "3",
                "sku": "24-WG083-blue",
                "option_id": 1,
                "qty": 1,
                "position": 3,
                "is_default": false,
                "price": null,
                "price_type": null,
                "can_change_quantity": 1
            }
        ]
    },
    {
        "option_id": 2,
        "title": "Sprite Foam Yoga Brick",
        "required": true,
        "type": "radio",
        "position": 2,
        "sku": "24-WG080",
        "product_links": [
            {
                "id": "4",
                "sku": "24-WG084",
                "option_id": 2,
                "qty": 1,
                "position": 1,
                "is_default": true,
                "price": null,
                "price_type": null,
                "can_change_quantity": 1
            }
        ]
    },
    {
        "option_id": 3,
        "title": "Sprite Yoga Strap",
        "required": true,
        "type": "radio",
        "position": 3,
        "sku": "24-WG080",
        "product_links": [
            {
                "id": "5",
                "sku": "24-WG085",
                "option_id": 3,
                "qty": 1,
                "position": 1,
                "is_default": true,
                "price": null,
                "price_type": null,
                "can_change_quantity": 1
            },
            {
                "id": "6",
                "sku": "24-WG086",
                "option_id": 3,
                "qty": 1,
                "position": 2,
                "is_default": false,
                "price": null,
                "price_type": null,
                "can_change_quantity": 1
            },
            {
                "id": "7",
                "sku": "24-WG087",
                "option_id": 3,
                "qty": 1,
                "position": 3,
                "is_default": false,
                "price": null,
                "price_type": null,
                "can_change_quantity": 1
            }
        ]
    },
    {
        "option_id": 4,
        "title": "Sprite Foam Roller",
        "required": true,
        "type": "radio",
        "position": 4,
        "sku": "24-WG080",
        "product_links": [
            {
                "id": "8",
                "sku": "24-WG088",
                "option_id": 4,
                "qty": 1,
                "position": 1,
                "is_default": true,
                "price": null,
                "price_type": null,
                "can_change_quantity": 1
            }
        ]
    }
]