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 CPP, 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 imagery. ...
    • 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 ...
    • Galleries and Print on Demand Apps

      You can Create your own Galleries for use with Product Personalisation Apps and Print on Demand Products If you upload any images you are going to use for a Print on Demand product to a Gallery then when sending an order for a Print on Demand product ...
    • Retailer Integration: Printify API

      Printify can pass order directly in to OMS via their own API endpoint.  All that is required is a company hierarchy set up and the products to be set up in CPP with the correct SKU or varinet SKU, that is to be passed. The API uses multi external ...
    • External Pricing API (EPA)