媒体素材
GET accounts/:account_id/media_creatives¶
检索与当前账号关联的部分或所有媒体素材的详细信息。
资源 URL¶
https://ads-api.twitter.com/10/accounts/:account_id/media_creatives
参数¶
名称 | 说明 |
---|---|
account_id 必需 |
所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。 类型:string 示例: |
campaign_id 可选 |
将响应范围限定为与指定广告活动关联的媒体素材。 类型:string 示例: |
count 可选 |
指定每个不同请求尝试检索的记录数量。 类型:int 默认值: 200 最小值、最大值: 1 、1000 |
cursor 可选 |
指定光标以获取下一页结果。参阅分页了解更多信息。 类型:string 示例: |
line_item_ids 可选 |
通过指定以逗号分隔的标识符列表,将响应范围限定为与指定行项目关联的媒体素材。最多可提供 200 个 ID。 类型:string 示例: |
media_creative_ids 可选 |
通过指定以逗号分隔的标识符列表,将响应范围限定为所需的媒体素材。最多可提供 200 个 ID。 类型:string 示例: |
sort_by 可选 |
根据支持的属性,按升序或降序排序。参阅排序了解更多信息。 类型:string 示例: |
with_deleted 可选 |
在请求中包含已删除的结果。 类型:boolean 默认值: false 可能值: true 、false |
with_total_count 可选 |
包含 注意:不包含此参数和 注意:包含 类型:boolean 默认值: false 可能值: true 、false |
请求示例¶
GET https://ads-api.twitter.com/10/accounts/18ce54d4x5t/media_creatives?media_creative_ids=1bzq3
响应示例¶
{
"request": {
"params": {
"account_id": "18ce54d4x5t",
"media_creative_ids": [
"1bzq3"
]
}
},
"next_cursor": null,
"data": [
{
"line_item_id": "8v7jo",
"landing_url": "https://dev.twitter.com",
"creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
"id": "1bzq3",
"entity_status": "ACTIVE",
"created_at": "2017-07-05T06:00:42Z",
"account_media_id": "10miy",
"updated_at": "2019-01-11T20:21:26Z",
"approval_status": "ACCEPTED",
"deleted": false
}
]
}
GET accounts/:account_id/media_creatives/:media_creative_id¶
检索与当前账号关联的特定媒体素材的详细信息。
资源 URL¶
https://ads-api.twitter.com/10/accounts/:account_id/media_creatives/:media_creative_id
参数¶
名称 | 说明 |
---|---|
account_id 必需 |
所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。 类型:string 示例: |
media_creative_id 必需 |
请求中对正在操作的媒体素材的引用。 类型:string 示例: |
with_deleted 可选 |
在请求中包含已删除的结果。 类型:boolean 默认值: false 可能值: true 、false |
请求示例¶
GET https://ads-api.twitter.com/10/accounts/18ce54d4x5t/media_creatives/1bzq3
响应示例¶
{
"request": {
"params": {
"media_creative_id": "1bzq3",
"account_id": "18ce54d4x5t"
}
},
"data": {
"line_item_id": "8v7jo",
"landing_url": "https://dev.twitter.com",
"creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
"id": "1bzq3",
"entity_status": "ACTIVE",
"created_at": "2017-07-05T06:00:42Z",
"account_media_id": "10miy",
"updated_at": "2019-01-11T20:21:26Z",
"approval_status": "ACCEPTED",
"deleted": false
}
}
POST accounts/:account_id/media_creatives¶
将账号媒体对象与指定行项目相关联。
使用此端点在 Twitter 受众平台上推广插播广告(当账号媒体 creative_type
为 PREROLL
时)或图片广告(例如 BANNER
或 INTERSTITIAL
)。
注意:要将媒体资源添加到账号媒体资源中,可使用 POST accounts/:account_id/media_library 端点。
资源 URL¶
https://ads-api.twitter.com/10/accounts/:account_id/media_creatives
参数¶
名称 | 说明 |
---|---|
account_id required |
所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。 类型:string 示例: |
account_media_id required |
请求中对正在操作的账号媒体实体的引用。 类型:string 示例: |
line_item_id required |
请求中对正在操作的行项目的引用。 类型:string 示例: |
landing_url sometimes required |
将用户定向到的网站的 URL。只能用于 TAP 图像(即“展示素材”)。如果用于前置广告资源,此值将被忽略。要将 URL 与前置广告资源关联起来,可使用 POST accounts/:account_id/preroll_call_to_actions 端点。 注意:行项目目标设置为 类型:string 示例: |
请求示例¶
POST https://ads-api.twitter.com/10/accounts/18ce54d4x5t/media_creatives?line_item_id=8v7jo&account_media_id=10miy
响应示例¶
{
"request": {
"params": {
"line_item_id": "8v7jo",
"account_media_id": "10miy",
"account_id": "18ce54d4x5t"
}
},
"data": {
"line_item_id": "8v7jo",
"landing_url": "https://dev.twitter.com",
"creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
"id": "1bzq3",
"entity_status": "ACTIVE",
"created_at": "2017-07-05T06:00:42Z",
"account_media_id": "10miy",
"updated_at": "2019-01-11T20:21:26Z",
"approval_status": "ACCEPTED",
"deleted": false
}
}
DELETE accounts/:account_id/media_creatives/:media_creative_id¶
删除属于当前账号的指定媒体素材。
资源 URL¶
https://ads-api.twitter.com/10/accounts/:account_id/media_creatives/:media_creative_id
参数¶
名称 | 说明 |
---|---|
account_id 必需 |
所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。 类型:string 示例: |
media_creative_id 必需 |
请求中对正在操作的媒体素材的引用。 类型:string 示例: |
请求示例¶
DELETE https://ads-api.twitter.com/10/accounts/18ce54d4x5t/media_creatives/1bzq3
响应示例¶
{
"request": {
"params": {
"media_creative_id": "1bzq3",
"account_id": "18ce54d4x5t"
}
},
"data": {
"line_item_id": "8v7jo",
"landing_url": "https://dev.twitter.com",
"creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
"id": "1bzq3",
"entity_status": "ACTIVE",
"created_at": "2017-07-05T06:00:42Z",
"account_media_id": "10miy",
"updated_at": "2021-04-16T21:02:55Z",
"approval_status": "ACCEPTED",
"deleted": true
}
}