Expose Variant ID in Product API for POS UI Extensions

Feature Request: Expose Variant ID in Product API for POS UI Extensions

Hi,
I’m currently building a POS UI extension using the pos.product-details.action.render target. The extension is variant-specific, and it works directly from the product details screen in the Shopify POS app.

While using the Product API, I noticed that it only exposes the product ID, but not the selected variant ID. However, on the product details page in POS, a specific variant is already selected by the user.

Why This Matters

  • My extension logic depends on the exact variant the user is viewing.
  • Without the variant ID, I cannot fetch or process variant-specific data (like inventory, pricing, etc).
  • This limits the usefulness of extensions triggered on the product details screen, where a variant is clearly already known to the POS UI.

Suggested Improvement

Please consider extending the ProductApi to include a variantId (or even a full variant object if possible) that reflects the currently selected variant in the POS product details view.

interface ProductApi {
  id: number; // existing
  variantId?: number; // suggested
}

Benefits

  • Enables more accurate and relevant extensions on variant-specific scenarios.
  • Aligns the API with the actual context in the POS UI (where variant is selected).
  • Reduces need for workaround calls or assumptions in extensions.

Looking forward to seeing this improvement in a future release.

1 Like