External Galleries API

External Galleries API

Overview

This page is aimed at developers who wish to use the external gallery feature of our Personalise-iT Personalisation apps to allow the user to use images that are hosted on a 3rd party website.

JSONP is necessary to enable cross-domain communication between the Personalise-iT app iframe and the external website.

Note that any images that you expose must be available publicly. Artwork generation will fail if your image URLs suddenly become invalid.


API

To enable a Personalise-iT app to pull images from an external source, a JSONP API must first be created.

The API must return the following JSON structure:

FieldTypeDescription
imagesarrayAn array of image objects

Image Object

FieldTypeDescription
namestringA short description of the image
thumbnail_urlstringAn absolute URL to a thumbnail of the image.
image_urlstringAn absolute URL to the full sized version of the image (used for artwork generation).
preview_urlstringAn absolute URL to a smaller or lower quality version of the image (used only for the onscreen product preview).

An Example JSON Object

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
	"images": [
	{
			"name": "Apple",
			"thumbnail_url": "https://example.com/thumbnails/apple.png",
			"image_url": "https://example.com/apple.png",
			"preview_url": "https://example.com/apple-preview.png"
		},
		
		{
			"name": "Pear",
			"thumbnail_url": "https://example.com/thumbnails/pear.png",
			"image_url": "https://example.com/pear.png",
			"preview_url": "https://example.com/pear-preview.png"
		}
	]
}

An Example JSONP Response

1
callback({ "images": [ ... ] });


Personalise-iT App Setup

It is necessary to tell the Personalise-iT personalisation app to use your API as an external source for images. This can be done by passing the URL for your API to the app iframe via the g URL parameter. For example:

    • Related Articles

    • Settings | Creating Image Galleries

      Overview An Image gallery is a folder of image files stored on the Platform, that can be associated with one or multiple products. Galleries allow the end user to choose the design / image to customise the product based on the preset range of gallery ...
    • Vector | Linking Vector Galleries to Virtual Products

      Overview The fastest and simplest way to add a range of selectable vector designs to your Virtual Product is via a restricted Image Area.  Important Note: This article is written on the presumption that the user has a general understanding of Blank ...
    • Product Integration | Generic API

      Introduction This article has been created to show how to setup the Product integration Kornit X has built to connect to Generic API.  Setup To setup the Generic API integration, please head to your category and within and within the advanced ...
    • External Pricing API (EPA)

    • Red Bubble API

      Red Bubble is an eCommerce artist portal that hosts millions of artwork designs by independent artists from all around the world. The artwork is available for purchase, on demand, printed on anything from clothing & apparel to home decor & ...