All things Shopify and commerce
I am making a bulk productCreate request with the following JSONL file content (obfuscated, and formatted for ease):
{ "input": { "descriptionHtml": "", "handle": "example-product", "status": "ARCHIVED", "options": [ "Size" ], "title": "EXAMPLE PRODUCT", "variants": [ { "inventoryItem": { "tracked": true, "harmonizedSystemCode": "62046239" }, "inventoryQuantities": [ { "availableQuantity": 9999, "locationId": "gid:\/\/shopify\/Location\/XXX" } ], "inventoryManagement": "SHOPIFY", "inventoryPolicy": "DENY", "options": [ "L" ], "price": "100.000000", "compareAtPrice": "150.000000", "requiresShipping": true, "sku": "EXAMPLEL", "title": "EXAMPLE LARGE" } ], "seo": { "title": "EXAMPLE PRODUCT", "description": "EXAMPLE PRODUCT DESCRIPTION" } } }
And I am getting the following response:
Invalid Bulk Mutation Field - Variable $input of type ProductInput! was provided invalid value for variants.0.inventoryItem.harmonizedSystemCode (Field is not defined on InventoryItemInput)
But it looks like InventoryItemInput does have the harmonizedSystemCode field https://shopify.dev/docs/api/admin-graphql/2024-04/input-objects/InventoryItemInput
What am I getting wrong?
Cheers
Luke
Solved! Go to the solution
This is an accepted solution.
Shot in the dark guess:
Your submitting the data in a diffrent verison to 2024-04 graphQL version
Previous verison before 2024-04 have diffrent input structures.
Try there app and see if it works there:
This is an accepted solution.
Shot in the dark guess:
Your submitting the data in a diffrent verison to 2024-04 graphQL version
Previous verison before 2024-04 have diffrent input structures.
Try there app and see if it works there:
Hey Ronak
Thanks for responding, this was indeed the issue and I didn't come back here to report a resolution. I started building the app at the end of 2023 and so had the api version set as 2023-10. When I switched to 2024-04 I ended up having to rebuild much of the product importer as 2024-04 handles variant creation in a very different way, you can't actually include variants in a bulk product create anymore!
Thanks again
Luke
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025