遷移至 Marketplace API

啟用 API

如同其他 Authorized Buyers API,您必須先啟用 Marketplace API 才能使用。您可以按照下列步驟啟用 Marketplace API:

  1. 前往「Google API 主控台已啟用的 API」頁面。選取您用來存取其他 Authorized Buyers API 的專案,例如 Ad Exchange Buyer IIReal-Time-Time API
  2. 按一下 [+ 啟用 API 和服務] 連結。
  3. 在搜尋框中輸入「Authorized Buyers Marketplace API」,然後按下 Enter 鍵。
  4. 在搜尋結果中選取 [Authorized Buyers 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

我們建議您使用服務帳戶 OAuth 2.0 流程來存取 API。所有支援的 OAuth 2.0 流程都必須指定新的 API 範圍,以要求 Google 存取 Marketplace API 的權杖。

將 Ad Exchange Buyer II API 資源對應至 Marketplace API

客戶

如果您使用 Ad Exchange Buyer II API 的 accounts.clients 資源,即可遷移至 Marketplace API 的 buyers.clients 資源。

資源方法

Ad Exchange 買方 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 買方 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.invitationsaccounts.clients.users 資源合併成一個 buyers.clients.users 資源。

資源方法

Ad Exchange 買方 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

只有 state 設為 INVITED 的使用者,才能等同於 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 買方 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 不支援這項資源及其功能。

發布商簡介

如果您使用 Ad Exchange Buyer II API 的 accounts.publisherProfiles 資源,即可遷移至 Marketplace API 的 buyers.publisherProfiles 資源。

資源方法

Ad Exchange 買方 II API Marketplace API
accounts.publisherProfiles.get buyers.publisherProfiles.get
accounts.publisherProfiles.list buyers.publisherProfiles.list

這個方法現在支援清單篩選器

資源欄位

Ad Exchange 買方 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

提案和敲定的提案

如果您使用 Ad Exchange Buyer II API 的 accounts.proposals 資源,即可遷移至 Marketplace API 的 buyers.proposals 資源。交易與提案拆分為 buyers.proposals.deals 子資源。API 已不再顯示敲定的提案,讓您透過 buyers.finalizedDeals 資源更精準地控制敲定的交易。

資源方法

Ad Exchange 買方 II API Marketplace API
accounts.proposals.accept buyers.proposals.accept

只有在提案狀態為 BUYER_ACCEPTANCE_REQUESTED 時,才會呼叫 buyers.proposals.accept

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 即可恢復特定買方帳戶的個別交易。

資源欄位

proposalsfinalizedProposals 資源共用相同的 Proposal 表示法,並有類似的遷移步驟。

Ad Exchange 買方 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
Proposal.deals.dealTerms.nonGuaranteedFixedPriceTerms Deal.preferredDealTerms
Proposal.deals.dealTerms.NonGuaranteedAuctionTerms Deal.privateAuctionTerms
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 買方 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.buyerProposal.client

所使用的欄位會因協商買方的帳戶類型而異。這些名稱分別代表即時出價 API buyers 資源或 Marketplace API buyers.clients 資源的資源名稱。

Proposal.billedBuyer.accountId Proposal.billedBuyer

這裡指的是以「即時出價」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