Measura API documentation · v1

Variant

Object

The Variant object contains detailed information about a product variant, including measurements and display settings.

Fields

Scroll horizontally to see all columns.

FieldTypeDescription
idstringShopify variant REST ID
isMeasuraEligiblebooleanWhether this variant is included by its owning product group. Excluded variants remain readable; do not treat them as measured variants when false.
fractionalInventoryRecord<string, { quantity: number }> (optional)Fractional stock remainder keyed by Shopify legacy numeric location ID. Present only when valid fractional stock metafields are available. Each location contains quantity, strictly between -1 and 1. These are stock-unit remainders, not total inventory or measured quantities; combine with Shopify integer stock before multiplying by unitMeasurement.value. Negative remainders are valid with upward rounding.
inventoryobject (optional)Only on Get specific variant when location_id is supplied. Other responses and the existing fractionalInventory map are unchanged.
inventory.locationIdstringRequested Shopify legacy numeric location ID.
inventory.trackedbooleanWhether Shopify tracks inventory for this item.
inventory.availableobject | nullNull for untracked items or when the item is not stocked at this location. Zero represents a real available balance.
inventory.available.quantitynumberMeasured available quantity: (Shopify available integer + owned fractional remainder) multiplied by unitMeasurement.value. Can be negative.
inventory.available.unitstringThe configured unitMeasurement.unit.
productProductOnly on the specific-variant endpoint: parent id and measurementType.
unitMeasurementMeasurementThe unit measurement information for this variant
settingsobject (optional)Variant-specific settings
settings.onlineStoreobject (optional)Online store display settings
settings.onlineStore.displayStyleOnlineStoreDisplayStyleHow the measurement input is displayed to customers
settings.onlineStore.rulesOnlineStoreRulesPurchase condition rules (only when displayStyle is "number")
settings.onlineStore.presetsarray of PresetOptionCustom presets (only when displayStyle is "pills" or "dropdown")
Related: This object is returned by the Get product with variants and Get specific variant endpoints. See the Measurement, OnlineStoreDisplayStyle, OnlineStoreRules, and PresetOption objects for details about nested fields.