Skip to main content
Log inSign up

Shopify uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.

Anchor to productOptionsReorder

productOptionsReorder

mutation

Requires write_products access scope. Also: The user must have a permission to update product variants.

Reorders options and option values on a product, causing product variants to alter their position.

Options order take precedence over option values order. Depending on the existing product variants, some input orders might not be achieved.

Example: Existing product variants: ["Red / Small", "Green / Medium", "Blue / Small"].

New order: [ { name: "Size", values: [{ name: "Small" }, { name: "Medium" }], name: "Color", values: [{ name: "Green" }, { name: "Red" }, { name: "Blue" }] } ].

Description: Variants with "Green" value are expected to appear before variants with "Red" and "Blue" values. However, "Size" option appears before "Color".

Therefore, output will be: ["Small / "Red", "Small / Blue", "Medium / Green"].

Options to reorder on the product.

ID!required

The ID of the product to update.


Was this section helpful?

Anchor to ProductOptionsReorderPayload returnsProductOptionsReorderPayload returns

The updated product object.

The list of errors that occurred from executing the mutation.


Was this section helpful?