Di chuyển sang API Marketplace

Bật API

Tương tự như các API khác của Authorized Buyers, bạn cần bật API Marketplace trước khi có thể sử dụng. Bạn có thể bật Marketplace API bằng các bước sau:

  1. Truy cập vào trang API được bật trong Bảng điều khiển API của Google. Chọn dự án bạn sử dụng để truy cập vào các API khác của Authorized Buyers, chẳng hạn như Ad Exchange Buyer II hoặc API Đặt giá thầu theo thời gian thực.
  2. Nhấp vào liên kết + BẬT API VÀ DỊCH VỤ.
  3. Trong hộp tìm kiếm, hãy nhập "Authorized Buyers Marketplace API" rồi nhấn Enter.
  4. Trong kết quả tìm kiếm, hãy chọn Authorized Buyers Marketplace API.
  5. Nhấp vào nút BẬT để bật API Marketplace.
  6. Giờ đây, bạn có thể truy cập vào API Marketplace bằng thông tin đăng nhập đã tạo trong dự án này.

Cập nhật thông tin xác thực OAuth 2.0

Quy trình làm việc OAuth 2.0 hiện tại có phạm vi API Ad Exchange Buyer II cần thay đổi để sử dụng phạm vi API Marketplace:

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

Bạn nên sử dụng quy trình API OAuth 2.0 của Tài khoản dịch vụ để truy cập API. Tất cả quy trình OAuth 2.0 được hỗ trợ phải chỉ định phạm vi API mới để yêu cầu Google cấp một mã thông báo có thể truy cập vào API Marketplace.

Liên kết tài nguyên API Ad Exchange Buyer II tới API Marketplace

Khách hàng

Nếu sử dụng tài nguyên accounts.clients của API Ad Exchange Buyer II, bạn có thể di chuyển sang tài nguyên buyers.clients của API Marketplace.

Phương thức tài nguyên

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

Phương thức này hiện hỗ trợ các bộ lọc danh sách.

accounts.clients.update buyers.clients.patch

Phương thức này hiện hỗ trợ việc cập nhật một phần bằng tham số updateMask.

Trường tài nguyên

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

clientAccountId là mã tài nguyên ứng dụng.

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

Trường này đã ngừng hoạt động.

Client.entityId

Trường này đã ngừng hoạt động.

Client.entityName

Trường này đã ngừng hoạt động.

Client.partnerClientId Client.partnerClientId

Lời mời và người dùng

API Marketplace kết hợp chức năng của tài nguyên accounts.clients.invitationsaccounts.clients.users của API Ad Exchange Buyer II vào một tài nguyên buyers.clients.users.

Phương thức tài nguyên

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

Chỉ những người dùng có state được đặt thành INVITED mới tương đương với những người dùng được accounts.clients.invitations.list trả về.

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

Bạn không thể vá lỗi người dùng ứng dụng bằng API nữa. Bạn nên sử dụng buyers.clients.users.delete để xoá người dùng ứng dụng và tạo lại bằng các thay đổi mà bạn ưu tiên.

Trường tài nguyên

API Ad Exchange Buyer II API Marketplace
ClientUserInvitation.invitationId

Trường này đã ngừng hoạt động.

ClientUserInvitation.email ClientUser.email
ClientUserInvitation.clientAccountId

Trường này không còn tồn tại cho người dùng là khách hàng nữa. Thay vào đó, hãy xem clientAccountId trong tên của ứng dụng mẹ.

ClientUser.userId ClientUser.name

userId là mã nhận dạng tài nguyên người dùng.

ClientUser.clientAccountId

Trường này không còn tồn tại cho người dùng là khách hàng nữa. Thay vào đó, hãy xem clientAccountId trong tên của ứng dụng mẹ.

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

Sản phẩm

Tài nguyên này và chức năng của nó không có trong API Marketplace.

PublisherProfiles

Nếu sử dụng tài nguyên accounts.publisherProfiles của API Ad Exchange Buyer II, bạn có thể di chuyển sang tài nguyên buyers.publisherProfiles của API Marketplace.

Phương thức tài nguyên

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

Phương thức này hiện hỗ trợ các bộ lọc danh sách.

Trường tài nguyên

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

publisherProfileId là mã tài nguyên của hồ sơ nhà xuất bản.

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

Trường này đã ngừng hoạt động.

PublisherProfile.googlePlusUrl

Trường này đã ngừng hoạt động.

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

Đề xuất và đề xuất hoàn thiện

Nếu sử dụng tài nguyên accounts.proposals của API Ad Exchange Buyer II, bạn có thể di chuyển sang tài nguyên buyers.proposals của API Marketplace. Các giao dịch đã được tách khỏi đề xuất trong tài nguyên phụ buyers.proposals.deals. Đề xuất đã hoàn tất không còn được thể hiện trong API, giúp bạn có quyền kiểm soát chi tiết hơn đối với các giao dịch đã hoàn tất bằng tài nguyên buyers.finalizedDeals.

Phương thức tài nguyên

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

Chỉ gọi buyers.proposals.accept khi trạng thái của đề xuất là 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

Xin lưu ý rằng đề xuất này sẽ không còn chứa thông tin về giao dịch nữa.

accounts.proposals.list buyers.proposals.list

Xin lưu ý rằng các đề xuất được trả về sẽ không còn chứa thông tin về các giao dịch nữa. Nếu bạn dùng tính năng lọc danh sách, xin lưu ý rằng API Marketplace chỉ hỗ trợ cú pháp lọc danh sách.

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

Phương thức này hiện hỗ trợ việc cập nhật một phần bằng tham số updateMask.

accounts.finalizedProposals.list

Sử dụng buyers.finalizedDeals.list để xem giao dịch đã hoàn tất cho một tài khoản người mua nhất định. Giờ đây, bạn có thể truy xuất giao dịch đã hoàn tất ở cấp bên đặt giá thầu bằng bidders.finalizedDeals.list.

accounts.finalizedProposals.pause

Sử dụng buyers.finalizedDeals.pause để tạm dừng các giao dịch đã hoàn tất riêng lẻ cho một tài khoản người mua nhất định.

accounts.finalizedProposals.resume

Sử dụng buyers.finalizedDeals.resume để tiếp tục các giao dịch đã hoàn tất riêng lẻ cho một tài khoản người mua nhất định.

Trường tài nguyên

Các tài nguyên proposalsfinalizedProposals có cùng cách trình bày Proposal và có các bước di chuyển tương tự.

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

proposalId là mã tài nguyên đề xuất.

Proposal.updateTime Proposal.updateTime
Proposal.proposalRevision

Proposal.proposalRevisionDeal.proposalRevision

Proposal.deals.dealId Deal.name

dealId là mã tài nguyên giao dịch.

Proposal.deals.proposalId Deal.name

proposalId là mã tài nguyên đề xuất gốc.

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

Trường này đã ngừng hoạt động.

Proposal.deals.createProductRevision

Trường này đã ngừng hoạt động.

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

Trường này đã ngừng hoạt động; hiện chỉ hiển thị ở cấp đề xuất.

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

Trường này đã ngừng hoạt động.

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

Trường này đã ngừng hoạt động.

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

Deal.programmaticGuaranteedTerms

Hãy lưu ý rằng mặc dù guaranteedFixedPriceTerms.fixedPrices là một trường lặp lại, nhưng trường này chưa bao giờ được điền nhiều hơn một mục nhập. Do đó, programmaticGuaranteedTerms.fixedPrice của API Marketplace sẽ tương đương.

Proposal.deals.dealTerms.nonGuaranteedFixedPriceTerms

Deal.preferredDealTerms

Xin lưu ý rằng mặc dù nonGuaranteedFixedPriceTerms.fixedPrices là một trường lặp lại, nhưng trường này chưa bao giờ được điền nhiều hơn một mục nhập. Do đó, preferredDealTerms.fixedPrice của API Marketplace sẽ tương đương.

Proposal.deals.dealTerms.NonGuaranteedAuctionTerms

Deal.privateAuctionTerms

Xin lưu ý rằng mặc dù nonGuaranteedAuctionTerms.reservePricesPerBuyer là một trường lặp lại, nhưng trường này chưa bao giờ được điền nhiều hơn một mục nhập. Do đó, privateAuctionTerms.floorPrice của API Marketplace sẽ tương đương.

Proposal.deals.webPropertyCode

Trường này đã ngừng hoạt động.

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

Bạn không còn có thể định cấu hình tiêu chí nhắm mục tiêu bằng khoá để xác định danh mục nhắm mục tiêu. Tuy nhiên, bạn có thể tìm thấy các danh mục có thể nhắm mục tiêu trong Deal.targeting. Ví dụ: khoá GOOG_CREATIVE_SIZE từ Ad Exchange Buyer II đề cập đến Deal.targeting.inventorySizeTargeting của API Marketplace.

Proposal.deals.targeting Deal.targeting

Đã thêm các danh mục tiêu chí nhắm mục tiêu bổ sung.

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

Trường này đã ngừng hoạt động.

Proposal.deals.syndicationProduct

Trường này đã ngừng hoạt động.

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

Bạn có thể tìm thấy thông tin tương tự trong trường FinalizedDeal.dealPausingInfo.

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

Thông tin bổ sung về cách thêm thoả thuận.

Proposal.deals.isSetupComplete FinalizedDeal.readyToServe

Giờ đây, bạn chỉ có thể báo hiệu rằng một giao dịch đã sẵn sàng phân phát nếu giao dịch đó đã hoàn tất. Hãy sử dụng phương thức buyers.finalizedDeals.setReadyToServe để cho biết rằng giao dịch Đảm bảo có lập trình cuối cùng của bạn đã sẵn sàng phân phát.

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

Hãy sử dụng tên hồ sơ nhà xuất bản để xác định người bán. Bạn có thể xem hồ sơ nhà xuất bản bằng tài nguyên buyers.publisherProfiles.

Proposal.seller.subAccountId Proposal.publisherProfile

Hãy sử dụng tên hồ sơ nhà xuất bản để xác định người bán. Bạn có thể xem hồ sơ nhà xuất bản bằng tài nguyên buyers.publisherProfiles.

Proposal.buyer.accountId

Proposal.buyer hoặc Proposal.client.

Trường được sử dụng sẽ phụ thuộc vào loại tài khoản của người mua thương lượng. Đây là tên tài nguyên của tài nguyên API Đặt giá thầu theo thời gian thực buyers hoặc tài nguyên API Marketplace buyers.clients tương ứng.

Proposal.billedBuyer.accountId Proposal.billedBuyer

Đây hiện là tên tài nguyên tham chiếu đến tài khoản người mua như được thể hiện trong tài nguyên buyers của API Đặt giá thầu theo thời gian thực.

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

Trường này đã ngừng hoạt động.

Proposal.isSetupComplete FinalizedDeal.readyToServe

Hiện đã được truy cập chi tiết hơn bằng buyers.finalizedDeals.

Proposal.lastUpdaterOrCommentorRole Proposal.lastUpdaterOrCommentorRole
Proposal.notes.proposalRevision

Trường này đã ngừng hoạt động.

Proposal.notes.noteId

Trường này đã ngừng hoạt động.

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