cancel
Showing results for 
Search instead for 
Did you mean: 

Having issue to add two attribute in product via rest api

Having issue to add two attribute in product via rest api

Dear Magento Community, 

 

I am using Magento 2.2.1 rest API to add product everything going good except one issue.

 

Issue details

I have one product have two color and three size

color: red

color: black

size: small

size: medium 

size: large

 

now my combination is [black, small] [black, medium] [black, large] [red, small] [red, medium] [red, large]

 

I follow this below example to add a configurable product.

link: https://devdocs.magento.com/guides/v2.2/rest/tutorials/configurable-product/config-product-intro.htm...

 

everything going till step 3 but on step 4 Magento explains only add one size attribute my issue is when I try to add two like color and size it gives me an error.

 

Image of step 4

Screenshot.png

 

{\"message\":\"Products \\\"%1\\\" and \\\"%2\\\" have the same set of attribute values.\",\"parameters\":[\"5092\",\"5086\"]}"

When I check both products there I have the same size as small for black and small for red.

 

If anyone has an idea how I can fix this issue for rest API.