1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="adexchangebuyer_v1_4.html">Ad Exchange Buyer API</a> . <a href="adexchangebuyer_v1_4.proposals.html">proposals</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81  <code><a href="#get">get(proposalId)</a></code></p>
82<p class="firstline">Get a proposal given its id</p>
83<p class="toc_element">
84  <code><a href="#insert">insert(body=None)</a></code></p>
85<p class="firstline">Create the given list of proposals</p>
86<p class="toc_element">
87  <code><a href="#patch">patch(proposalId, revisionNumber, updateAction, body=None)</a></code></p>
88<p class="firstline">Update the given proposal. This method supports patch semantics.</p>
89<p class="toc_element">
90  <code><a href="#search">search(pqlQuery=None)</a></code></p>
91<p class="firstline">Search for proposals using pql query</p>
92<p class="toc_element">
93  <code><a href="#setupcomplete">setupcomplete(proposalId)</a></code></p>
94<p class="firstline">Update the given proposal to indicate that setup has been completed.</p>
95<p class="toc_element">
96  <code><a href="#update">update(proposalId, revisionNumber, updateAction, body=None)</a></code></p>
97<p class="firstline">Update the given proposal</p>
98<h3>Method Details</h3>
99<div class="method">
100    <code class="details" id="close">close()</code>
101  <pre>Close httplib2 connections.</pre>
102</div>
103
104<div class="method">
105    <code class="details" id="get">get(proposalId)</code>
106  <pre>Get a proposal given its id
107
108Args:
109  proposalId: string, Id of the proposal to retrieve. (required)
110
111Returns:
112  An object of the form:
113
114    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
115    #
116    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
117  &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
118    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
119  },
120  &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
121    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
122  },
123  &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
124    {
125      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
126      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
127    },
128  ],
129  &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
130    &quot;referenceId&quot;: &quot;A String&quot;,
131    &quot;referencePayload&quot;: &quot;A String&quot;,
132  },
133  &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
134    &quot;A String&quot;,
135  ],
136  &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
137  &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
138  &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
139  &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
140  &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
141  &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
142  &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
143    {
144      &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
145      &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
146      &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
147        &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
148          &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
149        },
150        &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
151          &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
152          &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
153        },
154      },
155      &quot;label&quot;: &quot;A String&quot;, # The label to use.
156    },
157  ],
158  &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
159  &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
160  &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
161  &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
162  &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
163  &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
164  &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
165  &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
166  &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
167  &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
168    &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
169    &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
170  },
171  &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
172    {
173      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
174      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
175    },
176  ],
177}</pre>
178</div>
179
180<div class="method">
181    <code class="details" id="insert">insert(body=None)</code>
182  <pre>Create the given list of proposals
183
184Args:
185  body: object, The request body.
186    The object takes the form of:
187
188{
189  &quot;proposals&quot;: [ # The list of proposals to create.
190    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
191        #
192        # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
193      &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
194        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
195      },
196      &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
197        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
198      },
199      &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
200        {
201          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
202          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
203        },
204      ],
205      &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
206        &quot;referenceId&quot;: &quot;A String&quot;,
207        &quot;referencePayload&quot;: &quot;A String&quot;,
208      },
209      &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
210        &quot;A String&quot;,
211      ],
212      &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
213      &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
214      &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
215      &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
216      &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
217      &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
218      &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
219        {
220          &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
221          &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
222          &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
223            &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
224              &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
225            },
226            &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
227              &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
228              &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
229            },
230          },
231          &quot;label&quot;: &quot;A String&quot;, # The label to use.
232        },
233      ],
234      &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
235      &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
236      &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
237      &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
238      &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
239      &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
240      &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
241      &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
242      &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
243      &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
244        &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
245        &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
246      },
247      &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
248        {
249          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
250          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
251        },
252      ],
253    },
254  ],
255  &quot;webPropertyCode&quot;: &quot;A String&quot;, # Web property id of the seller creating these orders
256}
257
258
259Returns:
260  An object of the form:
261
262    {
263  &quot;proposals&quot;: [ # The list of proposals successfully created.
264    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
265        #
266        # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
267      &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
268        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
269      },
270      &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
271        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
272      },
273      &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
274        {
275          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
276          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
277        },
278      ],
279      &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
280        &quot;referenceId&quot;: &quot;A String&quot;,
281        &quot;referencePayload&quot;: &quot;A String&quot;,
282      },
283      &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
284        &quot;A String&quot;,
285      ],
286      &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
287      &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
288      &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
289      &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
290      &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
291      &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
292      &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
293        {
294          &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
295          &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
296          &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
297            &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
298              &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
299            },
300            &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
301              &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
302              &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
303            },
304          },
305          &quot;label&quot;: &quot;A String&quot;, # The label to use.
306        },
307      ],
308      &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
309      &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
310      &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
311      &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
312      &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
313      &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
314      &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
315      &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
316      &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
317      &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
318        &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
319        &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
320      },
321      &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
322        {
323          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
324          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
325        },
326      ],
327    },
328  ],
329}</pre>
330</div>
331
332<div class="method">
333    <code class="details" id="patch">patch(proposalId, revisionNumber, updateAction, body=None)</code>
334  <pre>Update the given proposal. This method supports patch semantics.
335
336Args:
337  proposalId: string, The proposal id to update. (required)
338  revisionNumber: string, The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the latest proposal at head revision and retry the update at that revision. (required)
339  updateAction: string, The proposed action to take on the proposal. This field is required and it must be set when updating a proposal. (required)
340    Allowed values
341      accept -
342      cancel -
343      propose -
344      proposeAndAccept -
345      unknownAction -
346      updateNonTerms -
347  body: object, The request body.
348    The object takes the form of:
349
350{ # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
351    #
352    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
353  &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
354    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
355  },
356  &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
357    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
358  },
359  &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
360    {
361      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
362      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
363    },
364  ],
365  &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
366    &quot;referenceId&quot;: &quot;A String&quot;,
367    &quot;referencePayload&quot;: &quot;A String&quot;,
368  },
369  &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
370    &quot;A String&quot;,
371  ],
372  &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
373  &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
374  &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
375  &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
376  &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
377  &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
378  &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
379    {
380      &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
381      &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
382      &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
383        &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
384          &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
385        },
386        &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
387          &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
388          &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
389        },
390      },
391      &quot;label&quot;: &quot;A String&quot;, # The label to use.
392    },
393  ],
394  &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
395  &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
396  &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
397  &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
398  &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
399  &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
400  &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
401  &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
402  &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
403  &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
404    &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
405    &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
406  },
407  &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
408    {
409      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
410      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
411    },
412  ],
413}
414
415
416Returns:
417  An object of the form:
418
419    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
420    #
421    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
422  &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
423    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
424  },
425  &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
426    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
427  },
428  &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
429    {
430      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
431      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
432    },
433  ],
434  &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
435    &quot;referenceId&quot;: &quot;A String&quot;,
436    &quot;referencePayload&quot;: &quot;A String&quot;,
437  },
438  &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
439    &quot;A String&quot;,
440  ],
441  &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
442  &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
443  &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
444  &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
445  &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
446  &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
447  &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
448    {
449      &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
450      &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
451      &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
452        &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
453          &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
454        },
455        &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
456          &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
457          &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
458        },
459      },
460      &quot;label&quot;: &quot;A String&quot;, # The label to use.
461    },
462  ],
463  &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
464  &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
465  &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
466  &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
467  &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
468  &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
469  &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
470  &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
471  &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
472  &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
473    &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
474    &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
475  },
476  &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
477    {
478      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
479      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
480    },
481  ],
482}</pre>
483</div>
484
485<div class="method">
486    <code class="details" id="search">search(pqlQuery=None)</code>
487  <pre>Search for proposals using pql query
488
489Args:
490  pqlQuery: string, Query string to retrieve specific proposals.
491
492Returns:
493  An object of the form:
494
495    {
496  &quot;proposals&quot;: [ # The list of matching proposals.
497    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
498        #
499        # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
500      &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
501        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
502      },
503      &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
504        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
505      },
506      &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
507        {
508          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
509          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
510        },
511      ],
512      &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
513        &quot;referenceId&quot;: &quot;A String&quot;,
514        &quot;referencePayload&quot;: &quot;A String&quot;,
515      },
516      &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
517        &quot;A String&quot;,
518      ],
519      &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
520      &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
521      &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
522      &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
523      &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
524      &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
525      &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
526        {
527          &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
528          &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
529          &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
530            &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
531              &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
532            },
533            &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
534              &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
535              &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
536            },
537          },
538          &quot;label&quot;: &quot;A String&quot;, # The label to use.
539        },
540      ],
541      &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
542      &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
543      &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
544      &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
545      &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
546      &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
547      &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
548      &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
549      &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
550      &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
551        &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
552        &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
553      },
554      &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
555        {
556          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
557          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
558        },
559      ],
560    },
561  ],
562}</pre>
563</div>
564
565<div class="method">
566    <code class="details" id="setupcomplete">setupcomplete(proposalId)</code>
567  <pre>Update the given proposal to indicate that setup has been completed.
568
569Args:
570  proposalId: string, The proposal id for which the setup is complete (required)
571</pre>
572</div>
573
574<div class="method">
575    <code class="details" id="update">update(proposalId, revisionNumber, updateAction, body=None)</code>
576  <pre>Update the given proposal
577
578Args:
579  proposalId: string, The proposal id to update. (required)
580  revisionNumber: string, The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the latest proposal at head revision and retry the update at that revision. (required)
581  updateAction: string, The proposed action to take on the proposal. This field is required and it must be set when updating a proposal. (required)
582    Allowed values
583      accept -
584      cancel -
585      propose -
586      proposeAndAccept -
587      unknownAction -
588      updateNonTerms -
589  body: object, The request body.
590    The object takes the form of:
591
592{ # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
593    #
594    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
595  &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
596    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
597  },
598  &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
599    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
600  },
601  &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
602    {
603      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
604      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
605    },
606  ],
607  &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
608    &quot;referenceId&quot;: &quot;A String&quot;,
609    &quot;referencePayload&quot;: &quot;A String&quot;,
610  },
611  &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
612    &quot;A String&quot;,
613  ],
614  &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
615  &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
616  &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
617  &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
618  &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
619  &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
620  &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
621    {
622      &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
623      &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
624      &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
625        &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
626          &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
627        },
628        &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
629          &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
630          &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
631        },
632      },
633      &quot;label&quot;: &quot;A String&quot;, # The label to use.
634    },
635  ],
636  &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
637  &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
638  &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
639  &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
640  &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
641  &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
642  &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
643  &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
644  &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
645  &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
646    &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
647    &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
648  },
649  &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
650    {
651      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
652      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
653    },
654  ],
655}
656
657
658Returns:
659  An object of the form:
660
661    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
662    #
663    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
664  &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
665    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
666  },
667  &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
668    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
669  },
670  &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
671    {
672      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
673      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
674    },
675  ],
676  &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
677    &quot;referenceId&quot;: &quot;A String&quot;,
678    &quot;referencePayload&quot;: &quot;A String&quot;,
679  },
680  &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
681    &quot;A String&quot;,
682  ],
683  &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
684  &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
685  &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
686  &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
687  &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
688  &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
689  &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
690    {
691      &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
692      &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
693      &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
694        &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
695          &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
696        },
697        &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
698          &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
699          &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
700        },
701      },
702      &quot;label&quot;: &quot;A String&quot;, # The label to use.
703    },
704  ],
705  &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
706  &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
707  &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
708  &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
709  &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
710  &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
711  &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
712  &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
713  &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
714  &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
715    &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
716    &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
717  },
718  &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
719    {
720      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
721      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
722    },
723  ],
724}</pre>
725</div>
726
727</body></html>