# Media overview

The Media guides cover how an Application adds media to a Place in Aryeo, organizes it, and delivers it to the Job's customers.

A Place's media is organized into five Sections: Photos, Videos, Floor Plans, Interactive Content, and Files (documents such as PDFs). Subsections organize a Section further, such as a Kitchen Subsection under Photos. Subsections are optional: media that is not filed anywhere else lands in the Section's default Subsection.

Media comes into Aryeo in one of two forms:

- **A File** holds bytes that Aryeo stores and serves, such as a photo, a video or a PDF. The Application does not upload the bytes. It gives Aryeo a publicly accessible URL with a File Ingest Intent, and Aryeo retrieves the file in the background.
- **A Link** is a URL that stays hosted somewhere else, such as a hosted video or a virtual tour URL. Aryeo stores the URL and never fetches it.


Creating a File or a Link does not put it on a Place. Once it exists, a **Place Asset** places it. The Place Asset records which Section and Subsection the media sits in, its position and title, and whether Property Websites show it.

## How it fits together

```mermaid
flowchart TD
  J["`**Job**`"] --> P["`**Place**
  *123 Main St*`"]
  P --> S1["`**Section**
  *Photos*`"]
  P --> S2["`**Section**
  *Videos*`"]
  S1 --> SS1["`**Subsection**
  *Photos (default)*`"]
  S1 --> SS2["`**Subsection**
  *Kitchen*`"]
  S2 --> SS3["`**Subsection**
  *Videos (default)*`"]
  SS3 --> PA1["`**Place Asset**
  *File: drone-tour.mp4*`"]
  SS3 --> PA2["`**Place Asset**
  *Link: virtual tour URL*`"]
```

Each Job has at most one Place: the property itself. The Place's media is grouped into Sections, each Section is divided into Subsections, and each piece of media sits in one Subsection as a Place Asset.

A Place Asset is how a File or Link appears on a Place. The File or Link is the media itself, and it belongs to the company rather than to any one Place. The Place Asset holds everything about how that media is shown on this Place:

| Belongs to the File or Link | Belongs to the Place Asset |
|  --- | --- |
| the bytes, or the URL | which Subsection it sits in, and its position there |
| `filename`, `type`, `mime_type` | its display `title` |
| the signed download URL | whether Property Websites show it, and which variants |
|  | whether it has been delivered |


A File is like a photo in a camera roll, and a Place Asset is like that photo organized in a Place's album. Some things follow from that:

- **Removing a Place Asset does not delete anything.** The File or Link stays in the company's media and can be placed again.
- **Retitling a Place Asset does not rename the File.** A File's `filename` never changes. The title is how this one Place shows it.
- **A Place holds each File or Link once.** Adding one that is already on the Place returns 422, so use the existing Place Asset instead.
- **Media gets in and gets placed in two separate calls.** No call that creates a File or Link places it, and no call that places media creates it. Make or find the media, then place it.


## Sections and Subsections

Create the media first. Then organize it on the Place by placing each File or Link in the Section and Subsection that suits it. Where an asset sits is about presentation. To know what an asset is, read `asset.type`. Read the Section only to know where the asset is shown.

Every Place has exactly five Sections, one of each type. A Section's `type` is the same value that requests and filters call `section_type`:

| Section `type` | Typically holds |
|  --- | --- |
| `photos` | still photography |
| `videos` | video Files and video Links |
| `floor_plans` | floor plan images |
| `interactive_content` | 3D tours and other interactive Links |
| `files` | documents such as PDFs |


Sections cannot be created, renamed or deleted. Choose a Section by its `section_type`, never by a name.

Each Section has a *default Subsection*, which holds everything not put anywhere more specific. Custom Subsections, such as Kitchen, Primary Suite or Twilight, organize a Section further. Subsections do not nest.

**Organizing is optional.** The simplest integration places every photo under Photos and never creates a custom Subsection: each one lands in the default Subsection, in the order it was added. Add custom Subsections when the Application's users want rooms or themes.

Deleting a custom Subsection never deletes media. Its Place Assets move to the end of the Section's default Subsection, in the same order, with their titles and settings kept.

## Order is part of the data

Aryeo stores the display order, so every app that shows a Place's media shows it the same way. Order applies at three levels:

1. Sections within a Place
2. Subsections within a Section
3. Place Assets within a Subsection


At each level, `position` counts from 1 with no gaps and no repeats. Position 1 is shown first. `position` is read-only, and new Place Assets and new Subsections take the last position. `v2beta1` serves no action that changes an order.

## Access and errors

An ID that belongs to another company returns 403 with the code `authorization`, never 404. A token that lacks the operation's scope also gets 403 with `authorization`. Only an ID that does not exist, or a resource that has been deleted, returns 404. Validation errors return 422 with the code `validation`, and name the field in `source`. [Errors](/apis/vendor-platform/guides/fundamentals/errors) lists the code for each status, and how to branch on it.

## Where to go next

- **[Ingest media](/apis/vendor-platform/guides/media/ingest-media).** Ingesting Files and creating Links.
- **[Organize media](/apis/vendor-platform/guides/media/organize-media).** Adding media to a Place, Subsections, order, and reading a Place's media back.
- **[Deliver media](/apis/vendor-platform/guides/media/deliver-media).** Sending the finished media to the Job's customers.
- **[Walkthrough](/apis/vendor-platform/guides/media/walkthrough).** One illustrative path through the whole flow, from Job to delivery.