遷移至 Marketplace API

啟用 API

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

  1. 前往「Google API 控制台已啟用的 API」頁面。選取要用來存取其他 Authorized Buyers API 的專案,例如 Ad Exchange Buyer II即時出價 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 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.invitationsaccounts.clients.users 資源的功能合併成單一 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

只有 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 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

提案和敲定的提案

如果您使用 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

只有在提案狀態為 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 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 買家 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

這個資源名稱指的是買方帳戶的資源名稱,如即時出價 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