Focusing on managing products, variants, and collections through the API.
I can't find any information how to create a product with a price for a default variant via the REST API with a single request. I only know how to do this with two requests. First create a product and then update a price of the default variant. So I want to know if it is even possible to do this with a single request?
Solved! Go to the solution
This is an accepted solution.
Forget it, I figured it out myself.
Just provide an array of variants in the request body when creating a product as shown below
'variants' => [['price' => 22.00]],
This is an accepted solution.
Forget it, I figured it out myself.
Just provide an array of variants in the request body when creating a product as shown below
'variants' => [['price' => 22.00]],
Hey @layerok,
In that way we have to create parent products with no price details and on each parent product we have to assign the at least one variant product, is that right?
Is this also the most efficient way to structure product details?
Thanks
Yours sincerely,
Dimitris Goudis