Product

Required access

read_products access scope

Represents a product, including information about related collections and product variants.

Show definition
# Represents a product, including information about related collections and product variants.
type Product implements HasMetafields & LegacyInteroperability & Navigable & Node & OnlineStorePreviewable & Publishable {
  # The number of publication a resource is published to without feedback errors.
  availablePublicationCount: Int!

  # The description of the product, complete with HTML formatting.
  bodyHtml: String

  # A list of the collections that include the product.
  collections(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Supported filter parameters:
    #  - `collection_type`
    #  - `published_status`
    #  - `title`
    #  - `updated_at`
    #
    # See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax).
    query: String

    # Reverse the order of the underlying list.
    reverse: Boolean = false

    # Sort the underlying list by the given key.
    sortKey: CollectionSortKeys = ID
  ): CollectionConnection!

  # The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the product was created.
  createdAt: DateTime!

  # A default cursor for use in pagination.
  defaultCursor: String!

  # Stripped description of the product, single line with HTML tags removed.
  description(
    # Truncates string after the given length.
    truncateAt: Int
  ): String!

  # The description of the product, complete with HTML formatting.
  descriptionHtml: HTML!

  # Stripped description of the product, single line with HTML tags removed.
  # Truncated to 60 characters.
  descriptionPlainSummary: String!

  # The featured image for the product.
  featuredImage: Image

  # Information about the product that's provided through resource feedback.
  feedback: ResourceFeedback

  # The theme template used when viewing the gift card in a store.
  giftCardTemplateSuffix: String

  # A unique human-friendly string for the product. Automatically generated from the product's title.
  handle: String!

  # Whether the product has only a single variant with the default option and value.
  hasOnlyDefaultVariant: Boolean!

  # Whether the product has out of stock variants.
  hasOutOfStockVariants: Boolean!

  # Globally unique identifier.
  id: ID!

  # The images associated with the product.
  images(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Crops the image according to the specified region. This argument is
    # deprecated: Use `crop` on `Image.transformedSrc` instead.
    crop: CropRegion

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Image height in pixels between 1 and 2048. This argument is deprecated: Use
    # `maxHeight` on `Image.transformedSrc` instead.
    maxHeight: Int

    # Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead.
    maxWidth: Int

    # Reverse the order of the underlying list.
    reverse: Boolean = false

    # Image size multiplier for high-resolution retina displays. Must be between 1
    # and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead.
    scale: Int = 1

    # Sort the underlying list by the given key.
    sortKey: ProductImageSortKeys = POSITION
  ): ImageConnection!

  # Whether the product is in a given collection.
  inCollection(
    # The ID of the collection to check.
    id: ID!
  ): Boolean!

  # Whether the product is a gift card.
  isGiftCard: Boolean!

  # The ID of the corresponding resource in the REST Admin API.
  legacyResourceId: UnsignedInt64!

  # The metafield associated with the resource.
  metafield(
    # Identifier for the metafield (maximum of 30 characters).
    key: String!

    # Container for a set of metafields (maximum of 20 characters).
    namespace: String!
  ): Metafield

  # A paginated list of metafields associated with the resource.
  metafields(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): MetafieldConnection!

  # The online store preview URL.
  onlineStorePreviewUrl: URL

  # The online store URL for the product.
  # A value of `null` indicates that the product is not published to the Online Store sales channel.
  onlineStoreUrl: URL

  # List of custom product options (maximum of 3 per product).
  options(
    # Truncate the array result to this size.
    first: Int
  ): [ProductOption!]!

  # The price range.
  priceRange: ProductPriceRange!

  # A list of the channels where the product is published.
  productPublications(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): ProductPublicationConnection!

  # The product type specified by the merchant.
  productType: String!

  # The number of publications a resource is published on.
  publicationCount(
    # Include only the resource's publications that are published. If false it
    # will return all resource's publications including future publications.
    onlyPublished: Boolean = true
  ): Int!

  # A list of the channels where the product is published.
  publications(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Return only the publications that are published. If false it will return all publications.
    onlyPublished: Boolean = true

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): ProductPublicationConnection!

  # The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
  # when the product was published to the Online Store.
  publishedAt: DateTime

  # Check to see if resource is published to a given channel.
  publishedOnChannel(
    # The ID of the channel to check.
    channelId: ID!
  ): Boolean!

  # Check to see if resource is published to the calling app's channel.
  publishedOnCurrentChannel: Boolean!

  # Check to see if resource is published to the calling app's publication.
  publishedOnCurrentPublication: Boolean!

  # Check to see if resource is published to a given publication.
  publishedOnPublication(
    # The ID of the publication to check.
    publicationId: ID!
  ): Boolean!

  # The list of resources that are published to a publication.
  resourcePublications(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Return only the resources that are published. If false it will return all resource publications.
    onlyPublished: Boolean = true

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): ResourcePublicationConnection!

  # SEO information of the product.
  seo: SEO!

  # The storefront ID of the product.
  storefrontId: StorefrontID!

  # A list of the tags that have been added to the product.
  tags: [String!]!

  # The theme template used when viewing the product in a store.
  templateSuffix: String

  # The title of the product.
  title: String!

  # The quantity of inventory in stock.
  totalInventory: Int!

  # The number of variants that are associated with this product.
  totalVariants: Int!

  # Whether inventory tracking has been enabled for this product.
  tracksInventory: Boolean!

  # The list of channels that the resource is not published to.
  unpublishedChannels(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): ChannelConnection!

  # The list of publications that the resource is not published to.
  unpublishedPublications(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): PublicationConnection!

  # The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the product was last modified.
  updatedAt: DateTime!

  # A list of variants associated with the product.
  variants(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Reverse the order of the underlying list.
    reverse: Boolean = false

    # Sort the underlying list by the given key.
    sortKey: ProductVariantSortKeys = POSITION
  ): ProductVariantConnection!

  # The name of the product's vendor.
  vendor: String!
}

Implements

Connections

collections   (CollectionConnection!)

A list of the collections that include the product.

Argument Type Default Description
after

String

Returns the elements that come after the specified cursor.

before

String

Returns the elements that come before the specified cursor.

first

Int

Returns up to the first n elements from the list.

last

Int

Returns up to the last n elements from the list.

query

String

Supported filter parameters:

  • collection_type
  • published_status
  • title
  • updated_at

See the detailed search syntax.

reverse

Boolean

false

Reverse the order of the underlying list.

sortKey

CollectionSortKeys

ID

Sort the underlying list by the given key.

images   (ImageConnection!)

The images associated with the product.

Argument Type Default Description
after

String

Returns the elements that come after the specified cursor.

before

String

Returns the elements that come before the specified cursor.

crop

CropRegion

Crops the image according to the specified region. This argument is deprecated: Use crop on Image.transformedSrc instead.

first

Int

Returns up to the first n elements from the list.

last

Int

Returns up to the last n elements from the list.

maxHeight

Int

Image height in pixels between 1 and 2048. This argument is deprecated: Use maxHeight on Image.transformedSrc instead.

maxWidth

Int

Image width in pixels between 1 and 2048. This argument is deprecated: Use maxWidth on Image.transformedSrc instead.

reverse

Boolean

false

Reverse the order of the underlying list.

scale

Int

1

Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use scale on Image.transformedSrc instead.

sortKey

ProductImageSortKeys

POSITION

Sort the underlying list by the given key.

metafields   (MetafieldConnection!)

A paginated list of metafields associated with the resource.

Argument Type Default Description
after

String

Returns the elements that come after the specified cursor.

before

String

Returns the elements that come before the specified cursor.

first

Int

Returns up to the first n elements from the list.

last

Int

Returns up to the last n elements from the list.

reverse

Boolean

false

Reverse the order of the underlying list.

resourcePublications   (ResourcePublicationConnection!)

The list of resources that are published to a publication.

Required access

read_publications access scope

Argument Type Default Description
after

String

Returns the elements that come after the specified cursor.

before

String

Returns the elements that come before the specified cursor.

first

Int

Returns up to the first n elements from the list.

last

Int

Returns up to the last n elements from the list.

onlyPublished

Boolean

true

Return only the resources that are published. If false it will return all resource publications.

reverse

Boolean

false

Reverse the order of the underlying list.

unpublishedPublications   (PublicationConnection!)

The list of publications that the resource is not published to.

Required access

read_publications access scope

Argument Type Default Description
after

String

Returns the elements that come after the specified cursor.

before

String

Returns the elements that come before the specified cursor.

first

Int

Returns up to the first n elements from the list.

last

Int

Returns up to the last n elements from the list.

reverse

Boolean

false

Reverse the order of the underlying list.

variants   (ProductVariantConnection!)

A list of variants associated with the product.

Argument Type Default Description
after

String

Returns the elements that come after the specified cursor.

before

String

Returns the elements that come before the specified cursor.

first

Int

Returns up to the first n elements from the list.

last

Int

Returns up to the last n elements from the list.

reverse

Boolean

false

Reverse the order of the underlying list.

sortKey

ProductVariantSortKeys

POSITION

Sort the underlying list by the given key.

Fields

availablePublicationCount   (Int!)

The number of publication a resource is published to without feedback errors.

Required access

read_publications access scope

createdAt   (DateTime!)

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

defaultCursor   (String!)

A default cursor for use in pagination.

description   (String!)

Stripped description of the product, single line with HTML tags removed.

Argument Type Default Description
truncateAt

Int

Truncates string after the given length.

descriptionHtml   (HTML!)

The description of the product, complete with HTML formatting.

featuredImage   (Image)

The featured image for the product.

feedback   (ResourceFeedback)

Information about the product that's provided through resource feedback.

giftCardTemplateSuffix   (String)

The theme template used when viewing the gift card in a store.

handle   (String!)

A unique human-friendly string for the product. Automatically generated from the product's title.

hasOnlyDefaultVariant   (Boolean!)

Whether the product has only a single variant with the default option and value.

hasOutOfStockVariants   (Boolean!)

Whether the product has out of stock variants.

id   (ID!)

Globally unique identifier.

inCollection   (Boolean!)

Whether the product is in a given collection.

Argument Type Default Description
id

required

ID!

The ID of the collection to check.

isGiftCard   (Boolean!)

Whether the product is a gift card.

legacyResourceId   (UnsignedInt64!)

The ID of the corresponding resource in the REST Admin API.

metafield   (Metafield)

The metafield associated with the resource.

Argument Type Default Description
key

required

String!

Identifier for the metafield (maximum of 30 characters).

namespace

required

String!

Container for a set of metafields (maximum of 20 characters).

onlineStorePreviewUrl   (URL)

The online store preview URL.

onlineStoreUrl   (URL)

The online store URL for the product. A value of null indicates that the product is not published to the Online Store sales channel.

options   ([ProductOption!]!)

List of custom product options (maximum of 3 per product).

Argument Type Default Description
first

Int

Truncate the array result to this size.

priceRange   (ProductPriceRange!)

The price range.

productType   (String!)

The product type specified by the merchant.

publicationCount   (Int!)

The number of publications a resource is published on.

Required access

read_publications access scope

Argument Type Default Description
onlyPublished

Boolean

true

Include only the resource's publications that are published. If false it will return all resource's publications including future publications.

publishedAt   (DateTime)

The date and time (ISO 8601 format) when the product was published to the Online Store.

publishedOnCurrentPublication   (Boolean!)

Check to see if resource is published to the calling app's publication.

Required access

read_product_listings access scope

publishedOnPublication   (Boolean!)

Check to see if resource is published to a given publication.

Required access

read_publications access scope

Argument Type Default Description
publicationId

required

ID!

The ID of the publication to check.

seo   (SEO!)

SEO information of the product.

storefrontId   (StorefrontID!)

The storefront ID of the product.

tags   ([String!]!)

A list of the tags that have been added to the product.

templateSuffix   (String)

The theme template used when viewing the product in a store.

title   (String!)

The title of the product.

totalInventory   (Int!)

The quantity of inventory in stock.

totalVariants   (Int!)

The number of variants that are associated with this product.

tracksInventory   (Boolean!)

Whether inventory tracking has been enabled for this product.

updatedAt   (DateTime!)

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

vendor   (String!)

The name of the product's vendor.

Deprecated fields

Show/Hide

bodyHtml   (String)

deprecated

The description of the product, complete with HTML formatting.

Deprecation warning

Use descriptionHtml instead

descriptionPlainSummary   (String!)

deprecated

Stripped description of the product, single line with HTML tags removed. Truncated to 60 characters.

Deprecation warning

Use description instead

productPublications   (ProductPublicationConnection!)

deprecated

A list of the channels where the product is published.

Deprecation warning

Use resourcePublications instead

Required access

read_publications access scope

Argument Type Default Description
after

String

Returns the elements that come after the specified cursor.

before

String

Returns the elements that come before the specified cursor.

first

Int

Returns up to the first n elements from the list.

last

Int

Returns up to the last n elements from the list.

reverse

Boolean

false

Reverse the order of the underlying list.

publications   (ProductPublicationConnection!)

deprecated

A list of the channels where the product is published.

Deprecation warning

Use resourcePublications instead

Required access

read_publications access scope

Argument Type Default Description
after

String

Returns the elements that come after the specified cursor.

before

String

Returns the elements that come before the specified cursor.

first

Int

Returns up to the first n elements from the list.

last

Int

Returns up to the last n elements from the list.

onlyPublished

Boolean

true

Return only the publications that are published. If false it will return all publications.

reverse

Boolean

false

Reverse the order of the underlying list.

publishedOnChannel   (Boolean!)

deprecated

Check to see if resource is published to a given channel.

Deprecation warning

Use publishedOnPublication instead

Required access

read_publications access scope

Argument Type Default Description
channelId

required

ID!

The ID of the channel to check.

publishedOnCurrentChannel   (Boolean!)

deprecated

Check to see if resource is published to the calling app's channel.

Deprecation warning

Use publishedOnCurrentPublication instead

Required access

read_product_listings access scope

unpublishedChannels   (ChannelConnection!)

deprecated

The list of channels that the resource is not published to.

Deprecation warning

Use unpublishedPublications instead

Required access

read_publications access scope

Argument Type Default Description
after

String

Returns the elements that come after the specified cursor.

before

String

Returns the elements that come before the specified cursor.

first

Int

Returns up to the first n elements from the list.

last

Int

Returns up to the last n elements from the list.

reverse

Boolean

false

Reverse the order of the underlying list.

Sign up for a Partner account to get started.

Sign up