启用 API
与其他 Authorized Buyers 的 API 类似,您需要先启用 Marketplace API,然后才能使用它。您可以按照以下步骤启用 Marketplace API:
- 前往 Google API 控制台中的“已启用的 API”页面。选择您用于访问其他 Authorized Buyers API 的项目,如 Ad Exchange Buyer II 或 Real-time Bidding API。
- 点击 + 启用 API 和服务链接。
- 在搜索框中,输入“Authorized Buyers Marketplace API”,然后按 Enter 键。
- 在搜索结果中,选择 Authorized Buyers Marketplace API。
- 点击启用按钮以启用 Marketplace API。
- 现在,您应该可以使用此项目下创建的凭据访问 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 买方 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
此方法现在支持使用 |
资源字段
Ad Exchange 买方 II API | Marketplace API |
---|---|
Client.clientAccountId |
Client.name
|
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
资源功能整合到了单个 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
只有 |
accounts.clients.users.get |
buyers.clients.users.get |
accounts.clients.users.list |
buyers.clients.users.list
|
accounts.clients.users.update |
您无法再使用 API 修补客户用户。我们建议您使用
|
资源字段
Ad Exchange 买方 II API | Marketplace API |
---|---|
ClientUserInvitation.invitationId |
此字段已停用。 |
ClientUserInvitation.email |
ClientUser.email |
ClientUserInvitation.clientAccountId |
对于客户用户,此字段不再存在。请改为在父客户端的名称中查看 |
ClientUser.userId |
ClientUser.name
|
ClientUser.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 买方 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
|
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
资源更精细地控制已敲定的交易。
资源方法
资源字段
proposals
和 finalizedProposals
资源具有相同的 Proposal
表示法,具有类似的迁移步骤。
Ad Exchange 买方 II API | Marketplace API |
---|---|
Proposal.proposalId |
Proposal.name
|
Proposal.updateTime |
Proposal.updateTime |
Proposal.proposalRevision |
|
Proposal.deals.dealId |
Deal.name
|
Proposal.deals.proposalId |
Deal.name
|
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 |
请注意,虽然 |
Proposal.deals.dealTerms.nonGuaranteedFixedPriceTerms |
请注意,虽然 |
Proposal.deals.dealTerms.NonGuaranteedAuctionTerms |
请注意,虽然 |
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
无法再使用键来配置定位条件;不过,可以在 |
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 |
您可以在 |
Proposal.deals.programmaticCreativeSource |
Deal.creativeRequirements.programmaticCreativeSource |
Proposal.deals.deliveryControl |
Deal.deliveryControl
添加了有关如何提供交易方式的更多详情。 |
Proposal.deals.isSetupComplete |
FinalizedDeal.readyToServe
现在,只有当交易已敲定时,您才能发出信号来表明交易已可投放。使用 |
Proposal.originatorRole |
Proposal.originatorRole |
Proposal.seller.accountId |
Proposal.publisherProfile
使用发布商资料名称来识别卖方。您可以使用 |
Proposal.seller.subAccountId |
Proposal.publisherProfile
使用发布商资料名称来识别卖方。您可以使用 |
Proposal.buyer.accountId |
所使用的字段取决于协商买方的帐号类型。它们分别是 Real-time Bidding API |
Proposal.billedBuyer.accountId |
Proposal.billedBuyer
它现在是一个资源名称,引用实时出价 API 的 |
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
现在使用 |
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 |