> For the complete documentation index, see [llms.txt](https://docs.channex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.channex.io/api-v.1-documentation/photos-collection.md).

# Photos Collection

API Methods to work with Photos

**Photo** is entity to represent photo associated with Property and Room Type (optional).

{% hint style="warning" %}
Photos is used only for Google Hotel and OpenShopping-based channels.

Photos is not automatically synced with Airbnb, Booking.com, Expedia or any other OTA.
{% endhint %}

## Fields

**property\_id `[required]`**

String with valid UUID of Property object what you would like to associate with created Photo.

**url `[required]`**

Valid URL address of Photo image.

**room\_type\_id `[optional]`**

String with valid UUID of Room Type object what you would like to associate with created Photo.\
If `room_type_id` is `null`, Photo will be associated only with Property.

**kind `[optional]`**

One of three possible values: `photo`, `ad` (advertising), `menu` (restaurant menu photo).\
By default value kind will be equal to `photo`.

**author `[optional]`**

Name of photo author.

**description `[optional]`**

Text with Photo description.

**position `[optional]`**

Any positive integer number.\
This field represent Photo position at list of Property or Room Type Photos. Photo with position equal to 0 is used as Cover Photo.\
Position should be unique per `property_id` and `room_type_id` combination.

## Limits

Count of Photos are limited.

* You can't have more than 30 Property Photos (`room_type_id == null`)
* You can't have more than 10 Room Type Photos (`room_type_id ≠ null`)

## API Methods

* [Get list of Photos API](https://docs.channex.io/api-v.1-documentation/photos-collection/get-list-of-photos-api.md)
* [Get Photo API](https://docs.channex.io/api-v.1-documentation/photos-collection/get-photo-api.md)
* [Create Photo API](https://docs.channex.io/api-v.1-documentation/photos-collection/create-photo-api.md)
* [Upload Photo API](https://docs.channex.io/api-v.1-documentation/photos-collection/upload-photo-api.md)
* [Update Photo API](https://docs.channex.io/api-v.1-documentation/photos-collection/update-photo-api.md)
* [Delete Photo API](https://docs.channex.io/api-v.1-documentation/photos-collection/delete-photo-api.md)

## Batch operations

API methods to create or update [Property](https://docs.channex.io/api-v.1-documentation/hotels-collection.md) or [Room Type](https://docs.channex.io/api-v.1-documentation/room-types-collection.md) have implementation of Photo batch operations. To create Property with Photos, you can pass list of Photo arguments as value into `content.photos` key of affected object.

Batch operations support logic to create new Photo entity associated with parent object, update existed photos or drop it.

To update Photo at batch operation, you must provide photo with it ID.

To drop Photo at batch operation, you can pass additional optional key: `is_removed` with value equal to `true` at Photo object what are you like to remove.
