Measura API documentation · v1
The Variant object contains detailed information about a product variant, including measurements and display settings.
Scroll horizontally to see all columns.
| Field | Type | Description |
|---|---|---|
id | string | Shopify variant REST ID |
isMeasuraEligible | boolean | Whether this variant is included by its owning product group. Excluded variants remain readable; do not treat them as measured variants when false. |
fractionalInventory | Record<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. |
inventory | object (optional) | Only on Get specific variant when location_id is supplied. Other responses and the existing fractionalInventory map are unchanged. |
inventory.locationId | string | Requested Shopify legacy numeric location ID. |
inventory.tracked | boolean | Whether Shopify tracks inventory for this item. |
inventory.available | object | null | Null for untracked items or when the item is not stocked at this location. Zero represents a real available balance. |
inventory.available.quantity | number | Measured available quantity: (Shopify available integer + owned fractional remainder) multiplied by unitMeasurement.value. Can be negative. |
inventory.available.unit | string | The configured unitMeasurement.unit. |
product | Product | Only on the specific-variant endpoint: parent id and measurementType. |
unitMeasurement | Measurement | The unit measurement information for this variant |
settings | object (optional) | Variant-specific settings |
settings.onlineStore | object (optional) | Online store display settings |
settings.onlineStore.displayStyle | OnlineStoreDisplayStyle | How the measurement input is displayed to customers |
settings.onlineStore.rules | OnlineStoreRules | Purchase condition rules (only when displayStyle is "number") |
settings.onlineStore.presets | array of PresetOption | Custom presets (only when displayStyle is "pills" or "dropdown") |