Skip to main content

ProductReference

Overview

ProductReference defines a reference to a product or product variant. It is used to uniquely identify products in contexts such as storefront links, product tiles, or checkout processes.

Possible Variants

VariantReference

Represents a reference to a specific product variant.

  • Attributes:
    • variantID: string
      A unique identifier for the product variant.
    • displayName: string (optional)
      A user-friendly name for the product variant.
    • handle: string
      The unique slug or identifier for the variant.

HandleReference

Represents a generic reference to a product.

  • Attributes:
    • handle: string
      The unique slug or identifier for the product.
    • displayName: string (optional)
      A user-friendly name for the product.
    • variationAttributes: Record<string, string> (optional)
      A map of variation attribute IDs to their selected values.