開発者ガイドの概要

Amazon Ads APIの概要

エンティティスナップショット

キャンペーン、広告グループ、広告、キーワードのレコードを一括して取得するために使用します。この インターフェースを使用すると、一括アカウントスナップショットファイルを非同期的にダウンロード できます。**注:**スポンサーブランド広告のパフォーマンスデータは、API v1のスナップショットでは取得できません。

メソッド URL ユースケース
POST /{recordType}/snapshot 指定したタイプのアカウントのエンティティのうち、フィルター条件を満たすものをすべて含むファイルベースのスナップショットをリクエストします
GET /snapshots/{snapshotId} 過去にリクエストしたスナップショットのステータス、メタデータ、場所を取得します

操作

requestSnapshot

POST /{recordType}/snapshot    

{                               
"campaignType":{campaignType},
"stateFilter":{stateFilter}     
}

1つのタイプのすべてのエンティティのスナップショットレポートをリクエストします

パラメーター

パラメーター名 タイプ 指定する場所 説明
recordType 文字列 URL スナップショットを生成する対象となるエンティティのタイプ。campaignsadGroupskeywordsnegativeKeywordscampaignNegativeKeywordsproductAdsのいずれかにする必要があります。
campaignType 文字列 POST本文 スナップショットを生成する対象となるキャンペーンのタイプ。指定できるのはsponsoredProductssponsoredBrandsです。
stateFilter 文字列 POST本文 指定したカンマ区切りリストに含まれる状態のエンティティだけに結果を制限します。指定できるのは、enabledpausedarchivedのいずれかです。デフォルトの動作では、enabledとpausedが含まれます。

レスポンス

ステータスコード レスポンスオブジェクト
202 - success SnapshotResponse
401 - unauthorized Error

SnapshotResponseには、スナップショットのステータスが含まれます。スナップショットが完了すると 追加のメタデータが取り込まれ、locationヘッダーに 生成されたレポートの場所が示されます。

リソースの表現

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"
       }
    }
}

エラー

開発者メモで説明されているエラーオブジェクトの戻り値形式をご覧ください。