Marketplace API / Types
ProductVariant
ObjectA specific version of a product, such as a size or color.
type ProductVariant implements NodeFields
| Field | Type | Description |
|---|---|---|
activeNegotiationCount | Int! | Number of active buyer negotiations for this variant. This value is the same for every caller. |
allowedStripePaymentMethods | [StripePaymentMethodType!]! | Stripe payment methods available for this variant. Empty when none are available. Amount-specific rules may further restrict the methods offered during checkout. |
buyNowUrl | URL! | URL of the checkout page that buys this variant on its own, outside a cart. Open it directly.Arguments: returnPath: String — A path, such as /p/vintage-rolex?size=m, resolved against the origin of Marketplace.url without that URL's path prepended. Checkout's back link returns the customer to this path. The value must start with one /, must not start with // or /\, must not contain a tab, carriage return or line feed, and must resolve to a URL on the storefront's origin. Any other value fails with error code VALIDATION_ERROR. When omitted or null, the back link opens Marketplace.url. |
cartItem | CartItem | The caller's cart item for this variant. Null when there is none. |
compareAtPrice | Money | The price this variant was listed at before the seller reduced it, for comparison with price. Null when no earlier price is recorded. Null when the recorded price is not above price. A non-null value is greater than price. |
giveaways | ProductVariantGiveawayConnection! | The giveaways this variant is linked to, oldest first.Arguments: after: String — Return giveaways after this cursor.first: Int! — Maximum number of giveaways to return. |
hasDigitalAssets | Boolean! | Whether the purchase includes digital content delivered by email. The variant may also require physical shipping. |
id | ID! | A globally unique ID. Treat this value as an opaque string. |
isOnlyVariant | Boolean! | Whether this is the product's only variant. |
makeOfferUrl | URL! | URL of the checkout page where an offer on this variant is submitted and withdrawn. The page is addressable whatever offerEligibility says on the parent product; that field states whether an offer is accepted.Arguments:returnPath: String — A path, such as /p/vintage-rolex?size=m, resolved against the origin of Marketplace.url without that URL's path prepended. Checkout's back link returns the customer to this path. The value must start with one /, must not start with // or /\, must not contain a tab, carriage return or line feed, and must resolve to a URL on the storefront's origin. Any other value fails with error code VALIDATION_ERROR. When omitted or null, the back link opens Marketplace.url. |
media | ProductVariantMediaConnection! | Media associated with this variant, ordered for display.Arguments: after: String — Return media after this cursor.first: Int! — Maximum number of media items to return. |
price | Money! | The variant's price. |
product | Product! | The parent product this variant belongs to. |
quantityAvailable | Int | The number of units currently available for purchase. Null when inventory is unlimited. |
title | String! | The variant's customer-facing title. |
unavailableReason | ProductVariantUnavailableReason | Why this variant cannot be purchased right now. Null when the variant is available for sale. |
viewer | ProductVariantViewerState | The authenticated user's relationship to this variant, or null when unauthenticated. Use Product.viewer for a product-level saved indicator. |
Returned by
BookmarkedProductVariantEdge.nodeBookmarkProductVariantSuccess.productVariantCartItem.productVariantCheckoutInsufficientQuantityError.productVariantCheckoutItem.productVariantGiveawayProductVariantEdge.nodeInsufficientProductQuantityError.productVariantProduct.displayVariantProductVariantBookmark.productVariantProductVariantClaim.productVariantProductVariantEdge.nodeQuery.productVariantUnbookmarkProductVariantsSuccess.productVariants