Skip to main content
Version: 3.x

Product

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!
weight: Weight
defaultVariant: ProductVariant
rating: Float
channel: String
descriptionJson: JSONString
thumbnail(size: Int, format: ThumbnailFormatEnum): Image
pricing(address: AddressInput): ProductPricingInfo
isAvailable(address: AddressInput): Boolean
taxType: TaxType
attributes: [SelectedAttribute!]!
channelListings: [ProductChannelListing!]
mediaById(id: ID): ProductMedia
imageById(id: ID): ProductImage
variants: [ProductVariant!]
media: [ProductMedia!]
images: [ProductImage!]
collections: [Collection!]
translation(languageCode: LanguageCodeEnum!): ProductTranslation
availableForPurchase: Date
availableForPurchaseAt: DateTime
isAvailableForPurchase: Boolean
}

Fields

id (ID!)

privateMetadata ([MetadataItem!]!)

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

privateMetafield (String)

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

Tip: Use GraphQL aliases to fetch multiple keys.

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

privateMetafields (Metadata)

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

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

metadata ([MetadataItem!]!)

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

metafield (String)

A single key from public metadata.

Tip: Use GraphQL aliases to fetch multiple keys.

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

metafields (Metadata)

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

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

seoTitle (String)

seoDescription (String)

name (String!)

description (JSONString)

Description of the product.

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

productType (ProductType!)

slug (String!)

category (Category)

created (DateTime!)

updatedAt (DateTime!)

chargeTaxes (Boolean!)

weight (Weight)

defaultVariant (ProductVariant)

rating (Float)

channel (String)

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

descriptionJson (JSONString)

Description of the product.

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

thumbnail (Image)

Size of the image. If not provided, the original image will be returned.

The format of the image. When not provided, format of the original image will be used. Must be provided together with the size value, otherwise original image will be returned.

Added in Saleor 3.6.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

pricing (ProductPricingInfo)

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

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.

isAvailable (Boolean)

Whether the product is in stock and visible or not.

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.

taxType (TaxType)

A type of tax. Assigned by enabled tax gateway

attributes ([SelectedAttribute!]!)

List of attributes assigned to this product.

channelListings ([ProductChannelListing!])

List of availability in channels for the product.

Requires one of the following permissions: MANAGE_PRODUCTS.

mediaById (ProductMedia)

Get a single product media by ID.

ID of a product media.

imageById (ProductImage)

Get a single product image by ID.

ID of a product image.

variants ([ProductVariant!])

List of variants for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.

media ([ProductMedia!])

List of media for the product.

images ([ProductImage!])

List of images for the product.

collections ([Collection!])

List of collections for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.

translation (ProductTranslation)

Returns translated product fields for the given language code.

A language code to return the translation for product.

availableForPurchase (Date)

Date when product is available for purchase.

availableForPurchaseAt (DateTime)

Date when product is available for purchase.

isAvailableForPurchase (Boolean)

Whether the product is available for purchase.

Interfaces

Node

An object with an ID

ObjectWithMetadata