Getting Product Preview Image

Submit an image (or images) to be rendered into a product preview.

It takes a single argument - ProductPreviewRequest - which is a 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

Example:

This request yields following response:

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

Next Topic: Order Status Webhooks