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 these parameters:

  • productId - required - ID of the product
  • countryCode - required - the 2 character (ISO 3166-1 alpha-2) country code that the user is interested in shipping to
  • currencyCode - optional - By default, it will be set to “USD” and this is the currency in which the prices will be represented
  • all - optional By default, it will be set to false. This is used to determine whether to return all the products that are orderable in the user’s region, or to only return products that you have 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"
        }
      ]
    }
  ]
}