Re: No productOptions field in the productUpdate Mutation?

Solved

No productOptions field in the productUpdate Mutation?

jam_chan
Shopify Partner
909 23 184

I'm using 2024-04 API version. When I include the productOptions field in the productUpdate Mutation, it gives an error: userErrors': [{'field': ['productOptions'], 'message': 'product_options cannot be specified during update'}]}}

 

But the doc includes this field. Is it not updated?

 

I want to update the product and clear the variants with productUpdate Mutation. This is my current behavior

 

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview
Accepted Solution (1)

Ashish_Shah
Shopify Staff
22 7 9

This is an accepted solution.

Hello @jam_chan 

productOptions is only available in productCreate. 

If you want to clear the options and associated variants, please use productOptionsDelete mutation with the appropriate strategy for your workflow:

https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/productOptionsDelete

 

ALIAS | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)

Ashish_Shah
Shopify Staff
22 7 9

This is an accepted solution.

Hello @jam_chan 

productOptions is only available in productCreate. 

If you want to clear the options and associated variants, please use productOptionsDelete mutation with the appropriate strategy for your workflow:

https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/productOptionsDelete

 

ALIAS | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog