Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hello All,
I am using Shopify admin API to bulk update variant prices and titles. I followed the steps as given in the document:
https://shopify.dev/api/usage/bulk-operations/imports
Please see below queries that I am executing to perform the bulk operations.
Stage Query
mutation { stagedUploadsCreate(input:{ resource: BULK_MUTATION_VARIABLES, filename: "bulk_op_vars", mimeType: "text/jsonl", httpMethod: POST }){ userErrors{ field, message }, stagedTargets{ url, resourceUrl, parameters { name, value } } } }
Bulk Operation Query
mutation { bulkOperationRunMutation( mutation: " mutation call($input: ProductVariantInput!) { productVariantUpdate(input: $input) { productVariant { id price title } userErrors { field message } } } ", stagedUploadPath: "tmp/51935183035/bulk/7f8c261d-a8e5-4bd6-b19e-764d2e70de91/bulk_op_vars") { bulkOperation { id url status } userErrors { message field } } }
json file is uploaded properly.
When I run the query I get the following error. The error is not helpful and I don't understand how to correct this.
Any help on this is really appreciated. Thank you.
Error:
{'errors': [{'message': 'Internal error. Looks like something went wrong on our end.\nRequest ID: fbb5a55c-94db-4ba1-9004-968eb8ed7f28 (include this in support requests).', 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'requestId': 'fbb5a55c-94db-4ba1-9004-968eb8ed7f28'}}]}
Hi @sb6 ,
everything looks fine to me and identical as we do it, except that you probably need to add the file extension to the filename in the stage query.
filename: "bulk_op_vars.jsonl"
Regards
Thomas
I have tried .jsonl. Still it's the same error.