We're constantly trying to improve your support experience, and your feedback is extremely valuable to us.

Please take a moment to tell us about your experience today.
Sign up for future Help Center user research studies.

InventoryItem

Version 2019-04

An inventory item represents the physical good available to be shipped to a customer. 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 inventory information.

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

What you can do with InventoryItem

The Shopify API lets you do the following with the InventoryItem resource. More detailed versions of these general actions may be available:

InventoryItem properties

cost
"cost": "25.00"

The unit cost of the inventory item.

country_code_of_origin
"country_code_of_origin": "FR"

The two-digit code for the country where the inventory item was made.

country_harmonized_system_codes
"country_harmonized_system_codes": [
  {
    "harmonized_system_code": "1234561111",
    "country_code": "CA"
  },
  {
    "harmonized_system_code": "1234562222",
    "country_code": "US"
  }
]

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
"created_at": "2012-08-24T14:01:47-04:00"

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

harmonized_system_code
"harmonized_system_code": 123456

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

id
read-only
"id": 450789469

The ID of the inventory item.

province_code_of_origin
"province_code_of_origin": "QC"

The two-digit code for the province where the inventory item was made. Used only if the shipping provider for the inventory item is Canada Post.

sku
"sku": "IPOD2008PINK"

The unique SKU (stock keeping unit) of the inventory item.

tracked
"tracked": true

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

updated_at
read-only
"updated_at": "2012-08-24T14:01:47-04:00"

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

requires_shipping
read-only
"requires_shipping": true

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

Endpoints

GET /admin/api/2019-07/inventory_items.json
Retrieves a list of inventory items.
ids
required

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

(maximum: 100)
limit

The maximum number of results to show.

(default: 50, maximum: 250)
page
deprecated

The page of results to show.

(default: 1)

Retrieve a list of inventory items

GET /admin/api/#{api_version}/inventory_items.json?ids=808950810,39072856,457924702
View Response
HTTP/1.1 200 OK
{
  "inventory_items": [
    {
      "id": 39072856,
      "sku": "IPOD2008GREEN",
      "created_at": "2019-08-08T14:48:57-04:00",
      "updated_at": "2019-08-08T14:48:57-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": "2019-08-08T14:48:57-04:00",
      "updated_at": "2019-08-08T14:48:57-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": "2019-08-08T14:48:57-04:00",
      "updated_at": "2019-08-08T14:48:57-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"
    }
  ]
}
GET /admin/api/2019-07/inventory_items/808950810.json
Retrieves a single inventory item by ID

Retrieve an inventory item by ID

GET /admin/api/#{api_version}/inventory_items/#{inventory_item_id}.json
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "IPOD2008PINK",
    "created_at": "2019-08-08T14:48:57-04:00",
    "updated_at": "2019-08-08T14:48:57-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"
  }
}
PUT /admin/api/2019-07/inventory_items/808950810.json
Updates an existing inventory item

Update an inventory item's SKU

PUT /admin/api/#{api_version}/inventory_items/#{inventory_item_id}.json
{
  "inventory_item": {
    "id": 808950810,
    "sku": "new sku"
  }
}
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "new sku",
    "created_at": "2019-08-08T14:48:57-04:00",
    "updated_at": "2019-08-08T15:01:02-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"
  }
}

Update an inventory item's unit cost

PUT /admin/api/#{api_version}/inventory_items/#{inventory_item_id}.json
{
  "inventory_item": {
    "id": 808950810,
    "cost": "25.00"
  }
}
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "IPOD2008PINK",
    "created_at": "2019-08-08T14:48:57-04:00",
    "updated_at": "2019-08-08T14:48:57-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"
  }
}
Version 2019-07 (Latest)

An inventory item represents the physical good available to be shipped to a customer. 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 inventory information.

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

What you can do with InventoryItem

The Shopify API lets you do the following with the InventoryItem resource. More detailed versions of these general actions may be available:

InventoryItem properties

cost
"cost": "25.00"

The unit cost of the inventory item.

country_code_of_origin
"country_code_of_origin": "FR"

The two-digit code for the country where the inventory item was made.

country_harmonized_system_codes
"country_harmonized_system_codes": [
  {
    "harmonized_system_code": "1234561111",
    "country_code": "CA"
  },
  {
    "harmonized_system_code": "1234562222",
    "country_code": "US"
  }
]

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
"created_at": "2012-08-24T14:01:47-04:00"

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

harmonized_system_code
"harmonized_system_code": 123456

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

id
read-only
"id": 450789469

The ID of the inventory item.

province_code_of_origin
"province_code_of_origin": "QC"

The two-digit code for the province where the inventory item was made. Used only if the shipping provider for the inventory item is Canada Post.

sku
"sku": "IPOD2008PINK"

The unique SKU (stock keeping unit) of the inventory item.

tracked
"tracked": true

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

updated_at
read-only
"updated_at": "2012-08-24T14:01:47-04:00"

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

requires_shipping
read-only
"requires_shipping": true

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

Endpoints

GET /admin/api/2019-07/inventory_items.json
Retrieves a list of inventory items.
ids
required

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

(maximum: 100)
limit

The maximum number of results to show.

(default: 50, maximum: 250)
page
deprecated

The page of results to show.

(default: 1)

Retrieve a list of inventory items

GET /admin/api/#{api_version}/inventory_items.json?ids=808950810,39072856,457924702
View Response
HTTP/1.1 200 OK
{
  "inventory_items": [
    {
      "id": 39072856,
      "sku": "IPOD2008GREEN",
      "created_at": "2019-08-08T14:48:57-04:00",
      "updated_at": "2019-08-08T14:48:57-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": "2019-08-08T14:48:57-04:00",
      "updated_at": "2019-08-08T14:48:57-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": "2019-08-08T14:48:57-04:00",
      "updated_at": "2019-08-08T14:48:57-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"
    }
  ]
}
GET /admin/api/2019-07/inventory_items/808950810.json
Retrieves a single inventory item by ID

Retrieve an inventory item by ID

GET /admin/api/#{api_version}/inventory_items/#{inventory_item_id}.json
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "IPOD2008PINK",
    "created_at": "2019-08-08T14:48:57-04:00",
    "updated_at": "2019-08-08T14:48:57-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"
  }
}
PUT /admin/api/2019-07/inventory_items/808950810.json
Updates an existing inventory item

Update an inventory item's SKU

PUT /admin/api/#{api_version}/inventory_items/#{inventory_item_id}.json
{
  "inventory_item": {
    "id": 808950810,
    "sku": "new sku"
  }
}
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "new sku",
    "created_at": "2019-08-08T14:48:57-04:00",
    "updated_at": "2019-08-08T15:01:02-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"
  }
}

Update an inventory item's unit cost

PUT /admin/api/#{api_version}/inventory_items/#{inventory_item_id}.json
{
  "inventory_item": {
    "id": 808950810,
    "cost": "25.00"
  }
}
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "IPOD2008PINK",
    "created_at": "2019-08-08T14:48:57-04:00",
    "updated_at": "2019-08-08T14:48:57-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"
  }
}
Version 2019-10 (Release candidate)

An inventory item represents the physical good available to be shipped to a customer. 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 inventory information.

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

What you can do with InventoryItem

The Shopify API lets you do the following with the InventoryItem resource. More detailed versions of these general actions may be available:

InventoryItem properties

cost
"cost": "25.00"

The unit cost of the inventory item.

country_code_of_origin
"country_code_of_origin": "FR"

The two-digit code for the country where the inventory item was made.

country_harmonized_system_codes
"country_harmonized_system_codes": [
  {
    "harmonized_system_code": "1234561111",
    "country_code": "CA"
  },
  {
    "harmonized_system_code": "1234562222",
    "country_code": "US"
  }
]

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
"created_at": "2012-08-24T14:01:47-04:00"

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

harmonized_system_code
"harmonized_system_code": 123456

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

id
read-only
"id": 450789469

The ID of the inventory item.

province_code_of_origin
"province_code_of_origin": "QC"

The two-digit code for the province where the inventory item was made. Used only if the shipping provider for the inventory item is Canada Post.

sku
"sku": "IPOD2008PINK"

The unique SKU (stock keeping unit) of the inventory item.

tracked
"tracked": true

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

updated_at
read-only
"updated_at": "2012-08-24T14:01:47-04:00"

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

requires_shipping
read-only
"requires_shipping": true

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

Endpoints

GET /admin/api/2019-10/inventory_items.json
Retrieves a list of inventory items. Note: As of version 2019-10, this endpoint implements pagination by using links that are provided in the response header. To learn more, see Making requests to paginated REST Admin API endpoints.
ids
required

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

(maximum: 100)
limit

The maximum number of results to show.

(default: 50, maximum: 250)

Retrieve a list of inventory items

GET /admin/api/#{api_version}/inventory_items.json?ids=808950810,39072856,457924702
View Response
HTTP/1.1 200 OK
{
  "inventory_items": [
    {
      "id": 39072856,
      "sku": "IPOD2008GREEN",
      "created_at": "2019-08-08T14:48:57-04:00",
      "updated_at": "2019-08-08T14:48:57-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": "2019-08-08T14:48:57-04:00",
      "updated_at": "2019-08-08T14:48:57-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": "2019-08-08T14:48:57-04:00",
      "updated_at": "2019-08-08T14:48:57-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"
    }
  ]
}
GET /admin/api/2019-07/inventory_items/808950810.json
Retrieves a single inventory item by ID

Retrieve an inventory item by ID

GET /admin/api/#{api_version}/inventory_items/#{inventory_item_id}.json
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "IPOD2008PINK",
    "created_at": "2019-08-08T14:48:57-04:00",
    "updated_at": "2019-08-08T14:48:57-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"
  }
}
PUT /admin/api/2019-07/inventory_items/808950810.json
Updates an existing inventory item

Update an inventory item's SKU

PUT /admin/api/#{api_version}/inventory_items/#{inventory_item_id}.json
{
  "inventory_item": {
    "id": 808950810,
    "sku": "new sku"
  }
}
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "new sku",
    "created_at": "2019-08-08T14:48:57-04:00",
    "updated_at": "2019-08-08T15:01:02-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"
  }
}

Update an inventory item's unit cost

PUT /admin/api/#{api_version}/inventory_items/#{inventory_item_id}.json
{
  "inventory_item": {
    "id": 808950810,
    "cost": "25.00"
  }
}
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "IPOD2008PINK",
    "created_at": "2019-08-08T14:48:57-04:00",
    "updated_at": "2019-08-08T14:48:57-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"
  }
}

Sign up for a Partner account to get started.

Sign up