InventoryItems
Returns a list of inventory items.
Table-Specific Information
Select
The server uses the Shopify API to process WHERE clause conditions built with the following columns and operators. The server processes other filters client-side within the server.
- Id supports the '=, IN' comparison operators.
- Sku supports the '=, !=' comparison operators.
- CreatedAt supports the '=, !=, <, >, >=, =<' comparison operators.
- UpdatedAt supports the '=, !=, <, >, >=, =<' comparison operators.
For example, the following queries are processed server-side:
SELECT * FROM InventoryItems WHERE Id = 'Val1'
SELECT * FROM InventoryItems WHERE Sku = 'Val1'
SELECT * FROM InventoryItems WHERE CreatedAt = '2023-01-01 11:10:00'
SELECT * FROM InventoryItems WHERE UpdatedAt = '2023-01-01 11:10:00'
Update
The following columns can be updated:
Tracked, HarmonizedSystemCode, CountryCodeOfOrigin, ProvinceCodeOfOrigin, UnitCostAmount
The following pseudo-column can be used to update a record:
InventoryItemCountryHarmonizedSystemCodes (references InventoryItemCountryHarmonizedSystemCodes)
InventoryItemCountryHarmonizedSystemCodes Temporary Table Columns
| Column Name | Type | Description |
| CountryCode | String | The ISO 3166-1 alpha-2 country code for the country that issued the specified harmonized system code. |
| HarmonizedSystemCode | String | The country-specific harmonized system code. These are usually longer than 6 digits. |
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
A globally-unique ID. | |
| LegacyResourceId | String | True |
The ID of the corresponding resource in the REST Admin API. | |
| VariantId | String | True |
A globally-unique ID. | |
| Sku | String | True |
Inventory item SKU. | |
| Tracked | Bool | False |
Whether inventory levels are tracked for the item. | |
| LocationsCount | Int | True |
The number of locations where this inventory item is stocked. | |
| LocationsCountPrecision | String | True |
The count's precision, or the exactness of the value. | |
| RequiresShipping | Bool | True |
Whether the inventory item requires shipping. | |
| DuplicateSkuCount | Int | True |
The number of inventory items that share the same SKU with this item. | |
| HarmonizedSystemCode | String | False |
The harmonized system code of the item. | |
| InventoryHistoryUrl | String | True |
The URL that points to the inventory history for the item. | |
| CountryCodeOfOrigin | String | False |
The ISO 3166-1 alpha-2 country code of where the item originated from. | |
| ProvinceCodeOfOrigin | String | False |
The ISO 3166-2 alpha-2 province code of where the item originated from. | |
| CreatedAt | Datetime | True |
The date and time when the inventory item was created. | |
| UpdatedAt | Datetime | True |
The date and time when the inventory item was updated. | |
| TrackedEditableLocked | Bool | True |
Whether the attribute is locked for editing. | |
| TrackedEditableReason | String | True |
The reason the attribute is locked for editing. | |
| UnitCostAmount | Decimal | False |
Decimal money amount. | |
| UnitCostCurrencyCode | String | True |
Currency of the money. |
Pseudo-Columns
Pseudo-columns are fields that can only be used in the types of statements under which they are explicitly listed. They are not standard columns but instead provide additional functionality for specific operations.
| Name | Type | Description |
| InventoryItemCountryHarmonizedSystemCodes | String |
List of country-specific harmonized system codes. |