> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/perso-design-services/implement-allaboutme-and-sketchmycard-b2c/integrate-designer-tool/advanced-image-api/integrate-digital-previews-of-card-designs.md).

# Integrate Digital Previews of Card Designs

## What is the Image API?

The **Image API** is a feature that leverages the imaging technology built within the Perso Design Services platform to securely deliver image previews of card designs in the format requested by issuers. The key use case is for any scenario that requires a digital version of a card to be displayed, for example in the web or mobile banking app or emails/statements for a more personalized experience.

## Integrating the Image API

The **Image API** is a powerful rest API web front end complemented with the relevant settings and configurations within the Perso Design Services Administration Dashboard.

### How it Works

The Web API is a restful service which exposes the means to download images from the Platform. Query string parameters are used to decide on the output.

Image identification can be done in one of two ways, using the CardImageId or using a single data capture parameter. The API URL changes slightly for each of these options.

Should a design template be required to be downloaded without any background image, a different URL is used for this.

#### URLs

API URLs will be provided by your Thales contact during onboarding.

#### Request Parameters

* `ImageDeliveryKey`: This value identifies the caller and is matched to the Service Aggregator. This guarantees that the caller should have access to the CardImageID. Thales will provide the Aggregator with the value for this parameter. Also note that a different value will be used on each environment.
* `CardImageID`: The unique identifier for the image being requested. This is generated by the Designer Tool and passed to the Subscriber during the Handback procedure.
* `ImageDeliveryKey`: Auth key from Perso Design Services Administration Dashboard.
* `CardImageId`: Card image ID of requested image.
* `SearchField` (mandatory only for DC Search): The DataCapture field where the search is going to be conducted.
* `DesignType` (optional): Print, Review, DesignwithTemplate, Design, Original (only for the custom image) - If not passed, returns Print.
* `TemplateType`: Print, Design, VCDesign - mandatory for GetTemplate. Optional for GetImage - If not passed, returns the Print without template.
* `Overlay` (optional): True, False, if not passed, returns as it is. (Check the `GetPublicDesign` overlay functionality).
* `DesignRotate` (optional): `Rotate0`, `Rotate90`, `Rotote180`, `Rotate270` , if not passed, returns as it is.
* `Corner` (optional): Round, Square, if not passed, returns round.
* `Width` (optional): it should go with least aspect ratio, if not passed, returns the print/design/vcprint/vcdesign size as requested.
* `Height` (optional): it should go with least aspect ratio - if not passed, returns the print/design/vcprint/vcdesign size as requested.
* `ImageFormat` (optional): PNG, JPEG - if not passed, returns JPEG. If request is GetTemplate, return as PNG.
* `HandoverKey` - only for template API request.

#### Error Codes

* `400`
  * Invalid Search Field
  * Invalid Card Image Id
  * Invalid Parameter
  * Invalid Delivery Image Key
* `404`
  * Design Not Found
* `500`
  * Invalid Overlay
  * Invalid Design Image Type
  * Invalid Hand Over Key
  * Invalid Template Type
  * Invalid Image Format
  * Invalid Corner

#### Configuration of Virtual Card Design Template

Configuring the Virtual Card Design Template is done during product setup via the Perso Design Services Administration Dashboard. Here you can upload the Virtual Card Design Template that will be applied to the image when requesting an image with the Image API.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payments.thalescloud.io/perso-design-services/implement-allaboutme-and-sketchmycard-b2c/integrate-designer-tool/advanced-image-api/integrate-digital-previews-of-card-designs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
