- [Resource: MediaItem](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media.customers#MediaItem)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media.customers#MediaItem.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media.customers#METHODS_SUMMARY)

## Resource: MediaItem

A single media item.

| JSON representation ||
|---|---|
| ``` { "name": string, "mediaFormat": enum (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.MediaFormat`), "locationAssociation": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.LocationAssociation`) }, "googleUrl": string, "thumbnailUrl": string, "createTime": string, "dimensions": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.Dimensions`) }, "insights": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.MediaInsights`) }, "attribution": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.Attribution`) }, "description": string, // Union field `data` can be only one of the following: "sourceUrl": string, "dataRef": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.MediaItemDataRef`) } // End of list of possible types for union field `data`. } ``` |

| Fields ||
|---|---|---|
| `name` | `string` The resource name for this media item. `accounts/{accountId}/locations/{locationId}/media/{mediaKey}` |
| `mediaFormat` | ``enum (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.MediaFormat`)`` The format of this media item. Must be set when the media item is created, and is read-only on all other requests. Cannot be updated. |
| `locationAssociation` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.LocationAssociation`)`` Required when calling `CreatePhoto`. Describes how this media item is connected to its location. Must be either a category (for example, EXTERIOR) or the ID of a price list item. This is required when adding new media to a location with `media.create`. For other types of media, for example, photos on local posts, this will not be present. |
| `googleUrl` | `string` Output only. Google-hosted URL for this media item. This URL is not static since it may change over time. For video this will be a preview image with an overlaid play icon. |
| `thumbnailUrl` | `string` Output only. Where provided, the URL of a thumbnail image for this media item. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Creation time of this media item. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `dimensions` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.Dimensions`)`` Output only. The dimensions (width and height) in pixels. |
| `insights` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.MediaInsights`)`` Output only. Statistics for this media item. |
| `attribution` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.Attribution`)`` Output only. Attribution information for customer media items. You must display this attribution as provided to your users and must not delete or alter the attribution. |
| `description` | `string` Description for this media item. Descriptions cannot be modified through the Google My Business API, but can be set when creating a new media item that is not a cover photo. |
| Union field `data`. The media item's data source. When creating a new media item, either a URL or data ref must be provided. With the exception of `PROFILE` and `COVER` category, all photos must measure a minimum of 250px on the short edge, with a file size of at least 10240 bytes. All uploaded photos should follow the [Business Profile guidelines for photos](https://support.google.com/business/answer/6031953). `data` can be only one of the following: |||
| `sourceUrl` | `string` A publicly accessible URL where the media item can be retrieved from. When creating one of this or dataRef must be set to specify the source of the media item. If `sourceUrl` was used when creating a media item, it will be populated with that source URL when the media item is retrieved. This field cannot be updated. |
| `dataRef` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem.MediaItemDataRef`)`` Input only. A reference to media item binary data as obtained by the `media.startUpload` method. When creating a media item, either `sourceUrl` or `dataRef` must be set. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media.customers/get` | Returns metadata for the requested customer media item. |
| ### `https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media.customers/list` | Returns a list of media items associated with a location that have been contributed by customers. |