cancel
Showing results for 
Search instead for 
Did you mean: 

Configurable Product attributes - REST API

Configurable Product attributes - REST API

Hi,

I programmatically add configurable product from REST API in Magento ver. 2.3.3.

 

Simple products associated with the configurable product must have an option (mycolor).
The "color" option / attribute was previously created by the REST API with "curl_init ($endpoint. '/products/attributes');".

 

But when I assign the WHITE option I get this error: "Array ([message] => The child product doesn't have the"% 1 "attribute value. Verify the value and try again. [Parameters] => Array ([0 ] => mycolor)) ".

 

If instead I assign the WHITE option of an attribute not created by the REST API, everything works correctly.

 

Details:

Configurable product Sku = AAA
Simple product Sku = AAA-WHITE
Attribute code = mycolor

 

I hope I was clear enough ... can anyone tell me how I can solve it? Why can't I assign an attribute option created by the REST API?