blob: 861be92f7c6c1ed78f1168c8fd6cf2be49fd61f7 [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -07001<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="content_v2.html">Content API for Shopping</a> . <a href="content_v2.accounts.html">accounts</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#custombatch">custombatch(body)</a></code></p>
79<p class="firstline">Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(merchantId, accountId)</a></code></p>
82<p class="firstline">Deletes a Merchant Center sub-account.</p>
83<p class="toc_element">
84 <code><a href="#get">get(merchantId, accountId)</a></code></p>
85<p class="firstline">Retrieves a Merchant Center account.</p>
86<p class="toc_element">
87 <code><a href="#insert">insert(merchantId, body)</a></code></p>
88<p class="firstline">Creates a Merchant Center sub-account.</p>
89<p class="toc_element">
90 <code><a href="#list">list(merchantId, pageToken=None, maxResults=None)</a></code></p>
91<p class="firstline">Lists the sub-accounts in your Merchant Center account.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96 <code><a href="#patch">patch(merchantId, accountId, body)</a></code></p>
97<p class="firstline">Updates a Merchant Center account. This method supports patch semantics.</p>
98<p class="toc_element">
99 <code><a href="#update">update(merchantId, accountId, body)</a></code></p>
100<p class="firstline">Updates a Merchant Center account.</p>
101<h3>Method Details</h3>
102<div class="method">
103 <code class="details" id="custombatch">custombatch(body)</code>
104 <pre>Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.
105
106Args:
107 body: object, The request body. (required)
108 The object takes the form of:
109
110{
111 "entries": [
112 { # A batch entry encoding a single non-batch request to the accounts service of the Content API for Shopping.
113 "batchId": 42, # An entry ID, unique within the batch request.
114 "method": "A String", # The method (get, insert, update, or delete).
115 "account": { # The account to create or update. Only defined if the method is insert or update.
116 "reviewsUrl": "A String", # URL for individual seller reviews, i.e., reviews for each child account.
117 "kind": "content#account", # Identifies what kind of resource this is. Value: the fixed string "content#account".
118 "name": "A String", # Display name for the account.
119 "adultContent": True or False, # Indicates whether the merchant sells adult content.
120 "id": "A String", # Merchant Center account ID.
121 "websiteUrl": "A String", # The merchant's website.
122 "sellerId": "A String", # Client-specific, locally-unique, internal ID for the child account.
123 "adwordsLinks": [ # List of linked AdWords accounts.
124 {
125 "status": "A String", # Status of the link between this Merchant Center account and the AdWords account.
126 "adwordsId": "A String", # Customer ID of the AdWords account.
127 },
128 ],
129 "users": [ # Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
130 {
131 "admin": True or False, # Whether user is an admin.
132 "emailAddress": "A String", # User's email address.
133 },
134 ],
135 },
136 "merchantId": "A String", # The ID of the managing account.
137 "accountId": "A String", # The ID of the account to get or delete. Only defined if the method is get or delete.
138 },
139 ],
140 }
141
142
143Returns:
144 An object of the form:
145
146 {
147 "kind": "content#accountsCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponse".
148 "entries": [
149 { # A batch entry encoding a single non-batch response from the accounts service of the Content API for Shopping.
150 "batchId": 42, # The ID of the request entry this entry responds to.
151 "account": { # The retrieved, created, or updated account. Not defined if the method was delete.
152 "reviewsUrl": "A String", # URL for individual seller reviews, i.e., reviews for each child account.
153 "kind": "content#account", # Identifies what kind of resource this is. Value: the fixed string "content#account".
154 "name": "A String", # Display name for the account.
155 "adultContent": True or False, # Indicates whether the merchant sells adult content.
156 "id": "A String", # Merchant Center account ID.
157 "websiteUrl": "A String", # The merchant's website.
158 "sellerId": "A String", # Client-specific, locally-unique, internal ID for the child account.
159 "adwordsLinks": [ # List of linked AdWords accounts.
160 {
161 "status": "A String", # Status of the link between this Merchant Center account and the AdWords account.
162 "adwordsId": "A String", # Customer ID of the AdWords account.
163 },
164 ],
165 "users": [ # Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
166 {
167 "admin": True or False, # Whether user is an admin.
168 "emailAddress": "A String", # User's email address.
169 },
170 ],
171 },
172 "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if and only if the request failed.
173 "message": "A String", # The message of the first error in errors.
174 "code": 42, # The HTTP status of the first error in errors.
175 "errors": [ # A list of errors.
176 { # An error returned by the API.
177 "reason": "A String", # The error code.
178 "domain": "A String", # The domain of the error.
179 "message": "A String", # A description of the error.
180 },
181 ],
182 },
183 "kind": "content#accountsCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponseEntry".
184 },
185 ],
186 }</pre>
187</div>
188
189<div class="method">
190 <code class="details" id="delete">delete(merchantId, accountId)</code>
191 <pre>Deletes a Merchant Center sub-account.
192
193Args:
194 merchantId: string, The ID of the managing account. (required)
195 accountId: string, The ID of the account. (required)
196</pre>
197</div>
198
199<div class="method">
200 <code class="details" id="get">get(merchantId, accountId)</code>
201 <pre>Retrieves a Merchant Center account.
202
203Args:
204 merchantId: string, The ID of the managing account. (required)
205 accountId: string, The ID of the account. (required)
206
207Returns:
208 An object of the form:
209
210 {
211 "reviewsUrl": "A String", # URL for individual seller reviews, i.e., reviews for each child account.
212 "kind": "content#account", # Identifies what kind of resource this is. Value: the fixed string "content#account".
213 "name": "A String", # Display name for the account.
214 "adultContent": True or False, # Indicates whether the merchant sells adult content.
215 "id": "A String", # Merchant Center account ID.
216 "websiteUrl": "A String", # The merchant's website.
217 "sellerId": "A String", # Client-specific, locally-unique, internal ID for the child account.
218 "adwordsLinks": [ # List of linked AdWords accounts.
219 {
220 "status": "A String", # Status of the link between this Merchant Center account and the AdWords account.
221 "adwordsId": "A String", # Customer ID of the AdWords account.
222 },
223 ],
224 "users": [ # Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
225 {
226 "admin": True or False, # Whether user is an admin.
227 "emailAddress": "A String", # User's email address.
228 },
229 ],
230 }</pre>
231</div>
232
233<div class="method">
234 <code class="details" id="insert">insert(merchantId, body)</code>
235 <pre>Creates a Merchant Center sub-account.
236
237Args:
238 merchantId: string, The ID of the managing account. (required)
239 body: object, The request body. (required)
240 The object takes the form of:
241
242{
243 "reviewsUrl": "A String", # URL for individual seller reviews, i.e., reviews for each child account.
244 "kind": "content#account", # Identifies what kind of resource this is. Value: the fixed string "content#account".
245 "name": "A String", # Display name for the account.
246 "adultContent": True or False, # Indicates whether the merchant sells adult content.
247 "id": "A String", # Merchant Center account ID.
248 "websiteUrl": "A String", # The merchant's website.
249 "sellerId": "A String", # Client-specific, locally-unique, internal ID for the child account.
250 "adwordsLinks": [ # List of linked AdWords accounts.
251 {
252 "status": "A String", # Status of the link between this Merchant Center account and the AdWords account.
253 "adwordsId": "A String", # Customer ID of the AdWords account.
254 },
255 ],
256 "users": [ # Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
257 {
258 "admin": True or False, # Whether user is an admin.
259 "emailAddress": "A String", # User's email address.
260 },
261 ],
262 }
263
264
265Returns:
266 An object of the form:
267
268 {
269 "reviewsUrl": "A String", # URL for individual seller reviews, i.e., reviews for each child account.
270 "kind": "content#account", # Identifies what kind of resource this is. Value: the fixed string "content#account".
271 "name": "A String", # Display name for the account.
272 "adultContent": True or False, # Indicates whether the merchant sells adult content.
273 "id": "A String", # Merchant Center account ID.
274 "websiteUrl": "A String", # The merchant's website.
275 "sellerId": "A String", # Client-specific, locally-unique, internal ID for the child account.
276 "adwordsLinks": [ # List of linked AdWords accounts.
277 {
278 "status": "A String", # Status of the link between this Merchant Center account and the AdWords account.
279 "adwordsId": "A String", # Customer ID of the AdWords account.
280 },
281 ],
282 "users": [ # Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
283 {
284 "admin": True or False, # Whether user is an admin.
285 "emailAddress": "A String", # User's email address.
286 },
287 ],
288 }</pre>
289</div>
290
291<div class="method">
292 <code class="details" id="list">list(merchantId, pageToken=None, maxResults=None)</code>
293 <pre>Lists the sub-accounts in your Merchant Center account.
294
295Args:
296 merchantId: string, The ID of the managing account. (required)
297 pageToken: string, The token returned by the previous request.
298 maxResults: integer, The maximum number of accounts to return in the response, used for paging.
299
300Returns:
301 An object of the form:
302
303 {
304 "nextPageToken": "A String",
305 "kind": "content#accountsListResponse", # Identifies what kind of resource this is. Value: the fixed string "content#accountsListResponse".
306 "resources": [
307 {
308 "reviewsUrl": "A String", # URL for individual seller reviews, i.e., reviews for each child account.
309 "kind": "content#account", # Identifies what kind of resource this is. Value: the fixed string "content#account".
310 "name": "A String", # Display name for the account.
311 "adultContent": True or False, # Indicates whether the merchant sells adult content.
312 "id": "A String", # Merchant Center account ID.
313 "websiteUrl": "A String", # The merchant's website.
314 "sellerId": "A String", # Client-specific, locally-unique, internal ID for the child account.
315 "adwordsLinks": [ # List of linked AdWords accounts.
316 {
317 "status": "A String", # Status of the link between this Merchant Center account and the AdWords account.
318 "adwordsId": "A String", # Customer ID of the AdWords account.
319 },
320 ],
321 "users": [ # Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
322 {
323 "admin": True or False, # Whether user is an admin.
324 "emailAddress": "A String", # User's email address.
325 },
326 ],
327 },
328 ],
329 }</pre>
330</div>
331
332<div class="method">
333 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
334 <pre>Retrieves the next page of results.
335
336Args:
337 previous_request: The request for the previous page. (required)
338 previous_response: The response from the request for the previous page. (required)
339
340Returns:
341 A request object that you can call 'execute()' on to request the next
342 page. Returns None if there are no more items in the collection.
343 </pre>
344</div>
345
346<div class="method">
347 <code class="details" id="patch">patch(merchantId, accountId, body)</code>
348 <pre>Updates a Merchant Center account. This method supports patch semantics.
349
350Args:
351 merchantId: string, The ID of the managing account. (required)
352 accountId: string, The ID of the account. (required)
353 body: object, The request body. (required)
354 The object takes the form of:
355
356{
357 "reviewsUrl": "A String", # URL for individual seller reviews, i.e., reviews for each child account.
358 "kind": "content#account", # Identifies what kind of resource this is. Value: the fixed string "content#account".
359 "name": "A String", # Display name for the account.
360 "adultContent": True or False, # Indicates whether the merchant sells adult content.
361 "id": "A String", # Merchant Center account ID.
362 "websiteUrl": "A String", # The merchant's website.
363 "sellerId": "A String", # Client-specific, locally-unique, internal ID for the child account.
364 "adwordsLinks": [ # List of linked AdWords accounts.
365 {
366 "status": "A String", # Status of the link between this Merchant Center account and the AdWords account.
367 "adwordsId": "A String", # Customer ID of the AdWords account.
368 },
369 ],
370 "users": [ # Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
371 {
372 "admin": True or False, # Whether user is an admin.
373 "emailAddress": "A String", # User's email address.
374 },
375 ],
376 }
377
378
379Returns:
380 An object of the form:
381
382 {
383 "reviewsUrl": "A String", # URL for individual seller reviews, i.e., reviews for each child account.
384 "kind": "content#account", # Identifies what kind of resource this is. Value: the fixed string "content#account".
385 "name": "A String", # Display name for the account.
386 "adultContent": True or False, # Indicates whether the merchant sells adult content.
387 "id": "A String", # Merchant Center account ID.
388 "websiteUrl": "A String", # The merchant's website.
389 "sellerId": "A String", # Client-specific, locally-unique, internal ID for the child account.
390 "adwordsLinks": [ # List of linked AdWords accounts.
391 {
392 "status": "A String", # Status of the link between this Merchant Center account and the AdWords account.
393 "adwordsId": "A String", # Customer ID of the AdWords account.
394 },
395 ],
396 "users": [ # Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
397 {
398 "admin": True or False, # Whether user is an admin.
399 "emailAddress": "A String", # User's email address.
400 },
401 ],
402 }</pre>
403</div>
404
405<div class="method">
406 <code class="details" id="update">update(merchantId, accountId, body)</code>
407 <pre>Updates a Merchant Center account.
408
409Args:
410 merchantId: string, The ID of the managing account. (required)
411 accountId: string, The ID of the account. (required)
412 body: object, The request body. (required)
413 The object takes the form of:
414
415{
416 "reviewsUrl": "A String", # URL for individual seller reviews, i.e., reviews for each child account.
417 "kind": "content#account", # Identifies what kind of resource this is. Value: the fixed string "content#account".
418 "name": "A String", # Display name for the account.
419 "adultContent": True or False, # Indicates whether the merchant sells adult content.
420 "id": "A String", # Merchant Center account ID.
421 "websiteUrl": "A String", # The merchant's website.
422 "sellerId": "A String", # Client-specific, locally-unique, internal ID for the child account.
423 "adwordsLinks": [ # List of linked AdWords accounts.
424 {
425 "status": "A String", # Status of the link between this Merchant Center account and the AdWords account.
426 "adwordsId": "A String", # Customer ID of the AdWords account.
427 },
428 ],
429 "users": [ # Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
430 {
431 "admin": True or False, # Whether user is an admin.
432 "emailAddress": "A String", # User's email address.
433 },
434 ],
435 }
436
437
438Returns:
439 An object of the form:
440
441 {
442 "reviewsUrl": "A String", # URL for individual seller reviews, i.e., reviews for each child account.
443 "kind": "content#account", # Identifies what kind of resource this is. Value: the fixed string "content#account".
444 "name": "A String", # Display name for the account.
445 "adultContent": True or False, # Indicates whether the merchant sells adult content.
446 "id": "A String", # Merchant Center account ID.
447 "websiteUrl": "A String", # The merchant's website.
448 "sellerId": "A String", # Client-specific, locally-unique, internal ID for the child account.
449 "adwordsLinks": [ # List of linked AdWords accounts.
450 {
451 "status": "A String", # Status of the link between this Merchant Center account and the AdWords account.
452 "adwordsId": "A String", # Customer ID of the AdWords account.
453 },
454 ],
455 "users": [ # Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
456 {
457 "admin": True or False, # Whether user is an admin.
458 "emailAddress": "A String", # User's email address.
459 },
460 ],
461 }</pre>
462</div>
463
464</body></html>