InventoryItemImput in GraphQL and new country codes

Shopify Partner
15 0 12



Any reason to have the new fields for inventory item related with harmonized system codes included in InventoryItemUpdateInput but not in InventoryItemInput? IMHO It makes no sense to have to create and to update a variant to define these fields.


Replies 4 (4)
Shopify Staff
Shopify Staff
1134 84 226

Hey there, 


The different inputs are intended for different use cases. A variant needs to be created regardless in order to have an inventory item to alter, but then you can use either option depending on what you wanted to accomplish. 


For example, inventoryItemInput lets you adjust the cost of an item and whether or not the inventory is tracked without any required inputs. 


However, if you wanted to work with inventoryItemUpdateInput countryHarmonizedSystemCodes is a requirement, and there are likely several API consumers out there that have no interest in that field at all - so inventoryItemInput may suit their needs a little better.  

Josh | 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 the Shopify Help Center or the Shopify Blog

Shopify Partner
15 0 12

Hi, thanks for the answer.

The problem here is that we want to create products with variants with country code of origin. For harmonized system code is easy to add during creation because it exists in product variant, but for country code of origin there is nothing for creation. So if we want to create a product with 20 variants and set country code we need to do a first call to create the product and its variants and then 20 additional calls to update each variant.


It's a pitty that country code of origin cannot be included during creation directly.

Shopify Partner
78 2 19

I agree that countryCodeOfOrigin should be an input parameter on inventoryItemInput - not only on the update.

Is there any reason it is not possible to set on create - I do not agree with the argument given above.

Shopify Partner
3 0 1

I just tried adjusting the country code of origin and a few other properties on the Shopify console and it looks like Shopify's internal API is doing just that - adjusting the country code of origin and HSC code. if we can please put that in input so that we can make bulk updates that would be great. Thanks.

        "handle":"a", "status":"ACTIVE",