---
title: "Media"
description: "代表媒体接口"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/interfaces/media'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/interfaces/media.md'
---
# Media

代表媒体接口

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Interface

## Type Signature

`Media`

## Fields

* `id`

  [ID!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/id.md)

  全局唯一的媒体ID

* `previewImage`

  [Image](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/image.md)

  媒体的预览图像

* `alt`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  分享媒体性质或内容的单词或短语

* `mediaContentType`

  [MediaContentType!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/enums/media-content-type.md)

  媒体内容类型

## Implemented By

* [ExternalVideo](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/external-video.md)

* [Video](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/video.md)

* [MediaImage](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/media-image.md)

## Schema Definition

```graphql
interface Media { 
	id: ID!
	previewImage: Image
	alt: String
	mediaContentType: MediaContentType! 
}
```

## Field from

* [MediaEdge](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/media-edge.md).node

  MediaEdge 末尾的项目

* [MediaConnection](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/media-connection.md).nodes

  MediaEdge 中包含的节点列表

## Interface implemented by

* [Video](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/video.md)

  代表 Shopline 托管的视频

* [ExternalVideo](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/external-video.md)

  表示在 Shopline 之外托管的视频

* [MediaImage](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/media-image.md)

  代表 Shopline 托管图片

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes)。

