プロファイル
マーケットプレイスには、countryCode
、currencyCode
、timezone
など、地域に固有の関連プロパティが含まれます。これらのプロパティは、スケジュール、予算、請求などの広告APIの動作を決定します。このため、複数のマーケットプレイス(例: Amazon.com、Amazon.co.uk、Amazon.co.jpなど)に関連付けられているアカウントを持つ広告主は、各マーケットプレイスに関連付けられているプロファイルは1つだけです。各プロファイルは、固有のLogin with Amazonアカウントに関連付ける必要があります。各Login with Amazonアカウントには固有のEメールアドレスが必要です。API認証トークンを生成するときは、キャンペーンを管理する国際マーケットプレイスに適したプロファイルを使用する必要があります。
認証トークンは、広告主に関連付けられているすべてのプロファイルを取得するために使用されます。プロファイルIDは、APIを呼び出すヘッダーに渡されます。レポートとすべてのエンティティ管理の操作は、1つのプロファイルに関連付けられます。広告主は、各マーケットプレイスに複数のプロファイルを持つことはできません。
プロファイルは固有のプロファイルIDに関連付けられます。すべてのAPI呼び出しのヘッダーには管理スコープが必要です。プロファイルIDをヘッダーの管理スコープ(Amazon-Advertising-API-Scope)の値として使用します。プロファイルIDを取得するには、呼び出しを実行して、使用しているアクセストークンに関連付けられているプロファイルを一覧表示します。
GET /v1/profiles
Host: advertising-api.amazon.com
Authorization: Bearer Atza|IQEBLjAsAhRmHjNgHpi0U...
Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.a8358a60…
Amazon-Advertising-API-Scope: 1834670349683089580748
Content-Type: application/json
プロファイルの読み取りと更新には、以下のメソッドが使用されます。次の 表は、サービスの管理対象リソースによってサポートされる URL空間とHTTPメソッドに関するサービスの動作を示しています。
メソッド | URL | ユースケース |
---|---|---|
GET | /profiles |
認証トークンに関連付けられているすべてのプロファイルを取得します。 |
GET | /profiles/{profileId} |
IDを指定して、プロファイルを取得します |
PUT | /profiles/ |
1つ以上のプロファイルを更新します |
地域プロファイルのタイムゾーンコード
「タイムゾーン」列のテキストと形式を使用して、適切な タイムゾーンを指定します。
地域 | タイムゾーン |
---|---|
米国 | America/Los_Angeles |
カナダ | America/Los_Angeles |
英国 | Europe/London |
ドイツ | Europe/Paris |
フランス | Europe/Paris |
スペイン | Europe/Paris |
イタリア | Europe/Paris |
日本 | Asia/Tokyo |
オーストラリア | Australia/Sydney |
アラブ首長国連邦 | Asia/Dubai |
操作
listProfiles
GET /v1/profiles
認証トークンに関連付けられているプロファイルを取得します。
パラメーター
なし
レスポンス
ステータスコード | レスポンスオブジェクト |
---|---|
200 - success |
Profile のリスト |
401 - unauthorized |
Error |
getProfile
GET /v1/profiles/{profileId}
識別子で指定された1つのプロファイルを取得します。
パラメーター
パラメーター名 | タイプ | 説明 |
---|---|---|
profileId |
string | プロファイル識別子。 |
レスポンス
ステータスコード | レスポンスオブジェクト |
---|---|
200 - success |
Profile のリスト |
401 - unauthorized |
Error |
404 - profile not found |
Error |
updateProfiles
PUT /v1/profiles
1つ以上のプロファイルを更新します。広告主はprofileIdを使用して指定されます。
パラメーター
タイプ | 指定対象 | 説明 |
---|---|---|
Profile のリスト |
本文 | プロファイルIDおよび変更される変更可能フィールドを含む更新のリスト。 変更可能フィールド:dailyBudget |
レスポンス
ステータスコード | レスポンスオブジェクト |
---|---|
207 - multi-response |
入力順に示されるProfileResponse のリスト |
401 - unauthorized |
Error |
registerProfile
PUT /v1/profiles/register
サンドボックスにプロファイルを登録します。この呼び出しが本番エンドポイントに対して行われた場合、エラーが表示されます。
パラメーター
タイプ | 指定対象 | 説明 |
---|---|---|
countryCode |
本文 | プロファイルを登録する国。次のいずれかを指定できます: US、CA、UK、DE、FR、ES、IT、JP、AU、AE |
レスポンス
ステータスコード | レスポンスオブジェクト |
---|---|
200 - Success |
プロファイルの登録に成功しました。 |
401 - Unauthorized |
Error |
404 - Not Found |
Error 。本番エンドポイントを呼び出すと、これが返されます。 |
registerBrand
PUT /v1/profiles/registerBrand
サンドボックスにブランドを登録します。この呼び出しが本番エンドポイントに対して行われた場合、エラーが表示されます。
パラメーター
タイプ | 指定対象 | 説明 |
---|---|---|
countryCode |
本文 | プロファイルを登録する国。次のいずれかを指定できます: US、CA、UK、DE、FR、IT、ES、JP、AU、AE |
brand |
本文 | 必須。ブランド名。 |
レスポンス
ステータスコード | レスポンスオブジェクト |
---|---|
200 - Success | プロファイルの登録に成功しました。 |
401 - Unauthorized | Error |
404 - Not Found | Error 。本番エンドポイントを呼び出すと、これが返されます。 |
リソースの表現
Profile
{
"title": "Profile",
"type": "object",
"properties": {
"profileId": {
"description": "The ID of the profile",
"type": "number"
},
"countryCode": {
"description": "The country code identifying the publisher(s) on which ads will run",
"type": "string",
"oneOf": ["US"]
},
"currencyCode": {
"description": "The currency used for all monetary values for entities under this profile",
"type": "string",
"oneOf": ["USD"]
},
"dailyBudget": {
"description": "The optional budget shared by all entities created under this profile",
"type": "number",
"minimum": 1.00
},
"timeZone": {
"description": "The tz database time zone used for all date-based campaign management and reporting.",
"type": "string"
},
"accountInfo": {
"type": "object",
"properties": {
"marketplaceStringId": {
"description": "The string identifier for the marketplace associated with this profile.This is the same identifier used by MWS",
"type": "string"
},
"sellerStringId": {
"description": "The string identifier for the seller associated with this profile.This is the same identifier used by MWS",
"type": "string"
}
}
}
}
}
ProfileResponse
{
"title": "ProfileResponse",
"type": "object",
"properties": {
"profileId": {
"description": "The ID of the profile that was updated, if successful",
"type": "number"
},
"code": {
"description": "An enumerated success or error code for machine use.",
"type": "string"
},
"details": {
"description": "A human-readable description of the error, if unsuccessful",
"type": "string"
}
}
}
Error
{
"title": "Error",
"type": "object",
"properties": {
"code": {
"description": "An enumerated error code for machine use",
"type": "string"
},
"details": {
"description": "A human-readable description of the error. ",
"type": "string"
}
}
}