blob: 1a009515225f523999f9c0da08324acfd99ca242 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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.pos.html">pos</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#custombatch">custombatch(body=None, dryRun=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Batches multiple POS-related calls in a single request.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(merchantId, targetMerchantId, storeCode, dryRun=None)</a></code></p>
82<p class="firstline">Deletes a store for the given merchant.</p>
83<p class="toc_element">
84 <code><a href="#get">get(merchantId, targetMerchantId, storeCode)</a></code></p>
85<p class="firstline">Retrieves information about the given store.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#insert">insert(merchantId, targetMerchantId, body=None, dryRun=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Creates a store for the given merchant.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#inventory">inventory(merchantId, targetMerchantId, body=None, dryRun=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Submit inventory for the given merchant.</p>
92<p class="toc_element">
93 <code><a href="#list">list(merchantId, targetMerchantId)</a></code></p>
94<p class="firstline">Lists the stores of the target merchant.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#sale">sale(merchantId, targetMerchantId, body=None, dryRun=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Submit a sale event for the given merchant.</p>
98<h3>Method Details</h3>
99<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700100 <code class="details" id="custombatch">custombatch(body=None, dryRun=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101 <pre>Batches multiple POS-related calls in a single request.
102
103Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700104 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700105 The object takes the form of:
106
107{
108 "entries": [ # The request entries to be processed in the batch.
109 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700110 "storeCode": "A String", # The store code. Set this only if the method is `delete` or `get`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111 "targetMerchantId": "A String", # The ID of the account for which to get/submit data.
Dan O'Mearadd494642020-05-01 07:42:23 -0700112 "sale": { # The change of the available quantity of an item at the given store. # The sale information to submit. Set this only if the method is `sale`.
113 "itemId": "A String", # Required. A unique identifier for the item.
114 "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business.
115 "kind": "content#posSale", # Identifies what kind of resource this is. Value: the fixed string "`content#posSale`"
116 "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item.
117 "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format.
118 "price": { # Required. The price of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119 "currency": "A String", # The currency of the price.
120 "value": "A String", # The price represented as a number.
121 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700122 "targetCountry": "A String", # Required. The CLDR territory code for the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 "gtin": "A String", # Global Trade Item Number.
124 "saleId": "A String", # A unique ID to group items from the same sale event.
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 },
127 "merchantId": "A String", # The ID of the POS data provider.
128 "batchId": 42, # An entry ID, unique within the batch request.
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 "inventory": { # The absolute quantity of an item available at the given store. # The inventory to submit. Set this only if the method is `inventory`.
130 "itemId": "A String", # Required. A unique identifier for the item.
131 "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business.
132 "kind": "content#posInventory", # Identifies what kind of resource this is. Value: the fixed string "`content#posInventory`"
133 "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item.
134 "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format.
135 "price": { # Required. The current price of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136 "currency": "A String", # The currency of the price.
137 "value": "A String", # The price represented as a number.
138 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700139 "targetCountry": "A String", # Required. The CLDR territory code for the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700140 "gtin": "A String", # Global Trade Item Number.
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 "quantity": "A String", # Required. The available quantity of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 "method": "A String", # The method of the batch entry.
144 #
145 # Acceptable values are:
146 # - "`delete`"
147 # - "`get`"
148 # - "`insert`"
149 # - "`inventory`"
150 # - "`sale`"
151 "store": { # Store resource. # The store information to submit. Set this only if the method is `insert`.
152 "storeAddress": "A String", # Required. The street address of the store.
153 "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`"
154 "storeCode": "A String", # Required. A store identifier that is unique for the given merchant.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700155 },
156 },
157 ],
158 }
159
160 dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
161
162Returns:
163 An object of the form:
164
165 {
166 "kind": "content#posCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posCustomBatchResponse".
167 "entries": [ # The result of the execution of the batch requests.
168 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700169 "kind": "content#posCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "`content#posCustomBatchResponseEntry`"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700170 "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if, and only if, the request failed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 "message": "A String", # The message of the first error in `errors`.
172 "code": 42, # The HTTP status of the first error in `errors`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700173 "errors": [ # A list of errors.
174 { # An error returned by the API.
175 "reason": "A String", # The error code.
176 "domain": "A String", # The domain of the error.
177 "message": "A String", # A description of the error.
178 },
179 ],
180 },
181 "sale": { # The change of the available quantity of an item at the given store. # The updated sale information.
Dan O'Mearadd494642020-05-01 07:42:23 -0700182 "itemId": "A String", # Required. A unique identifier for the item.
183 "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business.
184 "kind": "content#posSale", # Identifies what kind of resource this is. Value: the fixed string "`content#posSale`"
185 "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item.
186 "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format.
187 "price": { # Required. The price of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700188 "currency": "A String", # The currency of the price.
189 "value": "A String", # The price represented as a number.
190 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 "targetCountry": "A String", # Required. The CLDR territory code for the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700192 "gtin": "A String", # Global Trade Item Number.
193 "saleId": "A String", # A unique ID to group items from the same sale event.
Dan O'Mearadd494642020-05-01 07:42:23 -0700194 "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700195 },
196 "batchId": 42, # The ID of the request entry to which this entry responds.
197 "inventory": { # The absolute quantity of an item available at the given store. # The updated inventory information.
Dan O'Mearadd494642020-05-01 07:42:23 -0700198 "itemId": "A String", # Required. A unique identifier for the item.
199 "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business.
200 "kind": "content#posInventory", # Identifies what kind of resource this is. Value: the fixed string "`content#posInventory`"
201 "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item.
202 "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format.
203 "price": { # Required. The current price of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 "currency": "A String", # The currency of the price.
205 "value": "A String", # The price represented as a number.
206 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700207 "targetCountry": "A String", # Required. The CLDR territory code for the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208 "gtin": "A String", # Global Trade Item Number.
Dan O'Mearadd494642020-05-01 07:42:23 -0700209 "quantity": "A String", # Required. The available quantity of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 },
211 "store": { # Store resource. # The retrieved or updated store information.
Dan O'Mearadd494642020-05-01 07:42:23 -0700212 "storeAddress": "A String", # Required. The street address of the store.
213 "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`"
214 "storeCode": "A String", # Required. A store identifier that is unique for the given merchant.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700215 },
216 },
217 ],
218 }</pre>
219</div>
220
221<div class="method">
222 <code class="details" id="delete">delete(merchantId, targetMerchantId, storeCode, dryRun=None)</code>
223 <pre>Deletes a store for the given merchant.
224
225Args:
226 merchantId: string, The ID of the POS or inventory data provider. (required)
227 targetMerchantId: string, The ID of the target merchant. (required)
228 storeCode: string, A store code that is unique per merchant. (required)
229 dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
230</pre>
231</div>
232
233<div class="method">
234 <code class="details" id="get">get(merchantId, targetMerchantId, storeCode)</code>
235 <pre>Retrieves information about the given store.
236
237Args:
238 merchantId: string, The ID of the POS or inventory data provider. (required)
239 targetMerchantId: string, The ID of the target merchant. (required)
240 storeCode: string, A store code that is unique per merchant. (required)
241
242Returns:
243 An object of the form:
244
245 { # Store resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700246 "storeAddress": "A String", # Required. The street address of the store.
247 "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`"
248 "storeCode": "A String", # Required. A store identifier that is unique for the given merchant.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 }</pre>
250</div>
251
252<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 <code class="details" id="insert">insert(merchantId, targetMerchantId, body=None, dryRun=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 <pre>Creates a store for the given merchant.
255
256Args:
257 merchantId: string, The ID of the POS or inventory data provider. (required)
258 targetMerchantId: string, The ID of the target merchant. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700259 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 The object takes the form of:
261
262{ # Store resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700263 "storeAddress": "A String", # Required. The street address of the store.
264 "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`"
265 "storeCode": "A String", # Required. A store identifier that is unique for the given merchant.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700266 }
267
268 dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
269
270Returns:
271 An object of the form:
272
273 { # Store resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700274 "storeAddress": "A String", # Required. The street address of the store.
275 "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`"
276 "storeCode": "A String", # Required. A store identifier that is unique for the given merchant.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277 }</pre>
278</div>
279
280<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700281 <code class="details" id="inventory">inventory(merchantId, targetMerchantId, body=None, dryRun=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700282 <pre>Submit inventory for the given merchant.
283
284Args:
285 merchantId: string, The ID of the POS or inventory data provider. (required)
286 targetMerchantId: string, The ID of the target merchant. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700287 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 The object takes the form of:
289
290{
Dan O'Mearadd494642020-05-01 07:42:23 -0700291 "itemId": "A String", # Required. A unique identifier for the item.
292 "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business.
293 "targetCountry": "A String", # Required. The CLDR territory code for the item.
294 "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item.
295 "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format.
296 "price": { # Required. The current price of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700297 "currency": "A String", # The currency of the price.
298 "value": "A String", # The price represented as a number.
299 },
300 "gtin": "A String", # Global Trade Item Number.
Dan O'Mearadd494642020-05-01 07:42:23 -0700301 "quantity": "A String", # Required. The available quantity of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700302 }
303
304 dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
305
306Returns:
307 An object of the form:
308
309 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700310 "itemId": "A String", # Required. A unique identifier for the item.
311 "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312 "kind": "content#posInventoryResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posInventoryResponse".
Dan O'Mearadd494642020-05-01 07:42:23 -0700313 "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item.
314 "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format.
315 "price": { # Required. The current price of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 "currency": "A String", # The currency of the price.
317 "value": "A String", # The price represented as a number.
318 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 "targetCountry": "A String", # Required. The CLDR territory code for the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700320 "gtin": "A String", # Global Trade Item Number.
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 "quantity": "A String", # Required. The available quantity of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700322 }</pre>
323</div>
324
325<div class="method">
326 <code class="details" id="list">list(merchantId, targetMerchantId)</code>
327 <pre>Lists the stores of the target merchant.
328
329Args:
330 merchantId: string, The ID of the POS or inventory data provider. (required)
331 targetMerchantId: string, The ID of the target merchant. (required)
332
333Returns:
334 An object of the form:
335
336 {
337 "kind": "content#posListResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posListResponse".
338 "resources": [
339 { # Store resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700340 "storeAddress": "A String", # Required. The street address of the store.
341 "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`"
342 "storeCode": "A String", # Required. A store identifier that is unique for the given merchant.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700343 },
344 ],
345 }</pre>
346</div>
347
348<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700349 <code class="details" id="sale">sale(merchantId, targetMerchantId, body=None, dryRun=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700350 <pre>Submit a sale event for the given merchant.
351
352Args:
353 merchantId: string, The ID of the POS or inventory data provider. (required)
354 targetMerchantId: string, The ID of the target merchant. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700355 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700356 The object takes the form of:
357
358{
Dan O'Mearadd494642020-05-01 07:42:23 -0700359 "itemId": "A String", # Required. A unique identifier for the item.
360 "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business.
361 "targetCountry": "A String", # Required. The CLDR territory code for the item.
362 "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item.
363 "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format.
364 "price": { # Required. The price of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700365 "currency": "A String", # The currency of the price.
366 "value": "A String", # The price represented as a number.
367 },
368 "saleId": "A String", # A unique ID to group items from the same sale event.
369 "gtin": "A String", # Global Trade Item Number.
Dan O'Mearadd494642020-05-01 07:42:23 -0700370 "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700371 }
372
373 dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
374
375Returns:
376 An object of the form:
377
378 {
Dan O'Mearadd494642020-05-01 07:42:23 -0700379 "itemId": "A String", # Required. A unique identifier for the item.
380 "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700381 "kind": "content#posSaleResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posSaleResponse".
Dan O'Mearadd494642020-05-01 07:42:23 -0700382 "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item.
383 "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format.
384 "price": { # Required. The price of the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 "currency": "A String", # The currency of the price.
386 "value": "A String", # The price represented as a number.
387 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700388 "targetCountry": "A String", # Required. The CLDR territory code for the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700389 "gtin": "A String", # Global Trade Item Number.
390 "saleId": "A String", # A unique ID to group items from the same sale event.
Dan O'Mearadd494642020-05-01 07:42:23 -0700391 "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 }</pre>
393</div>
394
395</body></html>