• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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="content_v2_1.html">Content API for Shopping</a> . <a href="content_v2_1.pos.html">pos</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">Batches multiple POS-related calls in a single request.</p>
80<p class="toc_element">
81  <code><a href="#delete">delete(merchantId, targetMerchantId, storeCode)</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">
87  <code><a href="#insert">insert(merchantId, targetMerchantId, body)</a></code></p>
88<p class="firstline">Creates a store for the given merchant.</p>
89<p class="toc_element">
90  <code><a href="#inventory">inventory(merchantId, targetMerchantId, body)</a></code></p>
91<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">
96  <code><a href="#sale">sale(merchantId, targetMerchantId, body)</a></code></p>
97<p class="firstline">Submit a sale event for the given merchant.</p>
98<h3>Method Details</h3>
99<div class="method">
100    <code class="details" id="custombatch">custombatch(body)</code>
101  <pre>Batches multiple POS-related calls in a single request.
102
103Args:
104  body: object, The request body. (required)
105    The object takes the form of:
106
107{
108    "entries": [ # The request entries to be processed in the batch.
109      {
110        "storeCode": "A String", # The store code. Set this only if the method is delete or get.
111        "targetMerchantId": "A String", # The ID of the account for which to get/submit data.
112        "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", # A unique identifier for the item.
114          "storeCode": "A String", # 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", # The two-letter ISO 639-1 language code for the item.
117          "timestamp": "A String", # The inventory timestamp, in ISO 8601 format.
118          "price": { # The price of the item.
119            "currency": "A String", # The currency of the price.
120            "value": "A String", # The price represented as a number.
121          },
122          "targetCountry": "A String", # The CLDR territory code for the item.
123          "gtin": "A String", # Global Trade Item Number.
124          "saleId": "A String", # A unique ID to group items from the same sale event.
125          "quantity": "A String", # The relative change of the available quantity. Negative for items returned.
126        },
127        "merchantId": "A String", # The ID of the POS data provider.
128        "batchId": 42, # An entry ID, unique within the batch request.
129        "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", # A unique identifier for the item.
131          "storeCode": "A String", # 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", # The two-letter ISO 639-1 language code for the item.
134          "timestamp": "A String", # The inventory timestamp, in ISO 8601 format.
135          "price": { # The current price of the item.
136            "currency": "A String", # The currency of the price.
137            "value": "A String", # The price represented as a number.
138          },
139          "targetCountry": "A String", # The CLDR territory code for the item.
140          "gtin": "A String", # Global Trade Item Number.
141          "quantity": "A String", # The available quantity of the item.
142        },
143        "method": "A String",
144        "store": { # Store resource. # The store information to submit. Set this only if the method is insert.
145            "storeAddress": "A String", # The street address of the store.
146            "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "content#posStore".
147            "storeCode": "A String", # A store identifier that is unique for the given merchant.
148          },
149      },
150    ],
151  }
152
153
154Returns:
155  An object of the form:
156
157    {
158    "kind": "content#posCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posCustomBatchResponse".
159    "entries": [ # The result of the execution of the batch requests.
160      {
161        "kind": "content#posCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "content#posCustomBatchResponseEntry".
162        "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if, and only if, the request failed.
163          "message": "A String", # The message of the first error in errors.
164          "code": 42, # The HTTP status of the first error in errors.
165          "errors": [ # A list of errors.
166            { # An error returned by the API.
167              "reason": "A String", # The error code.
168              "domain": "A String", # The domain of the error.
169              "message": "A String", # A description of the error.
170            },
171          ],
172        },
173        "sale": { # The change of the available quantity of an item at the given store. # The updated sale information.
174          "itemId": "A String", # A unique identifier for the item.
175          "storeCode": "A String", # The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.
176          "kind": "content#posSale", # Identifies what kind of resource this is. Value: the fixed string "content#posSale".
177          "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item.
178          "timestamp": "A String", # The inventory timestamp, in ISO 8601 format.
179          "price": { # The price of the item.
180            "currency": "A String", # The currency of the price.
181            "value": "A String", # The price represented as a number.
182          },
183          "targetCountry": "A String", # The CLDR territory code for the item.
184          "gtin": "A String", # Global Trade Item Number.
185          "saleId": "A String", # A unique ID to group items from the same sale event.
186          "quantity": "A String", # The relative change of the available quantity. Negative for items returned.
187        },
188        "batchId": 42, # The ID of the request entry to which this entry responds.
189        "inventory": { # The absolute quantity of an item available at the given store. # The updated inventory information.
190          "itemId": "A String", # A unique identifier for the item.
191          "storeCode": "A String", # The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.
192          "kind": "content#posInventory", # Identifies what kind of resource this is. Value: the fixed string "content#posInventory".
193          "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item.
194          "timestamp": "A String", # The inventory timestamp, in ISO 8601 format.
195          "price": { # The current price of the item.
196            "currency": "A String", # The currency of the price.
197            "value": "A String", # The price represented as a number.
198          },
199          "targetCountry": "A String", # The CLDR territory code for the item.
200          "gtin": "A String", # Global Trade Item Number.
201          "quantity": "A String", # The available quantity of the item.
202        },
203        "store": { # Store resource. # The retrieved or updated store information.
204            "storeAddress": "A String", # The street address of the store.
205            "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "content#posStore".
206            "storeCode": "A String", # A store identifier that is unique for the given merchant.
207          },
208      },
209    ],
210  }</pre>
211</div>
212
213<div class="method">
214    <code class="details" id="delete">delete(merchantId, targetMerchantId, storeCode)</code>
215  <pre>Deletes a store for the given merchant.
216
217Args:
218  merchantId: string, The ID of the POS or inventory data provider. (required)
219  targetMerchantId: string, The ID of the target merchant. (required)
220  storeCode: string, A store code that is unique per merchant. (required)
221</pre>
222</div>
223
224<div class="method">
225    <code class="details" id="get">get(merchantId, targetMerchantId, storeCode)</code>
226  <pre>Retrieves information about the given store.
227
228Args:
229  merchantId: string, The ID of the POS or inventory data provider. (required)
230  targetMerchantId: string, The ID of the target merchant. (required)
231  storeCode: string, A store code that is unique per merchant. (required)
232
233Returns:
234  An object of the form:
235
236    { # Store resource.
237      "storeAddress": "A String", # The street address of the store.
238      "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "content#posStore".
239      "storeCode": "A String", # A store identifier that is unique for the given merchant.
240    }</pre>
241</div>
242
243<div class="method">
244    <code class="details" id="insert">insert(merchantId, targetMerchantId, body)</code>
245  <pre>Creates a store for the given merchant.
246
247Args:
248  merchantId: string, The ID of the POS or inventory data provider. (required)
249  targetMerchantId: string, The ID of the target merchant. (required)
250  body: object, The request body. (required)
251    The object takes the form of:
252
253{ # Store resource.
254    "storeAddress": "A String", # The street address of the store.
255    "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "content#posStore".
256    "storeCode": "A String", # A store identifier that is unique for the given merchant.
257  }
258
259
260Returns:
261  An object of the form:
262
263    { # Store resource.
264      "storeAddress": "A String", # The street address of the store.
265      "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "content#posStore".
266      "storeCode": "A String", # A store identifier that is unique for the given merchant.
267    }</pre>
268</div>
269
270<div class="method">
271    <code class="details" id="inventory">inventory(merchantId, targetMerchantId, body)</code>
272  <pre>Submit inventory for the given merchant.
273
274Args:
275  merchantId: string, The ID of the POS or inventory data provider. (required)
276  targetMerchantId: string, The ID of the target merchant. (required)
277  body: object, The request body. (required)
278    The object takes the form of:
279
280{
281    "itemId": "A String", # A unique identifier for the item.
282    "storeCode": "A String", # The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.
283    "targetCountry": "A String", # The CLDR territory code for the item.
284    "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item.
285    "timestamp": "A String", # The inventory timestamp, in ISO 8601 format.
286    "price": { # The current price of the item.
287      "currency": "A String", # The currency of the price.
288      "value": "A String", # The price represented as a number.
289    },
290    "gtin": "A String", # Global Trade Item Number.
291    "quantity": "A String", # The available quantity of the item.
292  }
293
294
295Returns:
296  An object of the form:
297
298    {
299    "itemId": "A String", # A unique identifier for the item.
300    "storeCode": "A String", # The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.
301    "kind": "content#posInventoryResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posInventoryResponse".
302    "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item.
303    "timestamp": "A String", # The inventory timestamp, in ISO 8601 format.
304    "price": { # The current price of the item.
305      "currency": "A String", # The currency of the price.
306      "value": "A String", # The price represented as a number.
307    },
308    "targetCountry": "A String", # The CLDR territory code for the item.
309    "gtin": "A String", # Global Trade Item Number.
310    "quantity": "A String", # The available quantity of the item.
311  }</pre>
312</div>
313
314<div class="method">
315    <code class="details" id="list">list(merchantId, targetMerchantId)</code>
316  <pre>Lists the stores of the target merchant.
317
318Args:
319  merchantId: string, The ID of the POS or inventory data provider. (required)
320  targetMerchantId: string, The ID of the target merchant. (required)
321
322Returns:
323  An object of the form:
324
325    {
326    "kind": "content#posListResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posListResponse".
327    "resources": [
328      { # Store resource.
329          "storeAddress": "A String", # The street address of the store.
330          "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "content#posStore".
331          "storeCode": "A String", # A store identifier that is unique for the given merchant.
332        },
333    ],
334  }</pre>
335</div>
336
337<div class="method">
338    <code class="details" id="sale">sale(merchantId, targetMerchantId, body)</code>
339  <pre>Submit a sale event for the given merchant.
340
341Args:
342  merchantId: string, The ID of the POS or inventory data provider. (required)
343  targetMerchantId: string, The ID of the target merchant. (required)
344  body: object, The request body. (required)
345    The object takes the form of:
346
347{
348    "itemId": "A String", # A unique identifier for the item.
349    "storeCode": "A String", # The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.
350    "targetCountry": "A String", # The CLDR territory code for the item.
351    "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item.
352    "timestamp": "A String", # The inventory timestamp, in ISO 8601 format.
353    "price": { # The price of the item.
354      "currency": "A String", # The currency of the price.
355      "value": "A String", # The price represented as a number.
356    },
357    "saleId": "A String", # A unique ID to group items from the same sale event.
358    "gtin": "A String", # Global Trade Item Number.
359    "quantity": "A String", # The relative change of the available quantity. Negative for items returned.
360  }
361
362
363Returns:
364  An object of the form:
365
366    {
367    "itemId": "A String", # A unique identifier for the item.
368    "storeCode": "A String", # The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.
369    "kind": "content#posSaleResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posSaleResponse".
370    "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item.
371    "timestamp": "A String", # The inventory timestamp, in ISO 8601 format.
372    "price": { # The price of the item.
373      "currency": "A String", # The currency of the price.
374      "value": "A String", # The price represented as a number.
375    },
376    "targetCountry": "A String", # The CLDR territory code for the item.
377    "gtin": "A String", # Global Trade Item Number.
378    "saleId": "A String", # A unique ID to group items from the same sale event.
379    "quantity": "A String", # The relative change of the available quantity. Negative for items returned.
380  }</pre>
381</div>
382
383</body></html>