Hello. I would like to know how to create products with variations with one request.
As I understand it, the most optimal way is:
- request to create “master product”
POST request: https://cscart/api/products/
{
"product": "product",
"category_ids": 70,
"company_id": 29,
"price": 3890,
"product_features": {
"197": 2036
}
}
Response:
{
"product_id": product_id
}
- request to generate product variations
POST request: https://cscart/api/product_variations/product_id/generate_product_variations
{
"combinations": [
{
"197": 2034
},
{
"197": 2035
},
{
"197": 2172
},
{
"197": 2227
},
{
"197": 2038
},
{
"197": 2033
}
]
}
But is it really impossible to pass the combination parameter in the request for creating a product?