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_2.html">Ad Exchange Buyer API</a> . <a href="adexchangebuyer_v1_2.creatives.html">creatives</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(accountId, buyerCreativeId)</a></code></p> 82<p class="firstline">Gets the status for a single creative. A creative will be available 30-40 minutes after submission.</p> 83<p class="toc_element"> 84 <code><a href="#insert">insert(body=None)</a></code></p> 85<p class="firstline">Submit a new creative.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(maxResults=None, pageToken=None, statusFilter=None)</a></code></p> 88<p class="firstline">Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission.</p> 89<p class="toc_element"> 90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 91<p class="firstline">Retrieves the next page of results.</p> 92<h3>Method Details</h3> 93<div class="method"> 94 <code class="details" id="close">close()</code> 95 <pre>Close httplib2 connections.</pre> 96</div> 97 98<div class="method"> 99 <code class="details" id="get">get(accountId, buyerCreativeId)</code> 100 <pre>Gets the status for a single creative. A creative will be available 30-40 minutes after submission. 101 102Args: 103 accountId: integer, The id for the account that will serve this creative. (required) 104 buyerCreativeId: string, The buyer-specific id for this creative. (required) 105 106Returns: 107 An object of the form: 108 109 { # A creative and its classification data. 110 "HTMLSnippet": "A String", # The HTML snippet that displays the ad when inserted in the web page. If set, videoURL should not be set. 111 "accountId": 42, # Account id. 112 "advertiserId": [ # Detected advertiser id, if any. Read-only. This field should not be set in requests. 113 "A String", 114 ], 115 "advertiserName": "A String", # The name of the company being advertised in the creative. 116 "agencyId": "A String", # The agency id for this creative. 117 "apiUploadTimestamp": "A String", # The last upload timestamp of this creative if it was uploaded via API. Read-only. The value of this field is generated, and will be ignored for uploads. (formatted RFC 3339 timestamp). 118 "attribute": [ # All attributes for the ads that may be shown from this snippet. 119 42, 120 ], 121 "buyerCreativeId": "A String", # A buyer-specific id identifying the creative in this ad. 122 "clickThroughUrl": [ # The set of destination urls for the snippet. 123 "A String", 124 ], 125 "corrections": [ # Shows any corrections that were applied to this creative. Read-only. This field should not be set in requests. 126 { 127 "details": [ # Additional details about the correction. 128 "A String", 129 ], 130 "reason": "A String", # The type of correction that was applied to the creative. 131 }, 132 ], 133 "disapprovalReasons": [ # The reasons for disapproval, if any. Note that not all disapproval reasons may be categorized, so it is possible for the creative to have a status of DISAPPROVED with an empty list for disapproval_reasons. In this case, please reach out to your TAM to help debug the issue. Read-only. This field should not be set in requests. 134 { 135 "details": [ # Additional details about the reason for disapproval. 136 "A String", 137 ], 138 "reason": "A String", # The categorized reason for disapproval. 139 }, 140 ], 141 "filteringReasons": { # The filtering reasons for the creative. Read-only. This field should not be set in requests. 142 "date": "A String", # The date in ISO 8601 format for the data. The data is collected from 00:00:00 to 23:59:59 in PST. 143 "reasons": [ # The filtering reasons. 144 { 145 "filteringCount": "A String", # The number of times the creative was filtered for the status. The count is aggregated across all publishers on the exchange. 146 "filteringStatus": 42, # The filtering status code. Please refer to the creative-status-codes.txt file for different statuses. 147 }, 148 ], 149 }, 150 "height": 42, # Ad height. 151 "impressionTrackingUrl": [ # The set of urls to be called to record an impression. 152 "A String", 153 ], 154 "kind": "adexchangebuyer#creative", # Resource type. 155 "productCategories": [ # Detected product categories, if any. Read-only. This field should not be set in requests. 156 42, 157 ], 158 "restrictedCategories": [ # All restricted categories for the ads that may be shown from this snippet. 159 42, 160 ], 161 "sensitiveCategories": [ # Detected sensitive categories, if any. Read-only. This field should not be set in requests. 162 42, 163 ], 164 "status": "A String", # Creative serving status. Read-only. This field should not be set in requests. 165 "vendorType": [ # All vendor types for the ads that may be shown from this snippet. 166 42, 167 ], 168 "version": 42, # The version for this creative. Read-only. This field should not be set in requests. 169 "videoURL": "A String", # The url to fetch a video ad. If set, HTMLSnippet should not be set. 170 "width": 42, # Ad width. 171}</pre> 172</div> 173 174<div class="method"> 175 <code class="details" id="insert">insert(body=None)</code> 176 <pre>Submit a new creative. 177 178Args: 179 body: object, The request body. 180 The object takes the form of: 181 182{ # A creative and its classification data. 183 "HTMLSnippet": "A String", # The HTML snippet that displays the ad when inserted in the web page. If set, videoURL should not be set. 184 "accountId": 42, # Account id. 185 "advertiserId": [ # Detected advertiser id, if any. Read-only. This field should not be set in requests. 186 "A String", 187 ], 188 "advertiserName": "A String", # The name of the company being advertised in the creative. 189 "agencyId": "A String", # The agency id for this creative. 190 "apiUploadTimestamp": "A String", # The last upload timestamp of this creative if it was uploaded via API. Read-only. The value of this field is generated, and will be ignored for uploads. (formatted RFC 3339 timestamp). 191 "attribute": [ # All attributes for the ads that may be shown from this snippet. 192 42, 193 ], 194 "buyerCreativeId": "A String", # A buyer-specific id identifying the creative in this ad. 195 "clickThroughUrl": [ # The set of destination urls for the snippet. 196 "A String", 197 ], 198 "corrections": [ # Shows any corrections that were applied to this creative. Read-only. This field should not be set in requests. 199 { 200 "details": [ # Additional details about the correction. 201 "A String", 202 ], 203 "reason": "A String", # The type of correction that was applied to the creative. 204 }, 205 ], 206 "disapprovalReasons": [ # The reasons for disapproval, if any. Note that not all disapproval reasons may be categorized, so it is possible for the creative to have a status of DISAPPROVED with an empty list for disapproval_reasons. In this case, please reach out to your TAM to help debug the issue. Read-only. This field should not be set in requests. 207 { 208 "details": [ # Additional details about the reason for disapproval. 209 "A String", 210 ], 211 "reason": "A String", # The categorized reason for disapproval. 212 }, 213 ], 214 "filteringReasons": { # The filtering reasons for the creative. Read-only. This field should not be set in requests. 215 "date": "A String", # The date in ISO 8601 format for the data. The data is collected from 00:00:00 to 23:59:59 in PST. 216 "reasons": [ # The filtering reasons. 217 { 218 "filteringCount": "A String", # The number of times the creative was filtered for the status. The count is aggregated across all publishers on the exchange. 219 "filteringStatus": 42, # The filtering status code. Please refer to the creative-status-codes.txt file for different statuses. 220 }, 221 ], 222 }, 223 "height": 42, # Ad height. 224 "impressionTrackingUrl": [ # The set of urls to be called to record an impression. 225 "A String", 226 ], 227 "kind": "adexchangebuyer#creative", # Resource type. 228 "productCategories": [ # Detected product categories, if any. Read-only. This field should not be set in requests. 229 42, 230 ], 231 "restrictedCategories": [ # All restricted categories for the ads that may be shown from this snippet. 232 42, 233 ], 234 "sensitiveCategories": [ # Detected sensitive categories, if any. Read-only. This field should not be set in requests. 235 42, 236 ], 237 "status": "A String", # Creative serving status. Read-only. This field should not be set in requests. 238 "vendorType": [ # All vendor types for the ads that may be shown from this snippet. 239 42, 240 ], 241 "version": 42, # The version for this creative. Read-only. This field should not be set in requests. 242 "videoURL": "A String", # The url to fetch a video ad. If set, HTMLSnippet should not be set. 243 "width": 42, # Ad width. 244} 245 246 247Returns: 248 An object of the form: 249 250 { # A creative and its classification data. 251 "HTMLSnippet": "A String", # The HTML snippet that displays the ad when inserted in the web page. If set, videoURL should not be set. 252 "accountId": 42, # Account id. 253 "advertiserId": [ # Detected advertiser id, if any. Read-only. This field should not be set in requests. 254 "A String", 255 ], 256 "advertiserName": "A String", # The name of the company being advertised in the creative. 257 "agencyId": "A String", # The agency id for this creative. 258 "apiUploadTimestamp": "A String", # The last upload timestamp of this creative if it was uploaded via API. Read-only. The value of this field is generated, and will be ignored for uploads. (formatted RFC 3339 timestamp). 259 "attribute": [ # All attributes for the ads that may be shown from this snippet. 260 42, 261 ], 262 "buyerCreativeId": "A String", # A buyer-specific id identifying the creative in this ad. 263 "clickThroughUrl": [ # The set of destination urls for the snippet. 264 "A String", 265 ], 266 "corrections": [ # Shows any corrections that were applied to this creative. Read-only. This field should not be set in requests. 267 { 268 "details": [ # Additional details about the correction. 269 "A String", 270 ], 271 "reason": "A String", # The type of correction that was applied to the creative. 272 }, 273 ], 274 "disapprovalReasons": [ # The reasons for disapproval, if any. Note that not all disapproval reasons may be categorized, so it is possible for the creative to have a status of DISAPPROVED with an empty list for disapproval_reasons. In this case, please reach out to your TAM to help debug the issue. Read-only. This field should not be set in requests. 275 { 276 "details": [ # Additional details about the reason for disapproval. 277 "A String", 278 ], 279 "reason": "A String", # The categorized reason for disapproval. 280 }, 281 ], 282 "filteringReasons": { # The filtering reasons for the creative. Read-only. This field should not be set in requests. 283 "date": "A String", # The date in ISO 8601 format for the data. The data is collected from 00:00:00 to 23:59:59 in PST. 284 "reasons": [ # The filtering reasons. 285 { 286 "filteringCount": "A String", # The number of times the creative was filtered for the status. The count is aggregated across all publishers on the exchange. 287 "filteringStatus": 42, # The filtering status code. Please refer to the creative-status-codes.txt file for different statuses. 288 }, 289 ], 290 }, 291 "height": 42, # Ad height. 292 "impressionTrackingUrl": [ # The set of urls to be called to record an impression. 293 "A String", 294 ], 295 "kind": "adexchangebuyer#creative", # Resource type. 296 "productCategories": [ # Detected product categories, if any. Read-only. This field should not be set in requests. 297 42, 298 ], 299 "restrictedCategories": [ # All restricted categories for the ads that may be shown from this snippet. 300 42, 301 ], 302 "sensitiveCategories": [ # Detected sensitive categories, if any. Read-only. This field should not be set in requests. 303 42, 304 ], 305 "status": "A String", # Creative serving status. Read-only. This field should not be set in requests. 306 "vendorType": [ # All vendor types for the ads that may be shown from this snippet. 307 42, 308 ], 309 "version": 42, # The version for this creative. Read-only. This field should not be set in requests. 310 "videoURL": "A String", # The url to fetch a video ad. If set, HTMLSnippet should not be set. 311 "width": 42, # Ad width. 312}</pre> 313</div> 314 315<div class="method"> 316 <code class="details" id="list">list(maxResults=None, pageToken=None, statusFilter=None)</code> 317 <pre>Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission. 318 319Args: 320 maxResults: integer, Maximum number of entries returned on one result page. If not set, the default is 100. Optional. 321 pageToken: string, A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional. 322 statusFilter: string, When specified, only creatives having the given status are returned. 323 Allowed values 324 approved - Creatives which have been approved. 325 disapproved - Creatives which have been disapproved. 326 not_checked - Creatives whose status is not yet checked. 327 328Returns: 329 An object of the form: 330 331 { # The creatives feed lists the active creatives for the Ad Exchange buyer accounts that the user has access to. Each entry in the feed corresponds to a single creative. 332 "items": [ # A list of creatives. 333 { # A creative and its classification data. 334 "HTMLSnippet": "A String", # The HTML snippet that displays the ad when inserted in the web page. If set, videoURL should not be set. 335 "accountId": 42, # Account id. 336 "advertiserId": [ # Detected advertiser id, if any. Read-only. This field should not be set in requests. 337 "A String", 338 ], 339 "advertiserName": "A String", # The name of the company being advertised in the creative. 340 "agencyId": "A String", # The agency id for this creative. 341 "apiUploadTimestamp": "A String", # The last upload timestamp of this creative if it was uploaded via API. Read-only. The value of this field is generated, and will be ignored for uploads. (formatted RFC 3339 timestamp). 342 "attribute": [ # All attributes for the ads that may be shown from this snippet. 343 42, 344 ], 345 "buyerCreativeId": "A String", # A buyer-specific id identifying the creative in this ad. 346 "clickThroughUrl": [ # The set of destination urls for the snippet. 347 "A String", 348 ], 349 "corrections": [ # Shows any corrections that were applied to this creative. Read-only. This field should not be set in requests. 350 { 351 "details": [ # Additional details about the correction. 352 "A String", 353 ], 354 "reason": "A String", # The type of correction that was applied to the creative. 355 }, 356 ], 357 "disapprovalReasons": [ # The reasons for disapproval, if any. Note that not all disapproval reasons may be categorized, so it is possible for the creative to have a status of DISAPPROVED with an empty list for disapproval_reasons. In this case, please reach out to your TAM to help debug the issue. Read-only. This field should not be set in requests. 358 { 359 "details": [ # Additional details about the reason for disapproval. 360 "A String", 361 ], 362 "reason": "A String", # The categorized reason for disapproval. 363 }, 364 ], 365 "filteringReasons": { # The filtering reasons for the creative. Read-only. This field should not be set in requests. 366 "date": "A String", # The date in ISO 8601 format for the data. The data is collected from 00:00:00 to 23:59:59 in PST. 367 "reasons": [ # The filtering reasons. 368 { 369 "filteringCount": "A String", # The number of times the creative was filtered for the status. The count is aggregated across all publishers on the exchange. 370 "filteringStatus": 42, # The filtering status code. Please refer to the creative-status-codes.txt file for different statuses. 371 }, 372 ], 373 }, 374 "height": 42, # Ad height. 375 "impressionTrackingUrl": [ # The set of urls to be called to record an impression. 376 "A String", 377 ], 378 "kind": "adexchangebuyer#creative", # Resource type. 379 "productCategories": [ # Detected product categories, if any. Read-only. This field should not be set in requests. 380 42, 381 ], 382 "restrictedCategories": [ # All restricted categories for the ads that may be shown from this snippet. 383 42, 384 ], 385 "sensitiveCategories": [ # Detected sensitive categories, if any. Read-only. This field should not be set in requests. 386 42, 387 ], 388 "status": "A String", # Creative serving status. Read-only. This field should not be set in requests. 389 "vendorType": [ # All vendor types for the ads that may be shown from this snippet. 390 42, 391 ], 392 "version": 42, # The version for this creative. Read-only. This field should not be set in requests. 393 "videoURL": "A String", # The url to fetch a video ad. If set, HTMLSnippet should not be set. 394 "width": 42, # Ad width. 395 }, 396 ], 397 "kind": "adexchangebuyer#creativesList", # Resource type. 398 "nextPageToken": "A String", # Continuation token used to page through creatives. To retrieve the next page of results, set the next request's "pageToken" value to this. 399}</pre> 400</div> 401 402<div class="method"> 403 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 404 <pre>Retrieves the next page of results. 405 406Args: 407 previous_request: The request for the previous page. (required) 408 previous_response: The response from the request for the previous page. (required) 409 410Returns: 411 A request object that you can call 'execute()' on to request the next 412 page. Returns None if there are no more items in the collection. 413 </pre> 414</div> 415 416</body></html>