Requires read_product access scope. More access scope
The Variant Details 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.
Additional details about the variant's dimensions or origin.
variant.extend.length
number
10
length
variant.extend.width
number
10
width
variant.extend.height
number
10
height
variant.extend.dimension_unit
string
"in"
dimension_unit
variant.extend.origin_country_code
string
"AS"
Country of origin code of the product.
variant.extend.hs_code
string
"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
422
Variant Not Found
The variant ID provided in the request does not exist.
{ "errors": ["Record not found"] }
Invalid or empty variant_id
missing required variant_id or variant_id with incorrect UUID types
{ "errors": [ "variant_id has an invalid UUID"]}
API Structure Overview
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!