MCP Server for Shopify

Build 25.0.9440

ProductVariants

Returns a list of the product variants.

Table-Specific Information

Select

The server uses the Shopify API to process WHERE clause conditions built with the following columns and operators. The server processes other filters client-side within the server.

  • Id supports the '=, IN' comparison operators.
  • ProductId supports the '=, !=' comparison operators.
  • Barcode supports the '=, !=' comparison operators.
  • Sku supports the '=, !=' comparison operators.
  • Title supports the '=, !=' comparison operators.
  • UpdatedAt supports the '=, !=, <, >, >=, <=' comparison operators.
  • Taxable supports the '=, !=' comparison operators.
  • DeliveryProfileId supports the '=, !=' comparison operators.
  • LocationInventoryQuantity supports the '=, <, >, >=, <=' comparison operators.

For example, the following queries are processed server-side:

  SELECT * FROM ProductVariants WHERE Id = 'Val1'
  SELECT * FROM ProductVariants WHERE ProductId = 'Val1'
  SELECT * FROM ProductVariants WHERE Barcode = 'Val1'
  SELECT * FROM ProductVariants WHERE Sku = 'Val1'
  SELECT * FROM ProductVariants WHERE Title = 'Val1'
  SELECT * FROM ProductVariants WHERE UpdatedAt = '2023-01-01 11:10:00'
  SELECT * FROM ProductVariants WHERE Taxable = true
  SELECT * FROM ProductVariants WHERE DeliveryProfileId = 'Val1'
  SELECT * FROM ProductVariants WHERE LocationInventoryQuantity = 123

Insert

The following columns can be used to create a new record:

ProductId, Barcode, Price, CompareAtPrice, TaxCode, Taxable, InventoryPolicy, InventoryItemUnitCostAmount, InventoryItemHarmonizedSystemCode, InventoryItemMeasurementWeightValue, InventoryItemMeasurementWeightUnit, InventoryItemRequiresShipping, InventoryItemTracked

The following pseudo-columns can be used to create a new record:

MediaId, MediaSrc, InventoryQuantities (references InventoryItemInventoryLevelQuantities), OptionValues (references ProductOptionValues), Metafields (references Metafields), Strategy

InventoryItemInventoryLevelQuantities Temporary Table Columns

Column NameTypeDescription
InventoryLevelLocationIdStringA globally-unique ID.
QuantityIntThe quantity for the quantity name.

ProductOptionValues Temporary Table Columns

Column NameTypeDescription
ProductOptionIdStringA globally-unique ID.
ProductOptionNameStringThe product option's name.
IdStringA globally-unique ID.
NameStringValue associated with an option.
LinkedMetafieldValueStringMetafield value associated with an option.

Metafields Temporary Table Columns

Column NameTypeDescription
IdStringThe unique ID of the metafield.
NamespaceStringA container for a set of metafields. You need to define a custom namespace for your metafields to distinguish them from the metafields used by other apps.
KeyStringThe name of the metafield.
ValueStringThe information to be stored as metadata.
TypeStringThe metafield's information type.

Update

The following columns can be updated:

ProductId, Barcode, Price, CompareAtPrice, TaxCode, Taxable, InventoryPolicy, InventoryItemUnitCostAmount, InventoryItemHarmonizedSystemCode, InventoryItemMeasurementWeightValue, InventoryItemMeasurementWeightUnit, InventoryItemRequiresShipping, InventoryItemTracked

The following pseudo-columns can be used to update a record:

MediaId, MediaSrc, OptionValues (references ProductOptionValues), Metafields (references Metafields), AllowPartialUpdates

ProductOptionValues Temporary Table Columns

Column NameTypeDescription
ProductOptionIdStringA globally-unique ID.
ProductOptionNameStringThe product option's name.
IdStringA globally-unique ID.
NameStringValue associated with an option.
LinkedMetafieldValueStringMetafield value associated with an option.

Metafields Temporary Table Columns

Column NameTypeDescription
IdStringThe unique ID of the metafield.
NamespaceStringA container for a set of metafields. You need to define a custom namespace for your metafields to distinguish them from the metafields used by other apps.
KeyStringThe name of the metafield.
ValueStringThe information to be stored as metadata.
TypeStringThe metafield's information type.

Delete

You can delete entries by specifying the following columns:

Id, ProductId

Columns

Name Type ReadOnly References Description
Id [KEY] String True

A globally-unique identifier.

LegacyResourceId Long True

The ID of the corresponding resource in the REST Admin API.

ProductId String False

Products.Id

A globally-unique identifier.

Position Int True

The order of the product variant in the list of product variants. The first position in the list is 1.

DisplayName String True

Display name of the variant, based on product's title + variant's title.

Barcode String False

The value of the barcode associated with the product.

Sku String True

An identifier for the product variant in the shop. Required in order to connect to a fulfillment service.

Title String True

The title of the product variant.

RequiresComponents Bool True

Whether a product variant requires components. The default value is 'false'. If 'true', then the product variant can only be purchased as a parent bundle with components and it will be omitted from channels that don't support bundles.

UpdatedAt Datetime True

The date and time when the product variant was last modified.

CreatedAt Datetime True

The date and time when the variant was created.

SelectedOptions String True

List of product options applied to the variant.

AvailableForSale Bool True

Whether the product variant is available for sale.

Price Decimal False

The price of the product variant in the default shop currency.

CompareAtPrice Decimal False

The compare-at price of the variant in the default shop currency.

TaxCode String False

The tax code for the product variant.

Taxable Bool False

Whether a tax is charged when the product variant is sold.

SellableOnlineQuantity Int True

The total sellable quantity of the variant for online channels. This doesn't represent the total available inventory or capture (limitations based on customer location).

SellingPlanGroupsCount Int True

Count of selling plan groups associated with the product variant.

SellingPlanGroupsCountPrecision String True

The count's precision, or the exactness of the value.

DeliveryProfileId String True

A globally-unique identifier.

InventoryPolicy String False

Whether customers are allowed to place an order for the product variant when it's out of stock.

InventoryQuantity Int True

The total sellable quantity of the variant.

InventoryItemId String True

A globally-unique identifier.

InventoryItemUnitCostAmount Decimal False

Unit cost associated with the inventory item.

InventoryItemUnitCostCurrencyCode String True

Currency code of the unit cost associated with the inventory item.

InventoryItemHarmonizedSystemCode String False

The harmonized system code of the inventory item.

InventoryItemMeasurementWeightValue Double False

The weight value using the unit system specified with 'unit'.

InventoryItemMeasurementWeightUnit String False

The unit of measurement for 'value'.

InventoryItemRequiresShipping Bool False

Whether the inventory item requires shipping.

InventoryItemTracked Bool False

Whether inventory levels are tracked for the item.

ImageId String True

A unique identifier for the image.

ImageAltText String True

A word or phrase to share the nature or contents of an image.

ImageHeight Int True

The original height of the image in pixels. Returns 'null' if the image is not hosted by Shopify.

ImageWidth Int True

The original width of the image in pixels. Returns 'null' if the image is not hosted by Shopify.

ImageUrl String True

The location of the image as a URL.

UnitPriceMeasurementMeasuredType String True

The type of unit of measurement for the unit price measurement.

UnitPriceMeasurementQuantityUnit String True

The quantity unit for the unit price measurement.

UnitPriceMeasurementQuantityValue Double True

The quantity value for the unit price measurement.

UnitPriceMeasurementReferenceUnit String True

The reference unit for the unit price measurement.

UnitPriceMeasurementReferenceValue Int True

The reference value for the unit price measurement.

LocationInventoryQuantity Int True

Filters by the available inventory quantity of any variant at individual locations.

Pseudo-Columns

Pseudo-columns are fields that can only be used in the types of statements under which they are explicitly listed. They are not standard columns but instead provide additional functionality for specific operations.

Name Type Description
MediaId String

The ID of the media to associate with the variant.

MediaSrc String

The URL of the media to associate with the variant.

InventoryQuantities String

The inventory quantities at each location where the variant is stocked. The number of elements in the array of inventory quantities can't exceed the amount specified for the plan.

OptionValues String

The custom properties that a shop owner uses to define product variants.

Metafields String

The additional customizable information about the product variant.

Strategy String

The strategy defines which behavior is observed, such as whether to keep or delete the standalone variant (when product has only a single or default variant) when creating new variants. If set to 'DEFAULT', keep the standalone variant (when product has only a single or default variant) when creating variants. If set to 'REMOVE_STANDALONE_VARIANT', delete the standalone variant (when product has only a single or default variant) when creating new variants.

The allowed values are DEFAULT, REMOVE_STANDALONE_VARIANT.

AllowPartialUpdates Bool

When partial updates are allowed, valid variant changes may be persisted even if some of the variants updated have invalid data and cannot be persisted. When partial updates are not allowed, any error will prevent all variants from updating.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9440