---
title: "Product"
description: >
  The Product resource enables the administration of merchandise within a merchant's store.
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product.md'
---
# Product

The Product resource enables the administration of merchandise within a merchant's store.

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

## Type Signature

`Product`

## Fields

* `collections`

  [CollectionConnection](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/collection-connection.md)

  List of collections the product belongs to.

* `compareAtPriceRange`

  [ProductCompareAtPriceRange](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product-compare-at-price-range.md)

  The original price range of the product based on the store's currency.

* `createdAt`

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

  The creation date and time of the product.

* `descriptionHtml`

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

  The product's description, including HTML formatting.

* `featuredImage`

  [Image](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/image.md)

  The product's featured image.

* `featuredMedia`

  [Media](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/interfaces/media.md)

  The product's featured media.

* `handle`

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

  The product's handle.

* `hasOnlyDefaultVariant`

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

  If the value is true, it indicates that the product has only one variant with default options and values.

* `id`

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

  A universally unique identifier.

* `images`

  [ImageConnection](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/image-connection.md)

  The images linked to the product.

* `inCollection`

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

  Determining if the product is part of a specified collection.

* `isGiftCard`

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

  Indicates if the product is a gift card.

* `media`

  [MediaConnection](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/media-connection.md)

  The media linked to the product, including images and videos.

* `mediaCount`

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

  Total number of media associated with a product.

* `onlineStorePreviewUrl`

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

  The URL for previewing the online store.

* `onlineStoreUrl`

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

  The URL of the product in the online store. If not published to the online store, the value is null.

* `options`

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

  The list of options for the product.

* `priceRange`

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

  The product’s price range, formatted as decimal prices.

* `productCategory`

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

  The standard product type defined by the merchant.

* `productType`

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

  A product type customized by the merchant.

* `publishedAt`

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

  The date and time (in ISO 8601 format) at which the product was made available in the Online Store.

* `publishedInContext`

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

  Determining if the product is published for a customer in the given context

* `resourcePublicationsV2`

  [ResourcePublicationV2Connection](https://developer.shopline.com/docs/admin-graph-ql-api/apps/objects/resource-publication-v2-connection.md)

  A list of resources that are either already published or scheduled to be published to a publication.

* `spu`

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

  The product's SPU code.

* `status`

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

  The product's status.

* `subtitle`

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

  The product's summary.

* `tags`

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

  The tags associated with the product.

* `title`

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

  The product's title.

* `totalInventory`

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

  The amount of inventory available.

* `totalVariants`

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

  The product's number of variants

* `tracksInventory`

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

  Whether the product has inventory tracking enabled.

* `updatedAt`

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

  The last modified date and time of the product.

* `variants`

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

  The list of product variants.

* `vendor`

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

  The vendor name of the product.

## Schema Definition

```graphql
type Product { 
	collections(before,String,after,String,reverse,Boolean,sortKey,CollectionSortKeys,first,Int,last,Int): CollectionConnection
	compareAtPriceRange: ProductCompareAtPriceRange
	createdAt: Date!
	descriptionHtml: String
	featuredImage: Image
	featuredMedia: Media
	handle: String!
	hasOnlyDefaultVariant: Boolean!
	id: ID!
	images(sortKey,ProductImageSortKeys,first,Int,before,String,after,String,last,Int,reverse,Boolean): ImageConnection
	inCollection(id,ID!): Boolean
	isGiftCard: Boolean!
	media(first,Int,after,String,before,String,last,Int,reverse,Boolean,sortKey,ProductMediaSortKeys): MediaConnection
	mediaCount: Int!
	onlineStorePreviewUrl: URL
	onlineStoreUrl: URL
	options: [ProductOption]
	priceRange: ProductPriceRange
	productCategory: ProductCategory
	productType: String
	publishedAt: Date
	publishedInContext(context,ContextualPublicationContextInput!): Boolean!
	resourcePublicationsV2(catalogType,CatalogType,first,Int,last,Int,before,String,after,String,reverse,Boolean,onlyPublished,Boolean): ResourcePublicationV2Connection
	spu: String
	status: ProductStatus!
	subtitle: String
	tags: [String]
	title: String!
	totalInventory: Int!
	totalVariants: Int!
	tracksInventory: Boolean!
	updatedAt: Date
	variants(first,Int,last,Int,before,String,after,String,reverse,Boolean): ProductVariantConnection
	vendor: String 
}
```

## Field from

* [ProductCreatePayload](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product-create-payload.md).product

  Created product object.

* [ProductVariantsBulkUpdatePayload](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product-variants-bulk-update-payload.md).product

  The revised product object.

* [Query](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/queries/product.md).product

  批量创建产品变体。如果您想创建单个变体，请使用productVariantCreate。

* [Query](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/queries/product-by-handle.md).productByHandle

  通过handle返回商品

* [ProductVariantsBulkDeletePayload](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product-variants-bulk-delete-payload.md).product

  The revised product object.

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

  The product to which this product variant belongs.

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

  Node of the Product.

* [ProductUpdatePayload](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product-update-payload.md).product

  The modified product instance.

* [ProductConnection](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product-connection.md).nodes

  List of nodes contained within a ProductEdge.

* [ProductVariantsBulkCreatePayload](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product-variants-bulk-create-payload.md).product

  The revised product object.

## 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).

