Marketplace API に移行する

API を有効にする

他の認定バイヤーの API と同様に、この API を使用するには Marketplace API を有効にする必要があります。Marketplace API は次の手順で有効にできます。

  1. Google API Console の [有効な API] ページに移動します。他の 認定バイヤー API(Ad Exchange Buyer IIReal-time Bidding API など)へのアクセスに使用しているプロジェクトを選択します。
  2. [+ API とサービスの有効化] リンクをクリックします。
  3. 検索ボックスに「認定バイヤー Marketplace API」と入力して、Enter キーを押します。
  4. 検索結果で、[認定バイヤー Marketplace API] を選択します。
  5. [有効にする] ボタンをクリックして Marketplace API を有効にします。
  6. これで、このプロジェクトで作成された認証情報を使用して Marketplace API にアクセスできるようになります。

OAuth 2.0 認証情報を更新する

Ad Exchange Buyer II API スコープを使用する既存の OAuth 2.0 ワークフローは、Marketplace API スコープを使用するよう変更する必要があります。

https://www.googleapis.com/auth/authorized-buyers-marketplace

API へのアクセスには、サービス アカウント OAuth 2.0 フローを使用することをおすすめします。Marketplace API にアクセスできるトークンを Google にリクエストするには、サポートされているすべての OAuth 2.0 フローで新しい API スコープを指定する必要があります。

Ad Exchange Buyer II API のリソースの Marketplace API への対応

クライアント

Ad Exchange Buyer II API の accounts.clients リソースを使用する場合は、Marketplace API の buyers.clients リソースに移行できます。

リソース メソッド

Ad Exchange Buyer II API Marketplace API
accounts.clients.create buyers.clients.create
accounts.clients.get buyers.clients.get
accounts.clients.list buyers.clients.list

このメソッドでリストフィルタがサポートされるようになりました。

accounts.clients.update buyers.clients.patch

このメソッドは、updateMask パラメータを使用した部分更新をサポートするようになりました。

リソース フィールド

Ad Exchange Buyer II API Marketplace API
Client.clientAccountId Client.name

clientAccountId は、クライアント リソース ID です。

Client.role Client.role
Client.status Client.state
Client.clientName Client.displayName
Client.visibleToSeller Client.sellerVisible
Client.entityType

このフィールドは廃止されました。

Client.entityId

このフィールドは廃止されました。

Client.entityName

このフィールドは廃止されました。

Client.partnerClientId Client.partnerClientId

招待とユーザー

Marketplace API は、Ad Exchange Buyer II API の accounts.clients.invitations リソースと accounts.clients.users リソースの機能を 1 つの buyers.clients.users リソースに統合したものです。

リソース メソッド

Ad Exchange Buyer II API Marketplace API
accounts.clients.invitations.create buyers.clients.users.create
accounts.clients.invitations.get buyers.clients.users.get
accounts.clients.invitations.list buyers.clients.users.list

stateINVITED に設定されているユーザーのみが、accounts.clients.invitations.list から返されるユーザーと同等になります。

accounts.clients.users.get buyers.clients.users.get
accounts.clients.users.list buyers.clients.users.list
accounts.clients.users.update

API を使用してクライアント ユーザーにパッチを適用することはできなくなりました。 buyers.clients.users.delete を使用してクライアント ユーザーを削除し、適切な変更で再作成することをおすすめします。

リソース フィールド

Ad Exchange Buyer II API Marketplace API
ClientUserInvitation.invitationId

このフィールドは廃止されました。

ClientUserInvitation.email ClientUser.email
ClientUserInvitation.clientAccountId

クライアント ユーザーのこのフィールドはもう存在しません。代わりに、親クライアントの名前で clientAccountId を表示します。

ClientUser.userId ClientUser.name

userId は、ユーザーのリソース ID です。

ClientUser.clientAccountId

クライアント ユーザーのこのフィールドはもう存在しません。代わりに、親クライアントの名前で clientAccountId を表示します。

ClientUser.status ClientUser.state
ClientUser.email ClientUser.email

商品

このリソースとその機能は、Marketplace API では使用できません。

PublisherProfiles

Ad Exchange Buyer II API の accounts.publisherProfiles リソースを使用する場合は、Marketplace API の buyers.publisherProfiles リソースに移行できます。

リソース メソッド

Ad Exchange Buyer II API Marketplace API
accounts.publisherProfiles.get buyers.publisherProfiles.get
accounts.publisherProfiles.list buyers.publisherProfiles.list

このメソッドでリストフィルタがサポートされるようになりました。

リソース フィールド

Ad Exchange Buyer II API Marketplace API
PublisherProfile.publisherProfileId PublisherProfile.name

publisherProfileId は、パブリッシャー プロフィールのリソース ID です。

PublisherProfile.seller.accountId PublisherProfile.seller.accountId
PublisherProfile.seller.subAccountId PublisherProfile.seller.subAccountId
PublisherProfile.displayName PublisherProfile.displayName
PublisherProfile.domains PublisherProfile.domains
PublisherProfile.mobileApps PublisherProfile.mobileApps
PublisherProfile.logoUrl PublisherProfile.logoUrl
PublisherProfile.directDealsContact PublisherProfile.directDealsContact
PublisherProfile.programmaticDealsContact PublisherProfile.programmaticDealsContact
PublisherProfile.mediaKitUrl PublisherProfile.mediaKitUrl
PublisherProfile.samplePageUrl PublisherProfile.samplePageUrl
PublisherProfile.rateCardUrl

このフィールドは廃止されました。

PublisherProfile.googlePlusUrl

このフィールドは廃止されました。

PublisherProfile.overview PublisherProfile.overview
PublisherProfile.buyerPitchStatement PublisherProfile.pitchStatement
PublisherProfile.topHeadlines PublisherProfile.topHeadlines
PublisherProfile.audienceDescription PublisherProfile.audienceDescription
PublisherProfile.isParent PublisherProfile.isParent

Proposals と FinalizedProposal

Ad Exchange Buyer II API の accounts.proposals リソースを使用する場合は、Marketplace API の buyers.proposals リソースに移行できます。取引はプロポーザルから buyers.proposals.deals サブリソースに分割されています。確定済みの提案は API には表示されず、buyers.finalizedDeals リソースを使って確定済みの取引をより細かく管理できます。

リソース メソッド

Ad Exchange Buyer II API Marketplace API
accounts.proposals.accept buyers.proposals.accept

buyers.proposals.accept は、プロポーザルのステータスが BUYER_ACCEPTANCE_REQUESTED の場合にのみ呼び出します。

accounts.proposals.addNote buyers.proposals.addNote
accounts.proposals.cancelNegotiation buyers.proposals.cancelNegotiation
accounts.proposals.completeSetup buyers.finalizedDeals.setReadyToServe
accounts.proposals.create buyers.proposals.sendRfp
accounts.proposals.get buyers.proposals.get

プロポーザルには取引に関する情報が含まれなくなることに注意してください。

accounts.proposals.list buyers.proposals.list

返されるプロポーザルには取引に関する情報が含まれなくなることに注意してください。リスト フィルタリングを使用する場合、Marketplace API は リスト フィルタ構文のみをサポートします。

accounts.proposals.pause buyers.finalizedDeals.pause
accounts.proposals.resume buyers.finalizedDeals.resume
accounts.proposals.update buyers.proposals.patch

このメソッドは、updateMask パラメータを使用した部分更新をサポートするようになりました。

accounts.finalizedProposals.list

特定の購入者アカウントの確定された取引を表示するには、 buyers.finalizedDeals.list を使用します。 bidders.finalizedDeals.list を使用して、ビッダーレベルで確定した取引を取得できるようになりました。

accounts.finalizedProposals.pause

指定された購入者アカウントの確定された取引を個別に一時停止するには、 buyers.finalizedDeals.pause を使用します。

accounts.finalizedProposals.resume

指定された購入者アカウントの確定された取引を個別に再開するには、 buyers.finalizedDeals.resume を使用します。

リソース フィールド

proposals リソースと finalizedProposals リソースは同じ Proposal 表現を共有し、移行手順も似ています。

Ad Exchange Buyer II API Marketplace API
Proposal.proposalId Proposal.name

proposalId は、プロポーザルリソース ID です。

Proposal.updateTime Proposal.updateTime
Proposal.proposalRevision

Proposal.proposalRevisionDeal.proposalRevision

Proposal.deals.dealId Deal.name

dealId は、ディールのリソース ID です。

Proposal.deals.proposalId Deal.name

proposalId は、親プロポーザル リソース ID です。

Proposal.deals.createTime Deal.createTime
Proposal.deals.updateTime Deal.updateTime
Proposal.deals.createProductId

このフィールドは廃止されました。

Proposal.deals.createProductRevision

このフィールドは廃止されました。

Proposal.deals.displayName Deal.displayName
Proposal.deals.buyerPrivateData.referenceId

このフィールドは廃止され、現在はプロポーザル レベルでのみ公開されています。

Proposal.deals.dealTerms.description Deal.description
Proposal.deals.dealTerms.brandingType

このフィールドは廃止されました。

Proposal.deals.dealTerms.estimatedGrossSpend Deal.estimatedGrossSpend
Proposal.deals.dealTerms.estimatedImpressionsPerDay

このフィールドは廃止されました。

Proposal.deals.dealTerms.sellerTimeZone Deal.sellerTimeZone
Proposal.deals.dealTerms.guaranteedFixedPriceTerms

Deal.programmaticGuaranteedTerms

guaranteedFixedPriceTerms.fixedPrices は繰り返しフィールドですが、複数のエントリが入力されたことはありません。そのため、Marketplace API の programmaticGuaranteedTerms.fixedPrice は同じになります。

Proposal.deals.dealTerms.nonGuaranteedFixedPriceTerms

Deal.preferredDealTerms

nonGuaranteedFixedPriceTerms.fixedPrices は繰り返しフィールドですが、複数のエントリが入力されたことはありません。そのため、Marketplace API の preferredDealTerms.fixedPrice は同じになります。

Proposal.deals.dealTerms.NonGuaranteedAuctionTerms

Deal.privateAuctionTerms

nonGuaranteedAuctionTerms.reservePricesPerBuyer は繰り返しフィールドですが、複数のエントリが入力されたことはありません。そのため、Marketplace API の privateAuctionTerms.floorPrice は同じになります。

Proposal.deals.webPropertyCode

このフィールドは廃止されました。

Proposal.deals.sellerContacts Proposal.sellerContacts
Proposal.deals.availableStartTime Proposal.flightStartTime
Proposal.deals.availableEndTime Proposal.flightEndTime
Proposal.deals.description Proposal.description
Proposal.deals.targetingCriterion Deal.targeting

キーを使用してターゲティング カテゴリを決定する際にターゲティングを設定することはできなくなりましたが、ターゲットに設定できるカテゴリは Deal.targeting にあります。たとえば、Ad Exchange Buyer II の GOOG_CREATIVE_SIZE キーは、Marketplace API の Deal.targeting.inventorySizeTargeting を参照します。

Proposal.deals.targeting Deal.targeting

ターゲティング条件のカテゴリが追加されました。

Proposal.deals.creativeRestrictions.creativeFormat Deal.creativeRequirements.creativeFormat
Proposal.deals.creativeRestrictions.skippableAdType Deal.creativeRequirements.skippableAdType
Proposal.deals.creativeRestrictions.creativeSpecifications.creativeSize Deal.targeting.inventorySizeTargeting
Proposal.deals.externalDealId

このフィールドは廃止されました。

Proposal.deals.syndicationProduct

このフィールドは廃止されました。

Proposal.deals.creativePreApprovalPolicy Deal.creativeRequirements.creativePreApprovalPolicy
Proposal.deals.creativeSafeFrameCompatibility Deal.creativeRequirements.creativeSafeFrameCompatibility
Proposal.deals.dealServingMetadata

同様の情報は FinalizedDeal.dealPausingInfo フィールドにあります。

Proposal.deals.programmaticCreativeSource Deal.creativeRequirements.programmaticCreativeSource
Proposal.deals.deliveryControl Deal.deliveryControl

セールの実施方法に関する詳細情報を追加しました。

Proposal.deals.isSetupComplete FinalizedDeal.readyToServe

取引が確定した場合にのみ、配信可能な状態であることを通知できるようになりました。buyers.finalizedDeals.setReadyToServe メソッドを使用して、確定したプログラマティック保証型取引が配信可能であることを示します。

Proposal.originatorRole Proposal.originatorRole
Proposal.seller.accountId Proposal.publisherProfile

パブリッシャー プロフィール名を使用して販売者を特定します。パブリッシャーのプロフィールは、buyers.publisherProfiles リソースで表示できます。

Proposal.seller.subAccountId Proposal.publisherProfile

パブリッシャー プロフィール名を使用して販売者を特定します。パブリッシャーのプロフィールは、buyers.publisherProfiles リソースで表示できます。

Proposal.buyer.accountId

Proposal.buyer または Proposal.client

使用されるフィールドは、交渉している購入者のアカウント タイプによって異なります。それぞれ、Realtime Bidding API buyers リソースまたは Marketplace API buyers.clients リソースのリソース名です。

Proposal.billedBuyer.accountId Proposal.billedBuyer

これは、Realtime Bidding API の buyers リソースで表される購入者アカウントを参照するリソース名になりました。

Proposal.displayName Proposal.displayName
Proposal.proposalState Proposal.state
Proposal.isRenegotiating Proposal.isRenegotiating
Proposal.buyerPrivateData Proposal.buyerPrivateData
Proposal.sellerContacts Proposal.sellerContacts
Proposal.buyerContacts Proposal.buyerContacts
Proposal.privateAuctionId

このフィールドは廃止されました。

Proposal.isSetupComplete FinalizedDeal.readyToServe

buyers.finalizedDeals でよりきめ細かくアクセスできるようになりました。

Proposal.lastUpdaterOrCommentorRole Proposal.lastUpdaterOrCommentorRole
Proposal.notes.proposalRevision

このフィールドは廃止されました。

Proposal.notes.noteId

このフィールドは廃止されました。

Proposal.notes.createTime Proposal.notes.createTime
Proposal.notes.creatorRole Proposal.notes.creatorRole
Proposal.notes.note Proposal.notes.note
Proposal.termsAndConditions Proposal.termsAndConditions