get
https://{subdomain}.myshoplaza.com/openapi/2025-06/products//variants
Retrieve a list of all variants for a specific product.
Requiresread_productaccess scope. More access scope
The Variant List API retrieves a list of variants associated with a specified product. By providing a valid product_id in the path parameter, users can fetch detailed information about the variants linked to a particular product. Ensure the product_id is valid and properly formatted as a UUID to avoid errors.This API is especially useful for:
- Retrieve all variants of a specific product to display options such as size, color, or other attributes.
- Fetch variant details to support inventory and pricing management.
Request Parameters
Public Request Parameters
Path Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
product_id | string | Yes | Unique identifier of the product | "prod_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.variants | array of objects | - | List of product variants |
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 |
