Get Variant

Retrieve a product variant by its ID.

🔒

Requires read_product access scope. More access scope

The Get Variant API allows you to retrieve detailed information about a specific product variant. Variants represent specific configurations of a product, such as different sizes, colors, or styles. This endpoint requires a valid variant_id and provides detailed data about the variant, including its pricing, inventory, SKU, and other attributes. Use this API to fetch information for managing or displaying specific variants in your system.This API is especially useful for:

  1. Fetch pricing, inventory, and other details for a specific variant.
  2. Support detailed product management by accessing individual variant data.

Request Parameters

Public Request Parameters

📘

Path Parameters

ParameterTypeRequiredDescriptionExample
variant_idstringYesUnique identifier of the variant"var_123456789"

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring"200"HTTP status code
messagestring"Success"Operation result message
data.variantarray of objects-

Variant Object

ParameterTypeExampleDescription
idstring"var_987654321"Unique variant identifier
product_idstring"prod_123456789"Parent product ID
image_idstring"img_456789"Primary image reference
created_atstring"2025-01-15T09:00:00Z"Creation timestamp
updated_atstring"2025-06-15T14:30:00Z"Last update timestamp
titlestring"Large / Black"Variant display title
option1string"Black"First option value
option2string"Large"Second option value
option3string""Third option value
imageobject-Variant image details
image.srcstring"https://example. com/image.jpg"Image URL
image.widthint32800Image width in pixels
image.heightint32600Image height in pixels
image.altstring"Black variant"Image alt text
image.pathstring"/images/variants"Image storage path
positionstring"1"Display position
compare_at_pricefloat199.99Original/comparison price
pricefloat149.99Current selling price
skustring"SKU123-BLK-L"Stock keeping unit
barcodestring"123456789012"Product barcode
notestring"New stock"Internal notes
inventory_quantitystring"50"Current stock level
weightfloat0.75Product weight
weight_unitstring"kg"Weight measurement unit
cost_pricefloat89.99Cost/production price
whole_pricesarray of objects-Wholesale pricing tiers
whole_prices.pricefloat129.99Wholesale price
whole_prices. min_quantitystring"10"Minimum order quantity
retail_pricefloat149.99Retail price
is_discountbooleantrueDiscount status flag
origin_pricefloat179.99Original base price

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!