Shopify Custom icon

Shopify Custom

Shopify Admin GraphQL node with metafields and definitions support

Product Variant → Get

AI-generated

Summary

Fetches one Shopify product variant by its global variant ID and returns its data in the selected output mode. Optionally includes metafields and their values, and lets you choose additional variant fields.

Inputs

  • authentication — Choose Admin API credentials or OAuth2 to authorize the Shopify request.
  • variantId (required) — The variant's global Shopify ID, such as a gid://shopify/... ID.
  • includeMetafields — Enable to fetch the variant's metafields and values. When enabled, you can select metafield definitions or IDs and choose whether to resolve reference metafields.
  • selectedMetafields — Optional metafield definitions or IDs to include when fetching metafields.
  • resolveMetafieldReferences — When fetching metafields, enable to resolve values for reference metafield types.
  • additionalFields — Select additional variant fields to request, including availability, barcode, compare-at price, inventory item or quantity, media, product handle, taxability, and the deprecated image field. Barcode, compare-at price, and taxable are selected by default.
  • outputMode — Choose Simplified, Raw, or Selected Fields output.
  • selectedFields — Comma-separated fields to return when Output Mode is Selected Fields, for example ID,title,status.

Output shape

A list of variant records, normally one record for the requested ID.

The returned fields depend on Additional Fields and Output Mode. Simplified returns the mapped variant data, Raw returns the raw Shopify response, and Selected Fields returns only the requested fields. Metafields are included only when enabled.

Examples

Example 1: Retrieve a variant with its barcode and inventory quantity

Set Variant ID to the Shopify global variant ID, keep or select barcode and inventory quantity under Additional Fields, then use Simplified output.

Example 2: Read selected metafields with a variant

Enable Include Metafields, optionally choose definitions or IDs and enable reference resolution, then select the desired output mode.

Links

Discussion