Unable to create new Vairants for the Product using REST API

prateeksachan
New Member
1 0 0

I'm using this API https://shopify.dev/docs/admin-api/rest/reference/products/product-variant?api%5Bversion%5D=2020-07#... to create a duplicate variant for all the variants in the product.

Currently, the product is having 36 variants. So, I'm iterating each variant and creating a duplicate of each variant (by adding a "dup" in the title). Normally, the API used to work and returned the response of the newly created variant and response code of 200.

 

But, I'm seeing it's still returning response code of 200 but not creating the variant. Instead it's returning the JSON structure of the product.

0 Likes