Is there any way to duplicate product variants through API?
I only found productDuplicate graphql api but there are no variant duplicate endpoints.
I need to include my shipping profile and inventory management so I will need to duplicate the entire variant.
I need to duplicate variant not product
Hello Jeff0723,
There are a couple ways I could tackle this problem. Here is some info on the graphQL scenario for performing this on a single variant. The product for the variant you want to copy must have options enabled. You then have to run a productVariant call to get the data followed by a productVariantCreate call using the productVariant data as inputs. Let me know if that helps you out, or if you need to know more about how this would work.
Clifford MacKay
cmArt Solutions
cliff@cmart.solutions
www.cmart.solutions
What if I want to duplicate the inventory quantities? The productVariantCreate need location id to create inventoryLevel, which can not be know when you duplicate.