Currently, our Product Update endpoint takes a variant ID as an optional argument when you update a variant. If you provide an ID in your request, then the existing variant with that matching ID is updated as expected. However, if you don't provide a variant ID, then Shopify will attempt to search for the variant that you want to update based on matching on the options provided (such as "option1": "Small"). If we find a matching variant with all of the provided options, then we delete the existing variant, and create a new variant with all the previous and newly updated information from the API call. This results in a new variant with a unique ID.
The following example shows a product update API call where a variant ID isn’t supplied:
"sku": "Updating the Product SKU",
"option1": "Small" # we will attempt to match any variant with this option.
As of June 3, 2019, if you don’t pass a variant ID in a product update API call, then we will update the related variant if it matches the provided options rather than deleting it and creating a new one. The variant that's returned in the product update call will have the same ID as the previously existing one, rather than a new ID. If we can't determine a match based on the provided options, then a new variant is created with a unique ID.
*From an API point of view, the variant returned in the product update call will have the same ID as the previously existing one, rather than a new ID. *
We do not expect this to have any negative impact on existing apps. However, if you have any concerns or questions about this change, then contact us through your Partner Dashboard or in our API forums.