Products – Simple Preview API

This API request allows you to submit an image (or images) that can be used by our system to render it into a product preview.

Asynchronous Previews

Preview generation is asynchronous by default. That means that the result you receive will contain a link to an image that will eventually exist at that URL. Given the amount of previews in our queue, the preview can take anywhere from 100 milliseconds to a few minutes.

Simple Preview API

Our ProductPreviewRequest endpoint takes a single argument which includes a JSON body that needs to contain the following parameters:

  • SKU - the SKU for the product
  • Images - an array of objects, each containing the following:
    • Image object with the following properties:
      • Url - the url of image
  • MaxWidth - optional - max width of the resultant image. Defaults to 500px and the max is 2000px. The value should only include the number and does not require "px".
  • MaxHeight - optional - max height of the resultant image. Defaults to 500px and the max is 2000px. The value should only include the number and does not require "px".

Please be sure to replace the recipeId with your proper ID from the Gooten Admin.

Single Print Space SKU example:

Below is an example of a product for a single space SKU. The SKU in this example only has one print space. For single space SKUs, you only need to add the Image URL.

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 response for this request will display the following:

{
   "Images": [
       {
           "Url": "https://s3.amazonaws.com/gooten-imgmanip/live/preview/f255af6f-9614-4fe2-aa8b-1b77b936d9d6/e6053790d55f3509d86126819e0355d3.png",
           "SpaceId": "4B120"
       }
   ],
   "HadError": false
}

Multi Print Space SKU example:

Below is an example of a product for a multi space SKU. The SKU in this example has multiple print spaces. For example, this could be for products that have a front and back print space.

For multi space SKUs, you need to add an image for each print space. Also, each image needs to be provided with a SpaceId and LayerId. You can get both of these values for your SKU by retrieving the template for the SKU using our product template API call.

    • SpaceId - used to determine which space to print on. For example, this is used to determine the front or back print spaces.
    • LayerId - used to determine which layer in the space that the image should be placed.

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 response for this request will display the following:

{
    "Images": [
        {
            "Url": "https://gtn-imgmanip-v2-cdn.azureedge.net/live/preview/2ffe88a1-c008-479e-8fa3-d9e4a6a0b3e2/0fdd70662d50ce97c2a5d0906f4a38b.png",
            "SpaceId": "6CB68"
        },
        {
            "Url": "https://gtn-imgmanip-v2-cdn.azureedge.net/live/preview/2ffe88a1-c008-479e-8fa3-d9e4a6a0b3e2/7ed06afeb545494c3b644e2dcfe957e.png",
            "SpaceId": "0D4D6"
        }
    ],
    "HadError": false
}