---
title: "inventoryItems"
description: "Retrieve the list of inventory items."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/inventory/queries/inventory-items'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/inventory/queries/inventory-items.md'
---
# inventoryItems

Retrieve the list of inventory items.

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`InventoryItemConnection`

## Arguments

* `after`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Returns elements following the specified cursor. The `first` argument must also be specified when using this argument.

* `before`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Returns elements preceding the specified cursor. The `last` argument must also be specified when using this argument.

* `first`

  [Int](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/int.md)

  Returns the first n elements in the list. 

* `last`

  [Int](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/int.md)

  Returns the last n elements in the list. 

* `reverse`

  [Boolean](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/boolean.md)

  Whether to reverse the order of the list. 
  
  ● true: reverse
  
  ● false: do not reverse
  
  Default value: false

* `query`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Use one or more filters for the query.
  | parameter | description |
  | --- | --- |
  | sku | The SKU of the product variant, a case-sensitive string. |
  
  :::tip{title="tip"}
  The current supports a maximum of 5 parameters. Optimizations will be implemented in the future.
  :::
  
  #### Grammar reference
  
  ```js
  sku:'T000001' OR sku:'T000002'
  ```
  
  

## Returns

* `edges`

  [[InventoryItemEdge!]](https://developer.shopline.com/docs/admin-graph-ql-api/inventory/objects/inventory-item-edge.md)

  List of edge nodes

* `nodes`

  [[InventoryItem]](https://developer.shopline.com/docs/admin-graph-ql-api/inventory/objects/inventory-item.md)

  List of nodes contained within a InventoryItemEdge

* `pageInfo`

  [PageInfo!](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/page-info.md)

  Pagination Assistance Information

## Code Example

```graphql
 {
	inventoryItems(after, before, first, last, reverse, query ) 
		 {
			# InventoryItemConnection fields
		}
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

