Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 78 | <code><a href="#custombatch">custombatch(body=None, dryRun=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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, 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 87 | <code><a href="#insert">insert(merchantId, targetMerchantId, body=None, dryRun=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 88 | <p class="firstline">Creates a store for the given merchant.</p> |
| 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 90 | <code><a href="#inventory">inventory(merchantId, targetMerchantId, body=None, dryRun=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 96 | <code><a href="#sale">sale(merchantId, targetMerchantId, body=None, dryRun=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <p class="firstline">Submit a sale event for the given merchant.</p> |
| 98 | <h3>Method Details</h3> |
| 99 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 100 | <code class="details" id="custombatch">custombatch(body=None, dryRun=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 101 | <pre>Batches multiple POS-related calls in a single request. |
| 102 | |
| 103 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 104 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 105 | The object takes the form of: |
| 106 | |
| 107 | { |
| 108 | "entries": [ # The request entries to be processed in the batch. |
| 109 | { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 110 | "storeCode": "A String", # The store code. Set this only if the method is `delete` or `get`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 111 | "targetMerchantId": "A String", # The ID of the account for which to get/submit data. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 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", # 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 119 | "currency": "A String", # The currency of the price. |
| 120 | "value": "A String", # The price represented as a number. |
| 121 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 122 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 123 | "gtin": "A String", # Global Trade Item Number. |
| 124 | "saleId": "A String", # A unique ID to group items from the same sale event. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 125 | "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 126 | }, |
| 127 | "merchantId": "A String", # The ID of the POS data provider. |
| 128 | "batchId": 42, # An entry ID, unique within the batch request. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 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", # 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 136 | "currency": "A String", # The currency of the price. |
| 137 | "value": "A String", # The price represented as a number. |
| 138 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 139 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 140 | "gtin": "A String", # Global Trade Item Number. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 141 | "quantity": "A String", # Required. The available quantity of the item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 142 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 143 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 155 | }, |
| 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 | |
| 162 | Returns: |
| 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 169 | "kind": "content#posCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "`content#posCustomBatchResponseEntry`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 170 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 171 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 173 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 182 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 188 | "currency": "A String", # The currency of the price. |
| 189 | "value": "A String", # The price represented as a number. |
| 190 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 191 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 192 | "gtin": "A String", # Global Trade Item Number. |
| 193 | "saleId": "A String", # A unique ID to group items from the same sale event. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 194 | "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 195 | }, |
| 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 198 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 204 | "currency": "A String", # The currency of the price. |
| 205 | "value": "A String", # The price represented as a number. |
| 206 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 207 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 208 | "gtin": "A String", # Global Trade Item Number. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 209 | "quantity": "A String", # Required. The available quantity of the item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 210 | }, |
| 211 | "store": { # Store resource. # The retrieved or updated store information. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 212 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 215 | }, |
| 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 | |
| 225 | Args: |
| 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 | |
| 237 | Args: |
| 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 | |
| 242 | Returns: |
| 243 | An object of the form: |
| 244 | |
| 245 | { # Store resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 246 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 249 | }</pre> |
| 250 | </div> |
| 251 | |
| 252 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 253 | <code class="details" id="insert">insert(merchantId, targetMerchantId, body=None, dryRun=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 254 | <pre>Creates a store for the given merchant. |
| 255 | |
| 256 | Args: |
| 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 259 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 260 | The object takes the form of: |
| 261 | |
| 262 | { # Store resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 263 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 266 | } |
| 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 | |
| 270 | Returns: |
| 271 | An object of the form: |
| 272 | |
| 273 | { # Store resource. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 274 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 277 | }</pre> |
| 278 | </div> |
| 279 | |
| 280 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 281 | <code class="details" id="inventory">inventory(merchantId, targetMerchantId, body=None, dryRun=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 282 | <pre>Submit inventory for the given merchant. |
| 283 | |
| 284 | Args: |
| 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 287 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 288 | The object takes the form of: |
| 289 | |
| 290 | { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 291 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 297 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 301 | "quantity": "A String", # Required. The available quantity of the item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 302 | } |
| 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 | |
| 306 | Returns: |
| 307 | An object of the form: |
| 308 | |
| 309 | { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 310 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 312 | "kind": "content#posInventoryResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posInventoryResponse". |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 313 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 316 | "currency": "A String", # The currency of the price. |
| 317 | "value": "A String", # The price represented as a number. |
| 318 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 319 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 320 | "gtin": "A String", # Global Trade Item Number. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 321 | "quantity": "A String", # Required. The available quantity of the item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 322 | }</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 | |
| 329 | Args: |
| 330 | merchantId: string, The ID of the POS or inventory data provider. (required) |
| 331 | targetMerchantId: string, The ID of the target merchant. (required) |
| 332 | |
| 333 | Returns: |
| 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 340 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 343 | }, |
| 344 | ], |
| 345 | }</pre> |
| 346 | </div> |
| 347 | |
| 348 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 349 | <code class="details" id="sale">sale(merchantId, targetMerchantId, body=None, dryRun=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 350 | <pre>Submit a sale event for the given merchant. |
| 351 | |
| 352 | Args: |
| 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 355 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 356 | The object takes the form of: |
| 357 | |
| 358 | { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 359 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 365 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 370 | "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 371 | } |
| 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 | |
| 375 | Returns: |
| 376 | An object of the form: |
| 377 | |
| 378 | { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 379 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 381 | "kind": "content#posSaleResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posSaleResponse". |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 382 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 385 | "currency": "A String", # The currency of the price. |
| 386 | "value": "A String", # The price represented as a number. |
| 387 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 388 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 389 | "gtin": "A String", # Global Trade Item Number. |
| 390 | "saleId": "A String", # A unique ID to group items from the same sale event. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 391 | "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 392 | }</pre> |
| 393 | </div> |
| 394 | |
| 395 | </body></html> |