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