API Documentation
Products - List of Product Variants
It’s easy to get a list of available Product Variants
(SKUs
) for a product, after you have obtained the product’s ID from our products
endpoint.
Selection of a SKU
Different SKUs can be available for different regions. For instance, in US, our canvas wrap SKUs are based on inch formats, while in Europe, those SKUs are based on centimeter formats. This results in different SKUs.
The important point here is that you want to show the US SKU to someone from US, and the European SKU for the person in Europe. This is why getting (and setting) the user’s country is so crucial.
The GET productvariants
endpoint takes 5 parameters:
productId
- required - ID of the ProductcountryCode
- required - the 2 character (ISO 3166-1 alpha-2) country code that the user is interested in shipping tocurrencyCode
- optional, defaults to “USD” - the currency in which the prices will be representedlanguageCode
- optional, defaults to “en” - the language to have product data returned inall
- optional, defaults tofalse
- whether to return all the products that are orderable in the user’s region, or to only return products the user has set up in the product settings page.
This request yields the following response:
{
"ProductVariants": [
{
"Sku": "string",
"MaxImages": "integer",
"HasTemplates": "boolean",
"Options": [
{
"OptionId": "string",
"ValueId": "string",
"Name": "string",
"Value": "string",
"ImageUrl": "string",
"ImageType": "string",
"RgbaColor": "string",
"CmValue": "string",
"SortValue": "string"
}
],
"PriceInfo": "PriceInfo",
"PartnerPriceInfo": "PriceInfo"
}
],
"Options": [
{
"Name": "string",
"Values": [
{
"OptionId": "string",
"ValueId": "string",
"Name": "string",
"Value": "string",
"ImageUrl": "string",
"ImageType": "string",
"RgbaColor": "string",
"CmValue": "string",
"SortValue": "string"
}
]
}
]
}