Requires read_product access 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.
Additional details about the variant's dimensions or origin.
variants[ ].extend.length
number
No
10
length
variants[ ].extend.width
number
No
10
width
variants[ ].extend.height
number
No
10
height
variants[ ].extend.dimension_unit
string
No
"in"
dimension_unit
variants[ ].extend.origin_country_code
string
No
"AS"
Country of origin code of the product.
variants[ ].extend.hs_code
string
No
"6211439"
HS codes are the international standard for commodity classification, and Shoplazza can automatically generate HS codes based on commodity information.
Error Response
Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field
Type
Example
Description
errors
Array
["Context"]
A list of errors encountered during the request processing.
Field
Type
Example
Description
error
Array
"store is not active"
Indicates an error encountered during the process.
Error Details
Status Code
Message
Possible Reason
Example Response
400
Bad Request
Invalid input format or request structure (e.g., missing required fields or incorrect data types).
Bad Request
Unauthorized
The request is missing valid authentication credentials or the credentials provided are invalid.
Unauthorized
404
Product Not Found
The product ID provided in the request does not exist.
{ "errors": ["Product not found"] }
422
Invalid or empty product_id
missing required product_id or product_id with incorrect UUID types
{ "errors": [ "productId has an invalid UUID"]}
API Structure Overview
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!