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
  • compression - optional - a boolean that tells Gooten API to compress the response and reduce the payload size
  • pageSize - optional - how many items to return in response
  • page - optional - page number, how many items to skip

Each API request to the Gooten API must have the RecipeID parameter included in the URL. This is typically used to authenticate to the Gooten API. Please be sure to replace the YourRecipeID in the example with your proper RecipeID from the Gooten Admin.

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"
        }
      ]
    }
  ]
}