REST Resource: accounts.locations.media.customers

Resource: MediaItem

A single media item.

JSON representation
{
  "name": string,
  "mediaFormat": enum (MediaFormat),
  "locationAssociation": {
    object (LocationAssociation)
  },
  "googleUrl": string,
  "thumbnailUrl": string,
  "createTime": string,
  "dimensions": {
    object (Dimensions)
  },
  "insights": {
    object (MediaInsights)
  },
  "attribution": {
    object (Attribution)
  },
  "description": string,

  // Union field data can be only one of the following:
  "sourceUrl": string,
  "dataRef": {
    object (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 (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 (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 (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 (Dimensions)

Output only. The dimensions (width and height) in pixels.

insights

object (MediaInsights)

Output only. Statistics for this media item.

attribution

object (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. 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 (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

get

Returns metadata for the requested customer media item.

list

Returns a list of media items associated with a location that have been contributed by customers.