实体快照
用于批量检索您的广告活动、广告组、广告和关键词的记录。此 接口用于异步下载批量账户快照文件 。**注意:**API v1 的快照中不提供品牌推广效果数据。
方法 | URL | 使用案例 |
---|---|---|
POST | /{recordType}/snapshot | 请求账户中满足筛选条件的所有指定类型的实体的基于文件的快照 |
GET | /snapshots/{snapshotId} | 检索之前请求的快照的状态、元数据和位置 |
操作
requestSnapshot
POST /{recordType}/snapshot
{
"campaignType":{campaignType},
"stateFilter":{stateFilter}
}
为单独类型的所有实体请求快照报告
参数
参数名称 | 类型 | 指定位置 | 描述 |
---|---|---|---|
recordType | String | URL | 应为其生成快照的实体类型。必须以下类型之一:campaigns 、adGroups 、keywords 、negativeKeywords 、campaignNegativeKeywords 或 productAds |
campaignType | String | POST 体 | 应为其生成快照的广告活动类型。必须是:sponsoredProducts 、sponsoredBrands |
stateFilter | String | POST 体 | 将结果限制为指定逗号分隔列表中包含状态的实体。必须是以下值之一:enabled 、paused 、archived 。默认行为包括已启用 (enabled) 和已暂停 (paused)。 |
响应
状态码 | 响应对象 |
---|---|
202 - success | SnapshotResponse |
401 - unauthorized | Error |
SnapshotResponse
将包含快照状态。其他元数据
将在快照完成后填充且位置
标头将指定生成报告的位置。
资源表现
SnapshotResponse
{
"title": "SnapshotResponse",
"type": "object",
"properties": {
"snapshotId": {
"description": "The ID of the for the snapshot that was requested.",
"type": "string"
},
"recordType": {
"description": "The record type of the report.It can be campaign, adGroups, productAds, keywords, negativeKeywords or campaignNegativeKeywords.",
"type": "string"
},
"status": {
"description": "The status of the generation of the snapshot, it can be IN_PROGRESS, SUCCESS or FAILURE.",
"type": "string"
},
"statusDetails": {
"description": "Description of the status.",
"type": "string"
},
"location": {
"description": "The URI for the snapshot.It's only available if status is SUCCESS.",
"type": "string"
},
"fileSize": {
"description": "The size of the snapshot file in bytes.It's only available if status is SUCCESS.",
"type": "number"
},
"expiration": {
"description": "The epoch time for expiration of the snapshot file.It's only available if status is SUCCESS.",
"type": "number"
}
}
}
错误
请参阅开发人员备注中的错误对象返回 格式。