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

Retrieve the list of product.

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

## Type Signature

`ProductConnection`

## Arguments

* `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 |
  | --- | --- |
  | created_at | The creation date and time of the product. |
  | updated_at | The last modified date and time of the product. |
  | title | The product's title. |
  | tag | The tags associated with the product. |
  | id | The ID of the product. |
  | barcode | The barcode value linked to the product. |
  | gift_card | Specify if the product is a gift card item (boolean value passed). |
  | inventory_total | Product's available inventory. |
  | out_of_stock_somewhere | Designate if partially out of stock (boolean value passed). |
  | price | Price of the product variant in decimal format. |
  | product_type | A product type customized by the merchant. |
  | published_status | Online store's publication status. |
  | status | The product's status. |
  | sku | The SKU of the product variant, a case-sensitive string. |
  | vendor | The vendor name of the product. |
  | spu | The product's SPU code. |
  
  :::tip{title="tip"}
  The current supports a maximum of 30 parameters. Optimizations will be implemented in the future.
  :::
  
  #### Grammar reference
  
  ```js
  title:'test' AND inventory_total:>=1000
  ```

* `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. 

## Returns

* `edges`

  [[ProductEdge!]](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product-edge.md)

  List of edge nodes.

* `nodes`

  [[Product!]](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product.md)

  List of nodes contained within a ProductEdge.

* `pageInfo`

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

  Pagination Assistance Information.

## Code Example

```graphql
 {
	products(last, reverse, query, after, before, first ) 
		 {
			# ProductConnection 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).

