# Visuals/UPA Elements

## Visuals/UPA Elements

### Media Elements

Airlines may provide visual and textual content. Each Visual/UPA may include:
- Photos/Graphics
- Videos
- Virtual Tours
- Icons (legacy, not recommended)

Text elements returned include: headline, description, caption, and alt text.

Translations can be requested with the `Accept-Language` header (ISO 639-1).

#### Photos and Graphics

Each Visual (UPA) may include one or more photo or graphic assets. These are provided as Content Delivery Network (CDN)-hosted URLs in different sizes so you can display them appropriately across devices and layouts.

| Field                    | Size / Use Case                     |
|--------------------------|-------------------------------------|
| `PHOTO_THUMB_URL`        | 150Ã—150 px, thumbnail               |
| `PHOTO_MEDIUM_SQUARE_URL`| 350Ã—350 px, summary views           |
| `PHOTO_LARGE_URL`        | 800Ã—600 px max, detailed views      |
| `PHOTO_URL`              | Original full-resolution            |

**Tip**: Always scale images proportionally if you need to resize them. Do not crop images, as airlines design and frame these assets intentionally.

#### Photo Types:

- Marketing Graphic -- static service depiction
- Inforgraphic -- simplified information graphic
- Photo -- high-quality, airline-provided image

Sample response: 
```
"photos": [
  {
    "caption": "Board and deplane more quickly with an aisle or window seat in the front of Main Cabin.",
    "thumb_url": "https://upamedia.atpco.net/photos/ed2ceaae-3c84-4e67-b707-e0de2bf9ab82/square_thumb/t3d-b737-mc-a01-5044-v01-20220918.jpg?channel_id=ATPCO",
    "medium_square_url": "https://upamedia.atpco.net/photos/ed2ceaae-3c84-4e67-b707-e0de2bf9ab82/large_square_thumb/t3d-b737-mc-a01-5044-v01-20220918.jpg?channel_id=ATPCO",
    "large_url": "https://upamedia.atpco.net/photos/ed2ceaae-3c84-4e67-b707-e0de2bf9ab82/large/t3d-b737-mc-a01-5044-v01-20220918.jpg?channel_id=ATPCO",
    "url": "https://upamedia.atpco.net/photos/ed2ceaae-3c84-4e67-b707-e0de2bf9ab82/t3d-b737-mc-a01-5044-v01-20220918.jpg?channel_id=ATPCO"
  }
]
```

#### Virtual Tours(360Â°)

Virtual Tours are immersive 360Â° experiences that allow flight shoppers to explore aircraft cabins. These tours are hosted by third parties, and the Routehappy API provides the links needed for embedding.

#### Requesting Virtual Tours

- Tours are included by default when requesting Visuals (Upas).
- You can control their inclusion using the `disable_upa_tour` flag in the request payload.
- When using `disable_upa_tour`, Visuals will still be included in the response but the Virtual Tour URLs will be excluded

```
{
  "control": {
    "includes": ["upa"],
    "disable_upa_tour": false   // set to true to omit tours
  }
}
```

#### Tour Attributes:

| Field                     | Description                                      |
|---------------------------|--------------------------------------------------|
| `caption`                | Short caption for the tour                       |
| `image_thumb_url`        | 150Ã—150 px thumbnail preview                    |
| `image_medium_square_url`| 350Ã—350 px preview image                        |
| `embed_url`              | URL used to generate the embedded tour player   |

#### Embedding Guidelines

- Embed tours using an HTML5 `<object>` element when possible, as itâ€™s the preferred modern approach. `<iframe> `elements may be used for specific use cases
- Tours are lightweight and responsive â€” suitable for desktop and mobile.
- Best displayed alongside seat maps or detailed cabin information.
- ATPCO can provide best practices and sample integrations on request.

Example:

```
"tours": [
  {
    "caption": "Step Inside Deltaâ€™s A330-900neo",
    "thumb_url": "https://upamedia.atpco.net/tours/a09a2503-d3e9-4680-9989-64f6a00f00fa/large_square_thumb/text-thumbnail.jpg?channel_id=ATPCO",
    "medium_square_url": "https://upamedia.atpco.net/tours/a09a2503-d3e9-4680-9989-64f6a00f00fa/square_thumb/text-thumbnail.jpg?channel_id=ATPCO",
    "embed_url": "https://atpco.3dseatmapvr.com/clients/dl/a330_900_config1/economy/index.html?channel_id=ATPCO"
  }
]
```

<iframe
  src="https://atpco.3dseatmapvr.com/clients/dl/a330_900_config1/economy/index.html?channel_id=ATPCO"
  width="100%"
  height="500"
  title="Virtual tour"
></iframe>

#### Videos

Some Visuals (UPAs) include branded promotional videos, such as airline service overviews or previews of in-flight entertainment. The Routehappy API provides fields to support embedding and displaying these videos.

#### Requesting Videos

Videos are included by default when requesting Visuals (UPAs).
You can control their inclusion using the `disable_upa_video` flag in the request payload.

When using `disable_upa_video`, Visual will still be included in the response, but video URLs will be excluded.

#### Video Attributes

| Field                          | Description                                                                 |
|-------------------------------|-----------------------------------------------------------------------------|
| `VIDEO_IMAGE_THUMB_URL`       | 150Ã—150 px thumbnail, suitable for compact previews                        |
| `VIDEO_IMAGE_MEDIUM_SQUARE_URL` | 350Ã—350 px preview image, for summaries or listing views                  |
| `VIDEO_EMBED_URL`             | The URL of the airline-provided branded video. Use this value to embed or stream the video in your application |


#### Icons (Legacy)

Each Visual (UPA) may include two icon fields:

| Field             | Description                          |
|------------------|--------------------------------------|
| `small_icon_url` | URL for a 42Ã—42 px icon (legacy)     |
| `large_icon_url` | URL for an 84Ã—84 px icon (legacy)    |


Sample response:

```
"small_icon_url": "https://upamedia.atpco.net/icons/9e51dec1-700b-4de2-89b1-4550735972ea/small/business-elite-seat.png?channel_id=ATPCO",
"large_icon_url": "https://upamedia.atpco.net/icons/9e51dec1-700b-4de2-89b1-4550735972ea/large/business-elite-seat.png?channel_id=ATPCO"
```

Important: These icons are remnants of an earlier version of the UPA API.
ATPCO strongly recommends not relying on icons for new integrations. Instead, pair textual content (headline, description, caption) with rich media assets (photos, videos, tours) for a more rich and engaging experience.

The `small_icon_url` and `large_icon_url` fields are still returned in API responses. However, they should be ignored in modern integrations.

### Text Elements

Each Visual (UPA) includes up to four text fields. These provide context and description to accompany photos, videos, or tours.

#### Headline

A short, attention-grabbing title. Best for highlighting the key feature at a glance.

#### Description

A fuller explanation of the feature or service. Recommended for use when only one text field can be shown.

#### Caption

A short line of text tied directly to a specific media asset (e.g., describing what is shown in each photo in a given Visual). This is the most descriptive text field offered. For instance, a Visual that contains 3 separate images will also contain 3 separate Captions).

#### Alt text

Accessibility text that describes the visual media for users who cannot see the image or video.

ATPCO recommends always displaying **both headline and description/caption together**. If only one is possible, use **description/caption**.

#### Text Field Character Limits

| Field       | English Limit     | Non-English Limit     |
|-------------|-------------------|------------------------|
| Headline    | 40 characters      | 70 characters          |
| Description | 140 characters     | 220 characters         |
| Caption     | 140 characters     | 220 characters         |
| Alt text    | 140 characters     | 140 characters         |

To include alt text in the response, enable the feature in the request:

```
"control": {
  "features": ["upa_photo_alt_text"]
}
```

Example response:

```
{
  "headline": "Choose a Preferred seat",
  "description": "Board and deplane more quickly with an aisle or window seat in the front of Main Cabin.",
  "photos": [
    { "caption": "Board and deplane more quickly with an aisle or window seat in the front of Main Cabin." }
  ]
}
```
Notes

- Description and Caption are separated fields in the data model, but in most cases today they contain the same text. This is due to content sourcing practices and helps ensure consistency across display contexts.
- Other text fields exist in the UPA response (e.g., attribute description, Call to Action (CTA) text, CTA URL), but these are most often empty in current data.

#### Markdown Text Fields

For airline direct channel use cases, the UPA response can optionally include Markdown-formatted text fields. These allow richer formatting than plain text and are useful for enhanced UI rendering.

Available Markdown Fields

- `description_md` â€“ Markdown-formatted version of the UPA description (up to 450 characters).
- `caption_md` â€“ Markdown-formatted version of the UPA caption (up to 450 characters).

These fields support Markdown syntax such as **bold**, _italics_, headings, lists, and spacing.

Enabling Markdown Fields

To receive Markdown-formatted text in the response, enable the feature in your request:

```{
  "control": {
    "features": ["markdown_text"]
  }
}
```

Sample Response:

```
{
  "description": "Economy seats are best-in-class with the Recaro 3620 model...",
  "description_md": "**Economy** seats are best-in-class with the Recaro 3620 model..."
}
```

The `description_md` and `caption_md` fields contain Markdown-formatted text and must be rendered as formatted HTML in the sales channel frontend.

#### Language Support

By default, all text fields in Visuals (UPAs) are returned in English (en).
To request a different language, include the standard `Accept-Language` HTTP header in your request.

- Use an ISO 639-1 two-letter code or 2-alpha code language with region-specific code (for example, `en-UK`).
- If no translation is available for the requested language, the API will revert to English.

Example request with header:
```
--header "Accept-Language: fr"
```
