The publisherProfiles
resource can be used to retrieve details about either individual or multiple
publishers participating in the Marketplace.
Here's an example using the publisherProfiles.list
method to retrieve details about multiple partners. Note that a small pageSize
is set for brevity; the maximum response size would otherwise be determined by
the API endpoint.
View the request
GET https://adexchangebuyer.googleapis.com/v2beta1/accounts/12345678/publisherProfiles?pageSize=3
The server responds with a 200 OK HTTP status code and the requested number of
publisher profiles:
View the response
{
"nextPageToken": "CBMQhMP01ezH3ZIYgMP33eyH4BL=",
"publisherProfiles": [{
"displayName": "Mars Federation Network",
"programmaticDealsContact": "advertising@mfn.mf",
"directDealsContact": "advertising@mfn.mf",
"overview": "Mars Federation Network is a news organization based in
Newer York, Mars. We produce high quality journalism across a diverse
range of topics, both locally and across the galaxy.\n",
"buyerPitchStatement": "Mars Federation Network is Mars's most - trusted
news source. Your campaign can be associated with our high quality
journalism and a brand that Martians trust.\n ",
"seller": {
"accountId": "123456789"
},
"googlePlusUrl": "https://plus.google.com/+MFN/posts",
"samplePageUrl": "https://www.mfn.mf/ ",
"topHeadlines": ["Respected journalism", "Planetary and galactic reach"],
"logoUrl": "//www.gstatic.com/adx/customerlogos/4442216451/0/1455682298174.jpg",
"publisherProfileId": "PP99999"
},
{
"displayName": "MarMar",
"programmaticDealsContact": "advertising@marmar.mf",
"directDealsContact": "advertising@marmar.mf",
"overview": "MarMar is the largest social network on Mars, reaching over
1 billion daily active users.\n",
"buyerPitchStatement": "Most active social network on Mars, with reach on
multiple platforms.\n",
"seller": {
"accountId": "987654321"
},
"googlePlusUrl": "https://plus.google.com/+MarMar",
"samplePageUrl": "https://marmar.mf",
"topHeadlines": ["Largest Mars social network", "Destination for Martians
across the globe"],
"logoUrl": "//www.gstatic.com/adx/customerlogos/8421357443/1/1544933921459.jpg",
"publisherProfileId": "PP11111"
},
{
"displayName": "MarsAcademy",
"programmaticDealsContact": "advertising@marsacademy.mf",
"directDealsContact": "advertising@marsacademy.mf",
"overview": "MarsAcademy offers the largest repository of academic
journals published on Mars, covering a broad range of research topics.\n",
"buyerPitchStatement": "Associate your brand with the definitive source of
academic journals used in research across the globe.\n",
"seller": {
"accountId": "192837475"
},
"googlePlusUrl": "https://plus.google.com/+MarsAcademy",
"samplePageUrl": "https://marsacademy.mf",
"topHeadlines": ["Largest repository of Mars academic journals", "Trusted
source for academics around the globe"],
"logoUrl": "//www.gstatic.com/adx/customerlogos/2521607341/1/1078322542936.jpg",
"publisherProfileId": "PP55555"
}
]
}
Create proposal
You can use the
proposals.create
method to initiate negotiation with a publisher. Only publishers can initiate
proposals containing more than one deal at this time. In addition, a proposal
must have at least one deal.
You can only create proposals for Programmatic Guaranteed Deals with
whitelisted sellers. If the seller is not whitelisted, you will receive an error
response. To avoid errors, all users of this API (buyers and sellers) need
to be whitelisted.
After creation, the proposal's proposalRevision will be incremented for
every subsequent update, and is required for most API calls. If an API call
specifies a proposalRevision that is not equal to the current value, the
request will return an error response.
List proposals
You can use the proposals.list
method to find proposals undergoing negotiation or those that have completed
negotiation.
During renegotiation,
only the version of the proposal being renegotiated will be displayed in the
proposals.list response. The proposal will continue serving under the former
terms while renegotiation takes place, and you can view these with the
finalizedProposals resource.
Use the proposals.list method with a filter set to proposalId = MP11111111
to retrieve the proposal created in the previous example. Note that this request
should also specify a filterSyntax of LIST_FILTER; if not specified, the
request will fail because the default syntax is PQL at this time.
View the request
GET https://adexchangebuyer.googleapis.com/v2beta1/accounts/12345678/proposals?filter=proposalId+%3D+MP11111111&filterSyntax=LIST_FILTER
The server responds with a 200 OK HTTP status code and proposals matching the
filter.
Use the proposals.update
method to update a proposal under negotiation or begin renegotiation of a
finalized proposal. When updating a proposal, we recommend that you start
with a copy and make adjustments as needed, as the contents you provide in the
request body—or lack thereof—will replace the specified proposal if the
operation succeeds.
The following request updates fixedPrices, guaranteedLooks, and
guaranteedImpressions.
Buyers and publishers can add notes to a proposal to provide context for a
change and communicate with the other party. To add notes for a particular
proposal, you can use the proposals.addNote
method. An individual note cannot exceed 1024 unicode characters, and all
notes
added will be saved to the proposal's notes field. These will be visible to both
the buyer and publisher.
You must use proposals.addNote to add a note.
The following request adds a note to the proposal:
View the request
POST https://adexchangebuyer.googleapis.com/v2beta1/accounts/12345678/proposals/MP11111111:addNote
{
"note": {
"note": "This is a test."
}
}
The server responds with a 200 OK HTTP status code and the
Note
appended to the proposal.
View the response
{
"note": "This is a test.",
"creatorRole": "BUYER",
"noteId": "MP99999999",
"createTime": "1985-10-26T01:23:00.000Z"
}
Accept proposal
Use the proposals.accept
method to indicate that you accept the terms of a proposal at the current
revision. This will update the proposalState to eitherBUYER_ACCEPTED or
FINALIZED depending on whether the publisher accepted the proposal previously.
The proposal will only become FINALIZED if both parties accept the same
proposalRevision.
The following request accepts the proposal at the second revision.
View the request
POST https://adexchangebuyer.googleapis.com/v2beta1/accounts/12345678/proposals/MP11111111:accept
{
"proposalRevision": 2
}
The server responds with a 200 OK HTTP status code and the accepted proposal.
You can cancel the negotiation with the
proposals.cancelNegotiation
method. If the proposal was not previously finalized, this will set the
proposalState to CANCELED, a terminal state where no further updates can be
made. Otherwise, the proposal will revert to the last finalized state with the
proposalRevision incremented once and the lastUpdaterOrCommentRole set to
BUYER.
You must use proposals.cancelNegotiation to cancel negotiation of a proposal.
The following request cancels negotiation of a proposal.
View the request
POST https://adexchangebuyer.googleapis.com/v2beta1/accounts/12345678/proposals/MP11111111:cancelNegotiation
The server responds with a 200 OK HTTP status code and the canceled proposal.
You can indicate to the publisher that you have completed setup for a particular
proposal by specifying it with the
proposals.completeSetup
method after the proposal is finalized. Contact your
TAM to find out the process you
need to have in place before making this call.
You must use proposals.completeSetup to indicate completion of setup to
the publisher. It should be called after the deal's proposalState is
FINALIZED.
The following request completes setup for the specified proposal:
View the request
POST https://adexchangebuyer.googleapis.com/v2beta1/accounts/12345678/proposals/MP33333333:completeSetup
The server responds with a 200 OK HTTP status code and the proposal which has
completed setup.
Use the finalizedProposals.list
method to view proposals that have been finalized, including those that are
paused or ended. If a proposal enters renegotiation, the version of that
proposal returned in the response will reflect the previous terms of the
proposal that are still serving.
To view proposals that are undergoing renegotiation, use the
proposals.list method.
The following request retrieves finalized proposals with a list filter
specifying a specific proposalId:
View the request
GET https://adexchangebuyer.googleapis.com/v2beta1/accounts/12345678/finalizedProposals?filter=proposalId+%3D+MP33333333&filterSyntax=LIST_FILTER
The server responds with a `200 OK` HTTP status code and the proposals specified
by the filter; in this case, only a single proposal is returned.