Error on stagedUploadsCreate mutation

Hello, I’m trying to develop an app that syncs products to Shopify via BulkOperations. But I got this error when I tried to call using this mutation stagedUploadsCreate:
Internal error. Looks like something went wrong on our end.
Request ID: 08f69529-5d33-4fbd-a61d-45e3edd5123b-1742142486 (include this in support requests).

this was the full query:
mutation {
stagedUploadsCreate(input: [{
filename: “product_template”,
mimeType: “text/jsonl”,
resource: BULK_MUTATION_VARIABLES
}]) {
stagedTargets {
url
resourceUrl
parameters {
name
value
}
}
userErrors {
field
message
}
}
}

is there something wrong with my query?

You filename is missing an extension e.g product_template.jsonl

Could you try that and see if it helps?

Nope, it’s still the same

Internal error. Looks like something went wrong on our end.
Request ID: 0a992141-11bc-428c-92ed-daf46067ded2-1742173006 (include this in support requests)
mutation {
                stagedUploadsCreate(input: [{
                    filename: "product_template.jsonl",
                    mimeType: "text/jsonl",
                    resource: BULK_MUTATION_VARIABLES
                }]) {
                    stagedTargets {
                        url
                        resourceUrl
                        parameters {
                            name
                            value
                        }
                    }
                    userErrors {
                        field
                        message
                    }
                }
            }

Hi @andreas_up

Can you send the specific error content here?


That’s all. I’ve tried to contact Shopify Help Center Agents but they said that they don’t handle coding/app development issues.

{"synchronous":true,"input":{"title":"Test product10-5","descriptionHtml":"<p><strong>garegweger</strong></p>\n<p>gregewtbhrnthrererer</p>\n<p>wer</p>\n<p>sdfwer55</p>\n<p>dsfsdfsdf</p>\n","collections":["gid://shopify/Collection/491038736659","gid://shopify/Collection/491038769427"],"giftCard":false,"handle":"test-product10-5","status":"ACTIVE","tags":["ddd"],"requiresSellingPlan":true,"metafields":{"key":"downloadFile","namespace":"custom","type":"multi_line_text_field","value":""}},"media":[{"originalSource":"http://demo.com/wp-content/uploads/2024/07/e72082c6gy1g4zbyqd2vwj20j60l0jrs.jpg","mediaContentType":"IMAGE"},{"originalSource":"http://demo.com/wp-content/uploads/2024/07/e72082c6gy1g4zbyqe3roj20j60me75l.jpg","mediaContentType":"IMAGE"},{"originalSource":"http://demo.com/wp-content/uploads/2024/07/e72082c6gy1g4zbyqdskkj20j60lbjsu.jpg","mediaContentType":"IMAGE"}]}
{"synchronous":true,"input":{"title":"Test product10-1","descriptionHtml":"<p><strong>garegweger</strong></p>\n<p>gregewtbhrnthrererer</p>\n<p>wer</p>\n<p>sdf</p>\n","collections":["gid://shopify/Collection/491038736659","gid://shopify/Collection/491038769427"],"giftCard":false,"handle":"test-product10-1","status":"ACTIVE","tags":["ddd"],"requiresSellingPlan":true,"metafields":{"key":"downloadFile","namespace":"custom","type":"multi_line_text_field","value":""}},"media":[{"originalSource":"http://demo.com/wp-content/uploads/2024/07/e72082c6gy1g4zbyqd2vwj20j60l0jrs.jpg","mediaContentType":"IMAGE"},{"originalSource":"http://demo.com/wp-content/uploads/2024/07/e72082c6gy1g4zbyqe3roj20j60me75l.jpg","mediaContentType":"IMAGE"},{"originalSource":"http://demo.com/wp-content/uploads/2024/07/e72082c6gy1g4zbyqdskkj20j60lbjsu.jpg","mediaContentType":"IMAGE"}]}

Can you share what you have in your product_template.jsonl file, it needs to be of json type, each json type is a line, no ‘,’ between lines.

Here’s the jsonl file, it was created from Shopify’s product template csv

{"input":{"Title":"Example T-Shirt","URL handle":"example-t-shirt","Description":"","Vendor":"Acme","Product category":"Apparel & Accessories > Clothing","Type":"Shirts","Tags":"mens t-shirt example","Published on online store":"TRUE","Status":"active","SKU":"","Barcode":"","Option1 name":"Title","Option1 value":"Lithograph - Height: 9\" x Width: 12\"","Option2 name":"","Option2 value":"","Option3 name":"","Option3 value":"","Price":"25","Price \/ International":"","Compare-at price":"","Compare-at price \/ International":"","Cost per item":"","Charge tax":"TRUE","Tax code":"","Inventory tracker":"","Inventory quantity":"","Continue selling when out of stock":"deny","Weight value (grams)":"3629","Weight unit for display":"g","Requires shipping":"TRUE","Fulfillment service":"manual","Product image URL":"https:\/\/burst.shopifycdn.com\/photos\/green-t-shirt.jpg?width=5000","Image position":"1","Image alt text":"","Variant image URL":"","Gift card":"FALSE","SEO title":"Our awesome T-shirt in 70 characters or less.","SEO description":"A great description of your products in 320 characters or less","Google Shopping \/ Google product category":"Apparel & Accessories > Clothing","Google Shopping \/ Gender":"Unisex","Google Shopping \/ Age group":"Adult","Google Shopping \/ MPN":"7X8ABC910","Google Shopping \/ AdWords Grouping":"T-shirts","Google Shopping \/ AdWords labels":"cotton, pre-shrunk","Google Shopping \/ Condition":"used","Google Shopping \/ Custom product":"FALSE","Google Shopping \/ Custom label 0":"","Google Shopping \/ Custom label 1":"","Google Shopping \/ Custom label 2":"","Google Shopping \/ Custom label 3":"","Google Shopping \/ Custom label 4":""}}
{"input":{"Title":"","URL handle":"example-t-shirt","Description":"","Vendor":"","Product category":"","Type":"","Tags":"","Published on online store":"","Status":"","SKU":"example-shirt-s","Barcode":"","Option1 name":"","Option1 value":"Small","Option2 name":"","Option2 value":"","Option3 name":"","Option3 value":"","Price":"19.99","Price \/ International":"","Compare-at price":"24.99","Compare-at price \/ International":"","Cost per item":"","Charge tax":"TRUE","Tax code":"","Inventory tracker":"","Inventory quantity":"","Continue selling when out of stock":"deny","Weight value (grams)":"200","Weight unit for display":"g","Requires shipping":"TRUE","Fulfillment service":"manual","Product image URL":"","Image position":"","Image alt text":"","Variant image URL":"","Gift card":"","SEO title":"","SEO description":"","Google Shopping \/ Google product category":"","Google Shopping \/ Gender":"","Google Shopping \/ Age group":"","Google Shopping \/ MPN":"","Google Shopping \/ AdWords Grouping":"","Google Shopping \/ AdWords labels":"","Google Shopping \/ Condition":"","Google Shopping \/ Custom product":"","Google Shopping \/ Custom label 0":"","Google Shopping \/ Custom label 1":"","Google Shopping \/ Custom label 2":"","Google Shopping \/ Custom label 3":"","Google Shopping \/ Custom label 4":""}}
{"input":{"Title":"","URL handle":"example-t-shirt","Description":"","Vendor":"","Product category":"","Type":"","Tags":"","Published on online store":"","Status":"","SKU":"example-shirt-m","Barcode":"","Option1 name":"","Option1 value":"Medium","Option2 name":"","Option2 value":"","Option3 name":"","Option3 value":"","Price":"19.99","Price \/ International":"","Compare-at price":"24.99","Compare-at price \/ International":"","Cost per item":"","Charge tax":"TRUE","Tax code":"","Inventory tracker":"shopify","Inventory quantity":"","Continue selling when out of stock":"deny","Weight value (grams)":"200","Weight unit for display":"g","Requires shipping":"TRUE","Fulfillment service":"manual","Product image URL":"","Image position":"","Image alt text":"","Variant image URL":"","Gift card":"","SEO title":"","SEO description":"","Google Shopping \/ Google product category":"","Google Shopping \/ Gender":"","Google Shopping \/ Age group":"","Google Shopping \/ MPN":"","Google Shopping \/ AdWords Grouping":"","Google Shopping \/ AdWords labels":"","Google Shopping \/ Condition":"","Google Shopping \/ Custom product":"","Google Shopping \/ Custom label 0":"","Google Shopping \/ Custom label 1":"","Google Shopping \/ Custom label 2":"","Google Shopping \/ Custom label 3":"","Google Shopping \/ Custom label 4":""}}
{"input":{"Title":"Example Pants","URL handle":"example-pants","Description":"","Vendor":"Acme","Product category":"Apparel & Accessories > Clothing","Type":"Pants","Tags":"mens pants example","Published on online store":"FALSE","Status":"draft","SKU":"","Barcode":"","Option1 name":"Title","Option1 value":"Jeans, W32H34","Option2 name":"","Option2 value":"","Option3 name":"","Option3 value":"","Price":"49.99","Price \/ International":"","Compare-at price":"57.99","Compare-at price \/ International":"","Cost per item":"","Charge tax":"TRUE","Tax code":"","Inventory tracker":"","Inventory quantity":"","Continue selling when out of stock":"deny","Weight value (grams)":"1250","Weight unit for display":"g","Requires shipping":"TRUE","Fulfillment service":"manual","Product image URL":"https:\/\/burst.shopifycdn.com\/photos\/distressed-kids-jeans.jpg?width=5000","Image position":"1","Image alt text":"","Variant image URL":"","Gift card":"FALSE","SEO title":"Our awesome Pants in 70 characters or less.","SEO description":"A great description of your products in 320 characters or less","Google Shopping \/ Google product category":"Apparel & Accessories > Clothing","Google Shopping \/ Gender":"Unisex","Google Shopping \/ Age group":"Adult","Google Shopping \/ MPN":"7Y2ABD712","Google Shopping \/ AdWords Grouping":"Pants","Google Shopping \/ AdWords labels":"cotton, pre-shrunk","Google Shopping \/ Condition":"used","Google Shopping \/ Custom product":"FALSE","Google Shopping \/ Custom label 0":"","Google Shopping \/ Custom label 1":"","Google Shopping \/ Custom label 2":"","Google Shopping \/ Custom label 3":"","Google Shopping \/ Custom label 4":""}}
{"input":{"Title":"Example Hat","URL handle":"example-hat","Description":"","Vendor":"Acme","Product category":"Apparel & Accessories > Clothing","Type":"Hat","Tags":"mens hat example","Published on online store":"FALSE","Status":"archived","SKU":"","Barcode":"","Option1 name":"Title","Option1 value":"Grey","Option2 name":"","Option2 value":"","Option3 name":"","Option3 value":"","Price":"17.99","Price \/ International":"","Compare-at price":"22.99","Compare-at price \/ International":"","Cost per item":"","Charge tax":"TRUE","Tax code":"","Inventory tracker":"","Inventory quantity":"","Continue selling when out of stock":"deny","Weight value (grams)":"275","Weight unit for display":"g","Requires shipping":"TRUE","Fulfillment service":"manual","Product image URL":"https:\/\/burst.shopifycdn.com\/photos\/kids-beanie.jpg?width=5000","Image position":"1","Image alt text":"","Variant image URL":"","Gift card":"FALSE","SEO title":"Our awesome Hat in 70 characters or less.","SEO description":"A great description of your products in 320 characters or less","Google Shopping \/ Google product category":"Apparel & Accessories > Clothing","Google Shopping \/ Gender":"Unisex","Google Shopping \/ Age group":"Adult","Google Shopping \/ MPN":"5P1NBQ314","Google Shopping \/ AdWords Grouping":"Hat","Google Shopping \/ AdWords labels":"cotton, pre-shrunk","Google Shopping \/ Condition":"used","Google Shopping \/ Custom product":"FALSE","Google Shopping \/ Custom label 0":"","Google Shopping \/ Custom label 1":"","Google Shopping \/ Custom label 2":"","Google Shopping \/ Custom label 3":"","Google Shopping \/ Custom label 4":"  "}}

I don’t think the jsonl file is the culprit though, because stagedUploadsCreate is the step before uploading the jsonl file.

You missed a parameter ‘httpMethod’: ‘POST’,

{
  "input": [
    {
        "filename": "product_template.jsonl",
        "mimeType": "text/jsonl",
        "httpMethod": "POST",
        "resource": "BULK_MUTATION_VARIABLES"
      }
  ]
}

When I deleted this parameter, I also received the same error as you

Brilliant! Thank you, I missed it because I was using Http->post() method and thought that it was enough. :sweat_smile:

1 Like