API Documentation

Getting Product Preview Image

Submit an image (or images) to be rendered 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.

We offer synchronous preview generation to some partners. To see if you qualify, or to speak to someone in sales about buying access, you can contact partnersupport@gooten.com.

Product Mockup API

Our endpoint takes a single argument - ProductPreviewRequest - which is JSON that needs to contain the following data:

  • SKU - SKU of product
  • Template - template name of product
  • Images - array of objects, each containing the following:
    • LayerId - id of the layer that the image belongs to (String)
    • Image object with the following properties:
      • Url - url of image
      • MaxFit - fit image to area true/false
      • X1 - left coordinate of image
      • X2 - right coordinate of image
      • Y1 - top coordinate of image
      • Y2- bottom coordinate of image
  • MaxWidth - (optional) max width of the resultant image. Defaults to 500px
  • MaxHeight - (optional) max height of the resultant image. Defaults to 500px

This request yields following response:

{
  "Images":[{
    "Url": "https://gtnimgmanipcdn.azureedge.net/img-manip/195b31e2529f37eb00fa586773bccccc.png"
    }],
  "HadError": false
}

Multi-Image Product Mockup Example

Here is an example request JSON for when you need to submit a preview for an item with multiple spaces and layers; here we do so in order to create mockup images for left and right sandals:

{
    "SKU": "FlipFlops-105x425-AdultMedium-Black",
    "Template": "Single",
    "Images": [
        {
            "LayerId": "6BF6A",
            "SpaceId": "BE948",
            "Image": {
                "Url": "http://threesheetsnw.com/files/2012/11/giant_pacific_octopus.jpg",
                "MaxFit": "true"
            }
        },
        {
            "LayerId": "BF6A33",
            "SpaceId": "0BE19",
            "Image": {
                "Url": "http://threesheetsnw.com/files/2012/11/giant_pacific_octopus.jpg",
                "MaxFit": "true"
            }
        }
    ]
}

And the response looks like:

{
    "Images": [
        {
            "Url": "https://gtnimgmanipcdn.azureedge.net/img-manip/0478bdf88aef61cce464f914499009f2.png",
            "SpaceId": "BE948"
        },
        {
            "Url": "https://gtnimgmanipcdn.azureedge.net/img-manip/e0ee0f3f8fe96656568a1be8d82e50c1.png",
            "SpaceId": "0BE19"
        }
    ],
    "HadError": false
}