Update Inventory Item Settings
shopify_update_inventory_itemUpdates a Shopify variant's inventory item settings by SKU or ID—stock tracking, unit cost, shipping, HS/HTS codes, and country of origin—for accurate COGS and customs data.
Instructions
Update a variant's inventory-item settings — the per-SKU attributes that aren't pricing:
tracked: whether Shopify tracks stock for this SKU at all (untracked SKUs always sell)
cost: unit cost, used for profit reporting and COGS
requiresShipping: false for digital or service items
Customs / HTS fields, needed before Shopify will generate international shipping labels:
harmonizedSystemCode: the HS/HTS tariff code, 6 to 13 digits. Dots and spaces are stripped, so '6110.20.20' and '61102020' are both accepted.
countryCodeOfOrigin: 2-letter ISO country where the item was made, e.g. 'AU', 'CN'
provinceCodeOfOrigin: province/state code, only used by a few destinations (e.g. 'BC' for Canada)
countryHarmonizedSystemCodes: destination-specific HTS overrides, for when a country wants a longer national code than your 6-digit base. Replaces the whole override list.
Read the current values back with shopify_get_variant_locations. Accepts a SKU or an explicit inventoryItemId. Only provided fields change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | Exact variant SKU | |
| cost | No | Unit cost e.g. '12.50' | |
| tracked | No | Whether Shopify tracks stock for this SKU | |
| inventoryItemId | No | InventoryItem GID — alternative to sku | |
| requiresShipping | No | false for digital/service items | |
| countryCodeOfOrigin | No | 2-letter ISO country code e.g. 'AU', 'CN' — case-insensitive | |
| harmonizedSystemCode | No | HS/HTS tariff code, 6-13 digits e.g. '611020' or '6110.20.20' | |
| provinceCodeOfOrigin | No | Province/state code e.g. 'BC' — only needed for some destinations | |
| countryHarmonizedSystemCodes | No | Destination-specific HTS overrides — replaces the existing list |