get
https://{subdomain}.myshoplaza.com/openapi/2025-06/variants/
Retrieve a product variant by its ID.
Requiresread_productaccess 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:
- Fetch pricing, inventory, and other details for a specific variant.
- Support detailed product management by accessing individual variant data.
Request Parameters
Public Request Parameters
Path Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
variant_id | string | Yes | Unique identifier of the variant | "var_123456789" |
Response Explanation
Public Response Parameters
Successful Response
| Parameter | Type | Example | Description |
|---|---|---|---|
code | string | "200" | HTTP status code |
message | string | "Success" | Operation result message |
data.variant | array of objects | - |
Variant Object
| Parameter | Type | Example | Description |
|---|---|---|---|
id | string | "var_987654321" | Unique variant identifier |
product_id | string | "prod_123456789" | Parent product ID |
image_id | string | "img_456789" | Primary image reference |
created_at | string | "2025-01-15T09:00:00Z" | Creation timestamp |
updated_at | string | "2025-06-15T14:30:00Z" | Last update timestamp |
title | string | "Large / Black" | Variant display title |
option1 | string | "Black" | First option value |
option2 | string | "Large" | Second option value |
option3 | string | "" | Third option value |
image | object | - | Variant image details |
image.src | string | "https://example. com/image.jpg" | Image URL |
image.width | int32 | 800 | Image width in pixels |
image.height | int32 | 600 | Image height in pixels |
image.alt | string | "Black variant" | Image alt text |
image.path | string | "/images/variants" | Image storage path |
position | string | "1" | Display position |
compare_at_price | float | 199.99 | Original/comparison price |
price | float | 149.99 | Current selling price |
sku | string | "SKU123-BLK-L" | Stock keeping unit |
barcode | string | "123456789012" | Product barcode |
note | string | "New stock" | Internal notes |
inventory_quantity | string | "50" | Current stock level |
weight | float | 0.75 | Product weight |
weight_unit | string | "kg" | Weight measurement unit |
cost_price | float | 89.99 | Cost/production price |
whole_prices | array of objects | - | Wholesale pricing tiers |
whole_prices.price | float | 129.99 | Wholesale price |
whole_prices. min_quantity | string | "10" | Minimum order quantity |
retail_price | float | 149.99 | Retail price |
is_discount | boolean | true | Discount status flag |
origin_price | float | 179.99 | Original base price |
Error Response
| Field | Type | Example | Description |
|---|---|---|---|
code | string | InvalidParameter | Error http message |
message | string | `` | Error message |
