Product
Requires access scope.
The Product
object lets you manage products in a merchant’s store.
Products are the goods and services that merchants offer to customers. They can include various details such as title, description, price, images, and options such as size or color. You can use product variants to create or update different versions of the same product. You can also add or update product media. Products can be organized by grouping them into a collection.
Learn more about working with products and collections.
Anchor to Fields and connectionsFields and connections
- Anchor to adjacentVariantsadjacent•[Product
Variants Variant!]! non-null A list of variants whose selected options differ with the provided selected options by one, ordered by variant id. If selected options are not provided, adjacent variants to the first available variant is returned.
Note that this field returns an array of variants. In most cases, the number of variants in this array will be low. However, with a low number of options and a high number of values per option, the number of variants returned here can be high. In such cases, it recommended to avoid using this field.
This list of variants can be used in combination with the
options
field to build a rich variant picker that includes variant availability or other variant information.- Anchor to availableForSaleavailable•Boolean!
For Sale non-null Indicates if at least one product variant is available for sale.
- Anchor to categorycategory•Taxonomy
Category The category of a product from Shopify's Standard Product Taxonomy.
- Anchor to collectionscollections•Collection
Connection! non-null A list of collections that include the product.
- Anchor to compareAtPriceRangecompare•Product
At Price Range Price Range! non-null The compare-at price range of the product in the shop's default currency.
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the product was created.
- Anchor to descriptiondescription•String!non-null
A single-line description of the product, with HTML tags removed.
- Anchor to descriptionHtmldescription•HTML!
Html non-null The description of the product, with HTML tags. For example, the description might include bold
<strong></strong>
and italic<i></i>
text.- Anchor to encodedVariantAvailabilityencoded•String
Variant Availability An encoded string containing all option value combinations with a corresponding variant that is currently available for sale.
Integers represent option and values: [0,1] represents option_value at array index 0 for the option at array index 0
:
,,
,-
are control characters.:
indicates a new option. ex: 0:1 indicates value 0 for the option in position 1, value 1 for the option in position 2.,
indicates the end of a repeated prefix, mulitple consecutive commas indicate the end of multiple repeated prefixes.-
indicates a continuous range of option values. ex: 0 1-3 4Decoding process:
Example options: [Size, Color, Material] Example values: [[Small, Medium, Large], [Red, Blue], [Cotton, Wool]] Example encoded string: "0:0:0,1:0-1,,1:0:0-1,1:1,,2:0:1,1:0,,"
Step 1: Expand ranges into the numbers they represent: "0:0:0,1:0 1,,1:0:0 1,1:1,,2:0:1,1:0,," Step 2: Expand repeated prefixes: "0:0:0,0:1:0 1,1:0:0 1,1:1:1,2:0:1,2:1:0," Step 3: Expand shared prefixes so data is encoded as a string: "0:0:0,0:1:0,0:1:1,1:0:0,1:0:1,1:1:1,2:0:1,2:1:0," Step 4: Map to options + option values to determine existing variants:
[Small, Red, Cotton] (0:0:0), [Small, Blue, Cotton] (0:1:0), [Small, Blue, Wool] (0:1:1), [Medium, Red, Cotton] (1:0:0), [Medium, Red, Wool] (1:0:1), [Medium, Blue, Wool] (1:1:1), [Large, Red, Wool] (2:0:1), [Large, Blue, Cotton] (2:1:0).
- Anchor to encodedVariantExistenceencoded•String
Variant Existence An encoded string containing all option value combinations with a corresponding variant.
Integers represent option and values: [0,1] represents option_value at array index 0 for the option at array index 0
:
,,
,-
are control characters.:
indicates a new option. ex: 0:1 indicates value 0 for the option in position 1, value 1 for the option in position 2.,
indicates the end of a repeated prefix, mulitple consecutive commas indicate the end of multiple repeated prefixes.-
indicates a continuous range of option values. ex: 0 1-3 4Decoding process:
Example options: [Size, Color, Material] Example values: [[Small, Medium, Large], [Red, Blue], [Cotton, Wool]] Example encoded string: "0:0:0,1:0-1,,1:0:0-1,1:1,,2:0:1,1:0,,"
Step 1: Expand ranges into the numbers they represent: "0:0:0,1:0 1,,1:0:0 1,1:1,,2:0:1,1:0,," Step 2: Expand repeated prefixes: "0:0:0,0:1:0 1,1:0:0 1,1:1:1,2:0:1,2:1:0," Step 3: Expand shared prefixes so data is encoded as a string: "0:0:0,0:1:0,0:1:1,1:0:0,1:0:1,1:1:1,2:0:1,2:1:0," Step 4: Map to options + option values to determine existing variants:
[Small, Red, Cotton] (0:0:0), [Small, Blue, Cotton] (0:1:0), [Small, Blue, Wool] (0:1:1), [Medium, Red, Cotton] (1:0:0), [Medium, Red, Wool] (1:0:1), [Medium, Blue, Wool] (1:1:1), [Large, Red, Wool] (2:0:1), [Large, Blue, Cotton] (2:1:0).
- Anchor to featuredImagefeatured•Image
Image The featured image for the product.
This field is functionally equivalent to
images(first: 1)
.- Anchor to handlehandle•String!non-null
A unique, human-readable string of the product's title. A handle can contain letters, hyphens (
-
), and numbers, but no spaces. The handle is used in the online store URL for the product.- •ID!non-null
A globally-unique ID.
- Anchor to imagesimages•Image
Connection! non-null List of images associated with the product.
- Anchor to isGiftCardis•Boolean!
Gift Card non-null Whether the product is a gift card.
- Anchor to mediamedia•Media
Connection! non-null The media that are associated with the product. Valid media are images, 3D models, videos.
- Anchor to metafieldmetafield•Metafield
A custom field, including its
namespace
andkey
, that's associated with a Shopify resource for the purposes of adding and storing additional information.- Anchor to metafieldsmetafields•[Metafield]!non-null
A list of custom fields that a merchant associates with a Shopify resource.
- Anchor to onlineStoreUrlonline•URL
Store Url The product's URL on the online store. If
null
, then the product isn't published to the online store sales channel.- Anchor to optionsoptions•[Product
Option!]! non-null A list of product options. The limit is defined by the shop's resource limits for product options (
).
- Anchor to priceRangeprice•Product
Range Price Range! non-null The minimum and maximum prices of a product, expressed in decimal numbers. For example, if the product is priced between $10.00 and $50.00, then the price range is $10.00 - $50.00.
- Anchor to productTypeproduct
Type