1

I am post Data

{
  "option": {
    "id": 39,
    "attribute_id": "134",
    "label": "Beden",
 "values": [
            {
                "value_index": 18
            },
            {
                "value_index": 17
            }
        ],
     "product_id": 47
  }

But not add "value_index": 17. I didnt understand Get result This

[
    {
        "id": 26,
        "attribute_id": "134",
        "label": "Beden",
        "position": 0,
        "values": [],
        "product_id": 47
    }
]

Please Help Me.

0

What's version do you use?

If in Magento2, value_index is required, you could post json like below.

Change the attribute_set_id to your attribute_set_id.

Change the value_index to your configurable attribute option value.

Change the configurable_product_links to your child product id.

{
  "product": {
    "sku": "MS-Champ",
    "name": "Champ Tee",
    "attribute_set_id": 4,
    "status": 1,
    "visibility": 4,
    "type_id": "configurable",
    "extension_attributes": {
          "configurable_product_options":[
            {
              "attribute__id":"136",
              "label":"Size",
              "values":[
                {
                  "value_index":340
                },
                {
                  "value_index":341
                }
              ]
            }
          ],
         "configurable_product_links":[
           21,
           22
         ]
    }
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.