Hello Everyone,
I trying to update the prices of several thousands of products with multiple variants. I know the existence of productVariantsBulkUpdate
, but this allows to update a single product with multiple variants.
Is there a way to update multiple products with many variants in a single request?
Any help here is appreciated.
Best regards,
Ashwath
You might be able to use a bulk mutation, linked below, that mutation seems to be supported. I don’t know why Shopify put “bulk” in that operation name because it seems to have no relationship with bulk operations. Basically you create a huge file where each line is a jsonified set of arguments to pass to productVariantsBulkUpdate and then send that file to shopify and it calls productVariantsBulkUpdate repeatedly for you.
SEE: bulk operations
Indeed, I would be able to run productVariantsBulkUpdate
via bulkOperationRunMutation
. Thanks.
I was in an impression that bulkOperations supported only to retrieve paginated data.
Step 1: Stage file upload
Step 2: Upload file to the staged target
Step 3: Run bulk mutation
Step 4: Poll for status
See: https://shopify.dev/docs/api/usage/bulk-operations/imports#how-bulk-importing-data-works
1 Like