cancel
Showing results for 
Search instead for 
Did you mean: 

Add configurable products with REST API

Add configurable products with REST API

Hi there,

I'm still struggling to create configurable products with the REST API. To upload a simple product to my magento 2 shop I send the following POST message:


{
  "product": {
    "sku": "sku",
    "name": "testproduct",
    "attribute_set_id": "4",
    "price": "100",
    "status": "1",
    "visibility": "4",
    "type_id": "simple",
    "weight": "0",
    "extension_attributes": {
      "stock_item": {
        "qty": "100",
        "is_in_stock": "true",
        "is_qty_decimal": "true",
        "manage_stock": "true"
      }
    }
  }
}

 

This works relatively fine, but how can I create configurable and virtual products with the REST API? I already uploaded some attributesets and create with them virtual products but I never managed it to assign them to a configurable one.

 

Can somebody give me a hint how to upload a product with variations? Like a t-shirt where the customer can choose with a drop down menu the color and size of it.

 

Thanks for your help.

 

Johannes

1 REPLY

Re: Add configurable products with REST API

Hello, did you find a solution? Would you like to share? Thanks.