re-position variants with API

Highlighted
Tourist
16 0 1

Hello everyone, 

I want to reposition my variants , due to intial upload error which caused the main image be different from first variant, therefore, when first entering the product you get to a different variant than you were expecting. 

I didn't manage to do that with the API and found this : https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/variant-position-attribute-not-respect... from 2013 which states it's not available "Yet" from the API. 


Is that still the case? 

Thanks. 

0 Likes
Tourist
16 0 1

Found a solution. 

Position still does nothing, but the Variants in the API are in an array, so if you sort that array and save the product, it will change the position according to the order of the array. 

0 Likes