Skip to main content

The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.

InventoryItem

Requires inventory access scope.

An inventory item represents a physical good. It holds essential information about the physical good, including its SKU and whether its inventory is tracked.

There is a 1:1 relationship between a product variant and an inventory item. Each product variant includes the ID of its related inventory item. You can use the inventory item ID to query the InventoryLevel resource to retrieve the location and quantity for an inventory item.

Use the InventoryItem resource together with the InventoryLevel and Location resources to manage a store's inventory across multiple locations.

Was this section helpful?

Anchor to

The InventoryItem resource

Anchor to

Properties


cost

The unit cost of the inventory item. The shop's default currency is used.


country_code_of_origin

The country code (ISO 3166-1 alpha-2) of where the item came from.


country_harmonized_system_codes

An array of country-specific Harmonized System (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries.


created_at
read-only

The date and time (ISO 8601 format) when the inventory item was created.


harmonized_system_code

The general Harmonized System (HS) code for the inventory item. Used if a country-specific HS code (countryHarmonizedSystemCode) is not available.


id
read-only
->
id

The ID of the inventory item.


province_code_of_origin

The province code (ISO 3166-2 alpha-2) of where the item came from. The province code is only used if the shipping provider for the inventory item is Canada Post.


sku
->
sku

The unique SKU (stock keeping unit) of the inventory item. Case-sensitive string.


tracked

Whether inventory levels are tracked for the item. If true, then the inventory quantity changes are tracked by Shopify.


updated_at
read-only

The date and time (ISO 8601 format) when the inventory item was last modified.


requires_shipping

Whether a customer needs to provide a shipping address when placing an order containing the inventory item.


Was this section helpful?
{}

The InventoryItem resource

{
"cost": "25.00",
"country_code_of_origin": "FR",
"country_harmonized_system_codes": [
{
"harmonized_system_code": "1234561111",
"country_code": "CA"
},
{
"harmonized_system_code": "1234562222",
"country_code": "US"
}
],
"created_at": "2012-08-24T14:01:47-04:00",
"harmonized_system_code": 123456,
"id": 450789469,
"province_code_of_origin": "QC",
"sku": "IPOD2008PINK",
"tracked": true,
"updated_at": "2012-08-24T14:01:47-04:00",
"requires_shipping": true
}

Anchor to GET request, Retrieves a detailed list for inventory items by IDs
get
Retrieves a detailed list for inventory items by IDs

Retrieves a list that will display details for the inventory item IDs you specify. Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.


api_version
string
required

ids
required
≤ 100

Show only inventory items specified by a comma-separated list of IDs.


limit
≤ 250
default 50

The maximum number of results to show.


Was this section helpful?

Retrieves a detailed list for inventory items by IDs

Query parameters
ids=808950810,39072856,457924702
required
≤ 100

Show only inventory items specified by a comma-separated list of IDs.

Was this section helpful?
get

/admin/api/2025-07/inventory_items.json?ids=808950810,39072856,457924702

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/inventory_items.json?ids=808950810%2C39072856%2C457924702" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"inventory_items": [
{
"id": 39072856,
"sku": "IPOD2008GREEN",
"created_at": "2025-07-01T14:28:21-04:00",
"updated_at": "2025-07-01T14:28:21-04:00",
"requires_shipping": true,
"cost": "25.00",
"country_code_of_origin": null,
"province_code_of_origin": null,
"harmonized_system_code": null,
"tracked": true,
"country_harmonized_system_codes": [],
"admin_graphql_api_id": "gid://shopify/InventoryItem/39072856"
},
{
"id": 457924702,
"sku": "IPOD2008BLACK",
"created_at": "2025-07-01T14:28:21-04:00",
"updated_at": "2025-07-01T14:28:21-04:00",
"requires_shipping": true,
"cost": "25.00",
"country_code_of_origin": null,
"province_code_of_origin": null,
"harmonized_system_code": null,
"tracked": true,
"country_harmonized_system_codes": [],
"admin_graphql_api_id": "gid://shopify/InventoryItem/457924702"
},
{
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2025-07-01T14:28:21-04:00",
"updated_at": "2025-07-01T14:28:21-04:00",
"requires_shipping": true,
"cost": "25.00",
"country_code_of_origin": null,
"province_code_of_origin": null,
"harmonized_system_code": null,
"tracked": true,
"country_harmonized_system_codes": [],
"admin_graphql_api_id": "gid://shopify/InventoryItem/808950810"
}
]
}

Anchor to GET request, Retrieves a single inventory item by ID
get
Retrieves a single inventory item by ID

Retrieves a single inventory item by ID


api_version
string
required

inventory_item_id
string
required

Was this section helpful?

Retrieve an inventory item by ID

Path parameters
inventory_item_id=808950810
string
required
Was this section helpful?
get

/admin/api/2025-07/inventory_items/808950810.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/inventory_items/808950810.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2025-07-01T14:28:21-04:00",
"updated_at": "2025-07-01T14:28:21-04:00",
"requires_shipping": true,
"cost": "25.00",
"country_code_of_origin": null,
"province_code_of_origin": null,
"harmonized_system_code": null,
"tracked": true,
"country_harmonized_system_codes": [],
"admin_graphql_api_id": "gid://shopify/InventoryItem/808950810"
}
}

Updates an existing inventory item


api_version
string
required

inventory_item_id
string
required

Was this section helpful?

Update an inventory item's SKU

Path parameters
inventory_item_id=808950810
string
required
Request body
inventory_item
Inventory_item resource
Show inventory_item properties
inventory_item.id:808950810
read-only

The ID of the inventory item.

inventory_item.sku:"new sku"
->
sku

The unique SKU (stock keeping unit) of the inventory item. Case-sensitive string.

Update an inventory item's unit cost

Path parameters
inventory_item_id=808950810
string
required
Request body
inventory_item
Inventory_item resource
Show inventory_item properties
inventory_item.id:808950810
read-only

The ID of the inventory item.

inventory_item.cost:"25.00"

The unit cost of the inventory item. The shop's default currency is used.

Was this section helpful?
put

/admin/api/2025-07/inventory_items/808950810.json

curl -d '{"inventory_item":{"id":808950810,"sku":"new sku"}}' \
-X PUT "https://your-development-store.myshopify.com/admin/api/2025-07/inventory_items/808950810.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"

{}

Response

JSON
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "new sku",
"created_at": "2025-07-01T14:28:21-04:00",
"updated_at": "2025-07-01T14:31:33-04:00",
"requires_shipping": true,
"cost": "25.00",
"country_code_of_origin": null,
"province_code_of_origin": null,
"harmonized_system_code": null,
"tracked": true,
"country_harmonized_system_codes": [],
"admin_graphql_api_id": "gid://shopify/InventoryItem/808950810"
}
}