Adding HS Code to Inventory Items

Solved
Levelwear
New Member
2 0 0

I'm trying to add bulk HS codes to my products with the REST API,

I am trying to make a PUT request to /admin/api/2020-07/inventory_items/${inventoryItemId}.json

with the data:

 {
    "inventory_item": {
				"id": inventoryItemId,
				"harmonized_system_code": hscode
			}
		}

I am getting a 422 error with no error message, is there something wrong with the request?

0 Likes
Jayvin
Shopify Partner
130 17 30

This is an accepted solution.

Hi,

Error 422 means the entity can not be processed.

From here: https://shopify.dev/docs/admin-api/rest/reference/inventory/inventoryitem#update-2020-04

harmonized_system_code, used if a country-specific HS code is not available. Might that your inventry_item already has a country_harmonized_system_codes.

0 Likes