Get product variation

Get a specific product variation details referring to its ID.

Access scopes

Requires the following access scope: read_catalog

Query parameters

FieldTypeDescription
langstringPreferred language for the product fields in search results. If a certain field does not have the translation available for the set language, the default language text will be used for that field

Response

An array of JSON objects with the following fields:

FieldTypeDescription
idnumberVariation ID
combinationNumbernumberCombination # number, which is displayed in the variations table in Control panel
optionsArray<OptionValue>Set of options that identifies this variation. An array of name-value pairs
skustringVariation SKU. Omitted if the variation inherits the base product's SKU
thumbnailUrlstringURL of the product variation thumbnail displayed on the product list pages. Thumbnails size is defined in the store settings. Default size of biggest dimension is 400px. Omitted if the variation inherits the base product's image. The original uploaded product image is available in the originalImageUrl field.
imageUrlstringURL of the product variation image resized to fit 1500x1500px. Omitted if the variation inherits the base product's image. The original uploaded product image is available in the originalImageUrl field.
smallThumbnailUrlstringURL of the product variation thumbnail resized to fit 160x160px. Omitted if the variation inherits the base product's image. The original uploaded product image is available in the originalImageUrl field.
hdThumbnailUrlstringProduct variation HD thumbnail URL resized to fit 800x800px. Omitted if the variation inherits the base product's image.
originalImageUrlstringURL of the original not resized product variation image. Omitted if the variation inherits the base product's image.
imageExternalIdstringImage ID for Lightspeed R-Series/X-Series image sync. Read-only
quantitynumberAmount of the variation items in stock. If sku is omitted, then quantity of the variation is nested from base product. If sku is present, the variation has its own quantity value.
inStockbooleantrue if the variation is in stock (quantity is more than zero) or has unlimited quantity. false otherwise.
unlimitedbooleantrue if the variation has unlimited stock (that is, never runs out)
pricenumberVariation price. Omitted if the variation inherits the base product's price
isShippingRequiredbooleantrue if variation requires shipping, false otherwise
wholesalePricesArray<WholesalePrice>Sorted array of the variation's wholesale price tiers (quantity limit and price). Omitted if the variation inherits the base product's tiered price settings.
weightnumberVariation weight in the units defined in store settings. Omitted if the variation inherits the base product's weight.
warningLimitnumberThe minimum 'warning' amount of the product items in stock for this variation, if set. When the variation in stock amount reaches this level, the store administrator gets an email notification. Omitted if the variation inherits the base product's settings
attributesArray<AttributeValue>Variation's UPC attribute and its value
defaultDisplayedPricenumberProduct price displayed in a storefront for logged out customer for default location (store location). May differ from the price value when the product has options and variations and the default variation's price is different from the base product price. It also includes taxes
defaultDisplayedPriceFormattednumberFormatted displayed price
dimensions<VariationDimensions>Variation dimensions info
compareToPricenumberVariation's sale price displayed strike-out in the customer frontend Omitted if empty
costPricenumberPurchase price (the price at which the seller bought the product from the supplier). A positive number, 0 by default. The field is not shown in the UI and can be used for reports and profit calculations
customsHsTariffCodestringProduct code for customs reference. Omitted if empty
externalReferenceIdstringExternal ID for products synced from external services (e.g. POS)
minPurchaseQuantitynumberSets minimum product variation purchase quantity. Default value is taken from a base product. Not visible if the value is not assigned.
maxPurchaseQuantitynumberSets maximum product variation purchase quantity. Default value is taken from a base product. Not visible if the value is not assigned.
lowestPricenumberValue of the product's "Lowest price" used for promotions. This value matches with the one displayed in Ecwid admin.
defaultDisplayedLowestPricenumberValue of the lowest product price with applied taxes (lowestPrice + tax). Matches with the lowest product price displayed on the storefront.
defaultDisplayedLowestPriceFormattedstringFormatted lowest price displayed on the storefront (defaultDisplayedLowestPrice). Uses store formatting settings.

Example: "defaultDisplayedLowestPrice": 45 => "defaultDisplayedLowestPriceFormatted": "45.00".
outOfStockVisibilityBehaviourstringIndicates whether an out of stock product should visible or not. One of: SHOW, HIDE, ALLOW_PREORDER.

OptionValue

FieldTypeDescription
namestringOption name
nameTranslated<Translations>Available translations for product option name
valuestringOption value
valueTranslated<Translations>Available translations for product option value

Translations

Object with text field translations in the "lang": "text" format, where the "lang" is an ISO 639-1 language code. Example:

{
    "en": "Sample text",
    "nl": "Voorbeeldtekst"
}

Translations for each available language. If no other translations are provided, the default language translations is returned. See available languages in store language settings.

WholesalePrice

FieldTypeDescription
quantitynumberNumber of product items on this wholesale tier
pricenumberProduct price on the tier

AttributeValue

FieldTypeDescription
idnumberUnique attribute ID. See Product Classes for the information on attribute IDs
namestringAttribute displayed name
valuestringAttribute value
typestringAttribute type. There are user-defined attributes, general attributes and special 'price per unit’ attributes. The 'type’ field contains one of the following: CUSTOM, UPC, BRAND, GENDER, AGE_GROUP, COLOR, SIZE, PRICE_PER_UNIT, UNITS_IN_PRODUCT
showstringDefines where to display the product attribute value:. Supported values: NOTSHOW, DESCR, PRICE

VariationDimensions

FieldTypeDescription
lengthnumberLength of a variation
widthnumberWidth of a variation
heightnumberHeight of a variation

Errors

In case of error, Ecwid responds with an error HTTP status code

HTTP codes

HTTP StatusMeaning
400Request parameters are malformed
402The "Product Variations" feature are not available on the merchant plan
404The variation is not found. Code: COMBINATION_NOT_FOUND
415Unsupported content-type: expected application/json or text/json
500Cannot get the variation because of an error on the server
Language
Click Try It! to start a request and see the response here!