InventoryItem

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.

created_at
"created_at": "2012-08-24T14:01:47-04:00"

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

id
"id": 450789469

The ID of the inventory item.

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

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

Endpoints

GET /admin/inventory_items.json
Retrieves a list of inventory items
ids
required

Show only certain inventory items, specified by a comma-seperated list of IDs.

(maximum: 100)
page

The page of results to show.

limit

The maximum number of results to show.

(default: 50, maximum: 250)

Retrieve a list of inventory items

GET /admin/inventory_items.json?ids=808950810,39072856,457924702
View Response
HTTP/1.1 200 OK
{
  "inventory_items": [
    {
      "id": 39072856,
      "sku": "IPOD2008GREEN",
      "created_at": "2018-10-29T06:05:58-04:00",
      "updated_at": "2018-10-29T06:05:58-04:00",
      "cost": "25.00",
      "tracked": true,
      "admin_graphql_api_id": "gid://shopify/InventoryItem/39072856"
    },
    {
      "id": 457924702,
      "sku": "IPOD2008BLACK",
      "created_at": "2018-10-29T06:05:58-04:00",
      "updated_at": "2018-10-29T06:05:58-04:00",
      "cost": "25.00",
      "tracked": true,
      "admin_graphql_api_id": "gid://shopify/InventoryItem/457924702"
    },
    {
      "id": 808950810,
      "sku": "IPOD2008PINK",
      "created_at": "2018-10-29T06:05:58-04:00",
      "updated_at": "2018-10-29T06:05:58-04:00",
      "cost": "25.00",
      "tracked": true,
      "admin_graphql_api_id": "gid://shopify/InventoryItem/808950810"
    }
  ]
}
GET /admin/inventory_items/808950810.json
Retrieves a single inventory item by ID

Retrieve an inventory item by ID

GET /admin/inventory_items/#{inventory_item_id}.json
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "IPOD2008PINK",
    "created_at": "2018-10-29T06:05:58-04:00",
    "updated_at": "2018-10-29T06:05:58-04:00",
    "cost": "25.00",
    "tracked": true,
    "admin_graphql_api_id": "gid://shopify/InventoryItem/808950810"
  }
}
PUT /admin/inventory_items/808950810.json
Updates an existing inventory item

Update an inventory item's SKU

PUT /admin/inventory_items/#{inventory_item_id}.json
{
  "inventory_item": {
    "id": 808950810,
    "sku": "new sku",
    "created_at": "2018-10-29T06:05:58-04:00",
    "updated_at": "2018-10-29T06:05:58-04:00",
    "cost": "25.00",
    "tracked": true,
    "admin_graphql_api_id": "gid://shopify/InventoryItem/808950810"
  }
}
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "new sku",
    "created_at": "2018-10-29T06:05:58-04:00",
    "updated_at": "2018-10-29T06:10:08-04:00",
    "cost": "25.00",
    "tracked": true,
    "admin_graphql_api_id": "gid://shopify/InventoryItem/808950810"
  }
}

Update an inventory item's unit cost

PUT /admin/inventory_items/#{inventory_item_id}.json
{
  "inventory_item": {
    "id": 808950810,
    "sku": "IPOD2008PINK",
    "created_at": "2018-10-29T06:05:58-04:00",
    "updated_at": "2018-10-29T06:05:58-04:00",
    "cost": "25.00",
    "tracked": true,
    "admin_graphql_api_id": "gid://shopify/InventoryItem/808950810"
  }
}
View Response
HTTP/1.1 200 OK
{
  "inventory_item": {
    "id": 808950810,
    "sku": "IPOD2008PINK",
    "created_at": "2018-10-29T06:05:58-04:00",
    "updated_at": "2018-10-29T06:05:58-04:00",
    "cost": "25.00",
    "tracked": true,
    "admin_graphql_api_id": "gid://shopify/InventoryItem/808950810"
  }
}

Sign up for a Partner account to get started.

Sign up