Skip to main content

Product Object

Represents an individual item for sale in the storefront.

type Product implements Node, ObjectWithMetadata {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(
key: String!
): String
privateMetafields(
keys: [String!]
): Metadata
metadata: [MetadataItem!]!
metafield(
key: String!
): String
metafields(
keys: [String!]
): Metadata
seoTitle: String
seoDescription: String
name: String!
description: JSONString
productType: ProductType!
slug: String!
category: Category
created: DateTime!
updatedAt: DateTime!
chargeTaxes: Boolean! @deprecated
weight: Weight
defaultVariant: ProductVariant
rating: Float
channel: String
descriptionJson: JSONString @deprecated
thumbnail(
size: Int
format: ThumbnailFormatEnum = ORIGINAL
): Image
pricing(
address: AddressInput
): ProductPricingInfo
isAvailable(
address: AddressInput
): Boolean
taxType: TaxType @deprecated
attribute(
slug: String!
): SelectedAttribute
attributes: [SelectedAttribute!]!
channelListings: [ProductChannelListing!]
mediaById(
id: ID
): ProductMedia
imageById(
id: ID
): ProductImage @deprecated
variant(
id: ID
sku: String
): ProductVariant @deprecated
variants: [ProductVariant!]
media(
sortBy: MediaSortingInput
): [ProductMedia!]
images: [ProductImage!] @deprecated
collections: [Collection!]
translation(
languageCode: LanguageCodeEnum!
): ProductTranslation
availableForPurchase: Date @deprecated
availableForPurchaseAt: DateTime
isAvailableForPurchase: Boolean
taxClass: TaxClass
externalReference: String
}
Expand ▼

Fields

Product.id ● ID! non-null scalar miscellaneous

The ID of the product.

Product.privateMetadata ● [MetadataItem!]! non-null object miscellaneous

List of private metadata items. Requires staff permissions to access.

Product.privateMetafield ● String scalar miscellaneous

A single key from private metadata. Requires staff permissions to access.

Tip: Use GraphQL aliases to fetch multiple keys.

Product.privateMetafield.key ● String! non-null scalar miscellaneous

Product.privateMetafields ● Metadata scalar miscellaneous

Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.

Product.privateMetafields.keys ● [String!] list scalar miscellaneous

Product.metadata ● [MetadataItem!]! non-null object miscellaneous

List of public metadata items. Can be accessed without permissions.

Product.metafield ● String scalar miscellaneous

A single key from public metadata.

Tip: Use GraphQL aliases to fetch multiple keys.

Product.metafield.key ● String! non-null scalar miscellaneous

Product.metafields ● Metadata scalar miscellaneous

Public metadata. Use keys to control which fields you want to include. The default is to include everything.

Product.metafields.keys ● [String!] list scalar miscellaneous

Product.seoTitle ● String scalar miscellaneous

SEO title of the product.

Product.seoDescription ● String scalar miscellaneous

SEO description of the product.

Product.name ● String! non-null scalar miscellaneous

SEO description of the product.

Product.description ● JSONString scalar miscellaneous

Description of the product.

Rich text format. For reference see https://editorjs.io/

Product.productType ● ProductType! non-null object products

Type of the product.

Product.slug ● String! non-null scalar miscellaneous

Slug of the product.

Product.category ● Category object products

Product.created ● DateTime! non-null scalar miscellaneous

The date and time when the product was created.

Product.updatedAt ● DateTime! non-null scalar miscellaneous

The date and time when the product was last updated.

Product.chargeTaxes ● Boolean! deprecated non-null scalar miscellaneous

DEPRECATED

This field will be removed in Saleor 4.0. Use Channel.taxConfiguration field to determine whether tax collection is enabled.

Product.weight ● Weight object miscellaneous

Weight of the product.

Product.defaultVariant ● ProductVariant object products

Default variant of the product.

Product.rating ● Float scalar miscellaneous

Rating of the product.

Product.channel ● String scalar miscellaneous

Channel given to retrieve this product. Also used by federation gateway to resolve this object in a federated query.

Product.descriptionJson ● JSONString deprecated scalar miscellaneous

DEPRECATED

This field will be removed in Saleor 4.0. Use the description field instead.

Description of the product.

Rich text format. For reference see https://editorjs.io/

Product.thumbnail ● Image object miscellaneous

Thumbnail of the product.

Product.thumbnail.size ● Int scalar miscellaneous

Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).

Product.thumbnail.format ● ThumbnailFormatEnum enum miscellaneous

The format of the image. When not provided, format of the original image will be used.

Product.pricing ● ProductPricingInfo object products

Lists the storefront product's pricing, the current price and discounts, only meant for displaying.

Product.pricing.address ● AddressInput input miscellaneous

Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses Shop.companyAddress or fallbacks to server's settings.DEFAULT_COUNTRY configuration.

Product.isAvailable ● Boolean scalar miscellaneous

Whether the product is in stock, set as available for purchase in the given channel, and published.

Product.isAvailable.address ● AddressInput input miscellaneous

Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses Shop.companyAddress or fallbacks to server's settings.DEFAULT_COUNTRY configuration.

Product.taxType ● TaxType deprecated object taxes

DEPRECATED

This field will be removed in Saleor 4.0. Use taxClass field instead.

A type of tax. Assigned by enabled tax gateway

Product.attribute ● SelectedAttribute object attributes

Get a single attribute attached to product by attribute slug.

Product.attribute.slug ● String! non-null scalar miscellaneous

Slug of the attribute

Product.attributes ● [SelectedAttribute!]! non-null object attributes

List of attributes assigned to this product.

Product.channelListings ● [ProductChannelListing!] list object products

List of availability in channels for the product.

Requires MANAGE_PRODUCTSpermission.

Product.mediaById ● ProductMedia object products

Get a single product media by ID.

Product.mediaById.id ● ID scalar miscellaneous

ID of a product media.

Product.imageById ● ProductImage deprecated object products

DEPRECATED

This field will be removed in Saleor 4.0. Use the mediaById field instead.

Get a single product image by ID.

Product.imageById.id ● ID scalar miscellaneous

ID of a product image.

Product.variant ● ProductVariant deprecated object products

DEPRECATED

This field will be removed in Saleor 4.0. Use top-level variant query.

Get a single variant by SKU or ID.

Product.variant.id ● ID scalar miscellaneous

ID of the variant.

Product.variant.sku ● String scalar miscellaneous

SKU of the variant.

Product.variants ● [ProductVariant!] list object products

List of variants for the product.

Requires the following permissions to include the unpublished items: MANAGE_ORDERSMANAGE_DISCOUNTSMANAGE_PRODUCTS

Product.media ● [ProductMedia!] list object products

List of media for the product.

Product.media.sortBy ● MediaSortingInput input products

Sort media.

Product.images ● [ProductImage!] deprecated list object products

DEPRECATED

This field will be removed in Saleor 4.0. Use the media field instead.

List of images for the product.

Product.collections ● [Collection!] list object products

List of collections for the product.

Requires the following permissions to include the unpublished items: MANAGE_ORDERSMANAGE_DISCOUNTSMANAGE_PRODUCTS

Product.translation ● ProductTranslation object products

Returns translated product fields for the given language code.

Product.translation.languageCode ● LanguageCodeEnum! non-null enum miscellaneous

A language code to return the translation for product.

Product.availableForPurchase ● Date deprecated scalar miscellaneous

DEPRECATED

This field will be removed in Saleor 4.0. Use the availableForPurchaseAt field to fetch the available for purchase date.

Date when product is available for purchase.

Product.availableForPurchaseAt ● DateTime scalar miscellaneous

Date when product is available for purchase.

Product.isAvailableForPurchase ● Boolean scalar miscellaneous

Refers to a state that can be set by admins to control whether a product is available for purchase in storefronts. This does not guarantee the availability of stock. When set to False, this product is still visible to customers, but it cannot be purchased.

Product.taxClass ● TaxClass object taxes

Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the Product type.

Requires one of the following permissions: AUTHENTICATED_STAFF_USERAUTHENTICATED_APP

Product.externalReference ● String scalar miscellaneous

External ID of this product.

Interfaces

Node interface miscellaneous

An object with an ID

ObjectWithMetadata interface miscellaneous

Returned By

product query

Member Of

GiftCard object ● ProductBulkResult object ● ProductChannelListingUpdate object ● ProductCountableEdge object ● ProductCreate object ● ProductCreated object ● ProductDelete object ● ProductDeleted object ● ProductMediaCreate object ● ProductMediaDelete object ● ProductMediaReorder object ● ProductMediaUpdate object ● ProductMetadataUpdated object ● ProductReorderAttributeValues object ● ProductTranslatableContent object ● ProductTranslate object ● ProductUpdate object ● ProductUpdated object ● ProductVariant object ● ProductVariantReorder object ● ProductVariantSetDefault object

Implemented By

_Entity union