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.orders.html">orders</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#acknowledge">acknowledge(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 79<p class="firstline">Marks an order as acknowledged.</p> 80<p class="toc_element"> 81 <code><a href="#advancetestorder">advancetestorder(merchantId, orderId, x__xgafv=None)</a></code></p> 82<p class="firstline">Sandbox only. Moves a test order from state "`inProgress`" to state "`pendingShipment`".</p> 83<p class="toc_element"> 84 <code><a href="#cancel">cancel(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Cancels all line items in an order, making a full refund.</p> 86<p class="toc_element"> 87 <code><a href="#cancellineitem">cancellineitem(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Cancels a line item, making a full refund.</p> 89<p class="toc_element"> 90 <code><a href="#canceltestorderbycustomer">canceltestorderbycustomer(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 91<p class="firstline">Sandbox only. Cancels a test order for customer-initiated cancellation.</p> 92<p class="toc_element"> 93 <code><a href="#captureOrder">captureOrder(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 94<p class="firstline">Capture funds from the customer for the current order total. This method should be called after the merchant verifies that they are able and ready to start shipping the order. This method blocks until a response is received from the payment processsor. If this method succeeds, the merchant is guaranteed to receive funds for the order after shipment. If the request fails, it can be retried or the order may be cancelled. This method cannot be called after the entire order is already shipped. A rejected error code is returned when the payment service provider has declined the charge. This indicates a problem between the PSP and either the merchant's or customer's account. Sometimes this error will be resolved by the customer. We recommend retrying these errors once per day or cancelling the order with reason `failedToCaptureFunds` if the items cannot be held.</p> 95<p class="toc_element"> 96 <code><a href="#close">close()</a></code></p> 97<p class="firstline">Close httplib2 connections.</p> 98<p class="toc_element"> 99 <code><a href="#createtestorder">createtestorder(merchantId, body=None, x__xgafv=None)</a></code></p> 100<p class="firstline">Sandbox only. Creates a test order.</p> 101<p class="toc_element"> 102 <code><a href="#createtestreturn">createtestreturn(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 103<p class="firstline">Sandbox only. Creates a test return.</p> 104<p class="toc_element"> 105 <code><a href="#get">get(merchantId, orderId, x__xgafv=None)</a></code></p> 106<p class="firstline">Retrieves an order from your Merchant Center account.</p> 107<p class="toc_element"> 108 <code><a href="#getbymerchantorderid">getbymerchantorderid(merchantId, merchantOrderId, x__xgafv=None)</a></code></p> 109<p class="firstline">Retrieves an order using merchant order ID.</p> 110<p class="toc_element"> 111 <code><a href="#gettestordertemplate">gettestordertemplate(merchantId, templateName, country=None, x__xgafv=None)</a></code></p> 112<p class="firstline">Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.</p> 113<p class="toc_element"> 114 <code><a href="#instorerefundlineitem">instorerefundlineitem(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 115<p class="firstline">Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return.</p> 116<p class="toc_element"> 117 <code><a href="#list">list(merchantId, acknowledged=None, maxResults=None, orderBy=None, pageToken=None, placedDateEnd=None, placedDateStart=None, statuses=None, x__xgafv=None)</a></code></p> 118<p class="firstline">Lists the orders in your Merchant Center account.</p> 119<p class="toc_element"> 120 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 121<p class="firstline">Retrieves the next page of results.</p> 122<p class="toc_element"> 123 <code><a href="#refunditem">refunditem(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 124<p class="firstline">Issues a partial or total refund for items and shipment.</p> 125<p class="toc_element"> 126 <code><a href="#refundorder">refundorder(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 127<p class="firstline">Issues a partial or total refund for an order.</p> 128<p class="toc_element"> 129 <code><a href="#rejectreturnlineitem">rejectreturnlineitem(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 130<p class="firstline">Rejects return on an line item.</p> 131<p class="toc_element"> 132 <code><a href="#returnrefundlineitem">returnrefundlineitem(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 133<p class="firstline">Returns and refunds a line item. Note that this method can only be called on fully shipped orders. Please also note that the Orderreturns API is the preferred way to handle returns after you receive a return from a customer. You can use Orderreturns.list or Orderreturns.get to search for the return, and then use Orderreturns.processreturn to issue the refund. If the return cannot be found, then we recommend using this API to issue a refund.</p> 134<p class="toc_element"> 135 <code><a href="#setlineitemmetadata">setlineitemmetadata(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 136<p class="firstline">Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided via other methods. Submitted key-value pairs can be retrieved as part of the orders resource.</p> 137<p class="toc_element"> 138 <code><a href="#shiplineitems">shiplineitems(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 139<p class="firstline">Marks line item(s) as shipped.</p> 140<p class="toc_element"> 141 <code><a href="#updatelineitemshippingdetails">updatelineitemshippingdetails(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 142<p class="firstline">Updates ship by and delivery by dates for a line item.</p> 143<p class="toc_element"> 144 <code><a href="#updatemerchantorderid">updatemerchantorderid(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 145<p class="firstline">Updates the merchant order ID for a given order.</p> 146<p class="toc_element"> 147 <code><a href="#updateshipment">updateshipment(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 148<p class="firstline">Updates a shipment's status, carrier, and/or tracking ID.</p> 149<h3>Method Details</h3> 150<div class="method"> 151 <code class="details" id="acknowledge">acknowledge(merchantId, orderId, body=None, x__xgafv=None)</code> 152 <pre>Marks an order as acknowledged. 153 154Args: 155 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 156 orderId: string, The ID of the order. (required) 157 body: object, The request body. 158 The object takes the form of: 159 160{ 161 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 162} 163 164 x__xgafv: string, V1 error format. 165 Allowed values 166 1 - v1 error format 167 2 - v2 error format 168 169Returns: 170 An object of the form: 171 172 { 173 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 174 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersAcknowledgeResponse`". 175}</pre> 176</div> 177 178<div class="method"> 179 <code class="details" id="advancetestorder">advancetestorder(merchantId, orderId, x__xgafv=None)</code> 180 <pre>Sandbox only. Moves a test order from state "`inProgress`" to state "`pendingShipment`". 181 182Args: 183 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 184 orderId: string, The ID of the test order to modify. (required) 185 x__xgafv: string, V1 error format. 186 Allowed values 187 1 - v1 error format 188 2 - v2 error format 189 190Returns: 191 An object of the form: 192 193 { 194 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersAdvanceTestOrderResponse`". 195}</pre> 196</div> 197 198<div class="method"> 199 <code class="details" id="cancel">cancel(merchantId, orderId, body=None, x__xgafv=None)</code> 200 <pre>Cancels all line items in an order, making a full refund. 201 202Args: 203 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 204 orderId: string, The ID of the order to cancel. (required) 205 body: object, The request body. 206 The object takes the form of: 207 208{ 209 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 210 "reason": "A String", # The reason for the cancellation. Acceptable values are: - "`customerInitiatedCancel`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`noInventory`" - "`other`" - "`priceError`" - "`shippingPriceError`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`failedToCaptureFunds`" 211 "reasonText": "A String", # The explanation of the reason. 212} 213 214 x__xgafv: string, V1 error format. 215 Allowed values 216 1 - v1 error format 217 2 - v2 error format 218 219Returns: 220 An object of the form: 221 222 { 223 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 224 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersCancelResponse`". 225}</pre> 226</div> 227 228<div class="method"> 229 <code class="details" id="cancellineitem">cancellineitem(merchantId, orderId, body=None, x__xgafv=None)</code> 230 <pre>Cancels a line item, making a full refund. 231 232Args: 233 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 234 orderId: string, The ID of the order. (required) 235 body: object, The request body. 236 The object takes the form of: 237 238{ 239 "lineItemId": "A String", # The ID of the line item to cancel. Either lineItemId or productId is required. 240 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 241 "productId": "A String", # The ID of the product to cancel. This is the REST ID used in the products service. Either lineItemId or productId is required. 242 "quantity": 42, # The quantity to cancel. 243 "reason": "A String", # The reason for the cancellation. Acceptable values are: - "`customerInitiatedCancel`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`noInventory`" - "`other`" - "`priceError`" - "`shippingPriceError`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`failedToCaptureFunds`" 244 "reasonText": "A String", # The explanation of the reason. 245} 246 247 x__xgafv: string, V1 error format. 248 Allowed values 249 1 - v1 error format 250 2 - v2 error format 251 252Returns: 253 An object of the form: 254 255 { 256 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 257 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersCancelLineItemResponse`". 258}</pre> 259</div> 260 261<div class="method"> 262 <code class="details" id="canceltestorderbycustomer">canceltestorderbycustomer(merchantId, orderId, body=None, x__xgafv=None)</code> 263 <pre>Sandbox only. Cancels a test order for customer-initiated cancellation. 264 265Args: 266 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 267 orderId: string, The ID of the test order to cancel. (required) 268 body: object, The request body. 269 The object takes the form of: 270 271{ 272 "reason": "A String", # The reason for the cancellation. Acceptable values are: - "`changedMind`" - "`orderedWrongItem`" - "`other`" 273} 274 275 x__xgafv: string, V1 error format. 276 Allowed values 277 1 - v1 error format 278 2 - v2 error format 279 280Returns: 281 An object of the form: 282 283 { 284 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersCancelTestOrderByCustomerResponse`". 285}</pre> 286</div> 287 288<div class="method"> 289 <code class="details" id="captureOrder">captureOrder(merchantId, orderId, body=None, x__xgafv=None)</code> 290 <pre>Capture funds from the customer for the current order total. This method should be called after the merchant verifies that they are able and ready to start shipping the order. This method blocks until a response is received from the payment processsor. If this method succeeds, the merchant is guaranteed to receive funds for the order after shipment. If the request fails, it can be retried or the order may be cancelled. This method cannot be called after the entire order is already shipped. A rejected error code is returned when the payment service provider has declined the charge. This indicates a problem between the PSP and either the merchant's or customer's account. Sometimes this error will be resolved by the customer. We recommend retrying these errors once per day or cancelling the order with reason `failedToCaptureFunds` if the items cannot be held. 291 292Args: 293 merchantId: string, Required. The ID of the account that manages the order. This cannot be a multi-client account. (required) 294 orderId: string, Required. The ID of the Order. (required) 295 body: object, The request body. 296 The object takes the form of: 297 298{ # Request message for the CaptureOrder method. 299} 300 301 x__xgafv: string, V1 error format. 302 Allowed values 303 1 - v1 error format 304 2 - v2 error format 305 306Returns: 307 An object of the form: 308 309 { # Response message for the CaptureOrder method. 310 "executionStatus": "A String", # The status of the execution. Only defined if the request was successful. Acceptable values are: * "duplicate" * "executed" 311}</pre> 312</div> 313 314<div class="method"> 315 <code class="details" id="close">close()</code> 316 <pre>Close httplib2 connections.</pre> 317</div> 318 319<div class="method"> 320 <code class="details" id="createtestorder">createtestorder(merchantId, body=None, x__xgafv=None)</code> 321 <pre>Sandbox only. Creates a test order. 322 323Args: 324 merchantId: string, The ID of the account that should manage the order. This cannot be a multi-client account. (required) 325 body: object, The request body. 326 The object takes the form of: 327 328{ 329 "country": "A String", # The CLDR territory code of the country of the test order to create. Affects the currency and addresses of orders created via `template_name`, or the addresses of orders created via `test_order`. Acceptable values are: - "`US`" - "`FR`" Defaults to `US`. 330 "templateName": "A String", # The test order template to use. Specify as an alternative to `testOrder` as a shortcut for retrieving a template and then creating an order using that template. Acceptable values are: - "`template1`" - "`template1a`" - "`template1b`" - "`template2`" - "`template3`" 331 "testOrder": { # The test order to create. 332 "deliveryDetails": { # Overrides the predefined delivery details if provided. 333 "address": { # The delivery address 334 "country": "A String", # CLDR country code (e.g. "US"). 335 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 336 "A String", 337 ], 338 "isPostOfficeBox": True or False, # Whether the address is a post office box. 339 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 340 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 341 "recipientName": "A String", # Name of the recipient. 342 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 343 "streetAddress": [ # Street-level part of the address. 344 "A String", 345 ], 346 }, 347 "isScheduledDelivery": True or False, # Whether the order is scheduled delivery order. 348 "phoneNumber": "A String", # The phone number of the person receiving the delivery. 349 }, 350 "enableOrderinvoices": True or False, # Whether the orderinvoices service should support this order. 351 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#testOrder`" 352 "lineItems": [ # Required. Line items that are ordered. At least one line item must be provided. 353 { 354 "product": { # Required. Product data from the time of the order placement. 355 "brand": "A String", # Required. Brand of the item. 356 "condition": "A String", # Required. Condition or state of the item. Acceptable values are: - "`new`" 357 "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. Acceptable values are: - "`en`" - "`fr`" 358 "fees": [ # Fees for the item. Optional. 359 { 360 "amount": { # Amount of the fee. 361 "currency": "A String", # The currency of the price. 362 "value": "A String", # The price represented as a number. 363 }, 364 "name": "A String", # Name of the fee. 365 }, 366 ], 367 "gtin": "A String", # Global Trade Item Number (GTIN) of the item. Optional. 368 "imageLink": "A String", # Required. URL of an image of the item. 369 "itemGroupId": "A String", # Shared identifier for all variants of the same product. Optional. 370 "mpn": "A String", # Manufacturer Part Number (MPN) of the item. Optional. 371 "offerId": "A String", # Required. An identifier of the item. 372 "price": { # Required. The price for the product. Tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied. 373 "currency": "A String", # The currency of the price. 374 "value": "A String", # The price represented as a number. 375 }, 376 "targetCountry": "A String", # Required. The CLDR territory // code of the target country of the product. 377 "title": "A String", # Required. The title of the product. 378 "variantAttributes": [ # Variant attributes for the item. Optional. 379 { 380 "dimension": "A String", # The dimension of the variant. 381 "value": "A String", # The value for the dimension. 382 }, 383 ], 384 }, 385 "quantityOrdered": 42, # Required. Number of items ordered. 386 "returnInfo": { # Required. Details of the return policy for the line item. 387 "daysToReturn": 42, # Required. How many days later the item can be returned. 388 "isReturnable": True or False, # Required. Whether the item is returnable. 389 "policyUrl": "A String", # Required. URL of the item return policy. 390 }, 391 "shippingDetails": { # Required. Details of the requested shipping for the line item. 392 "deliverByDate": "A String", # Required. The delivery by date, in ISO 8601 format. 393 "method": { # Required. Details of the shipping method. 394 "carrier": "A String", # The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values. 395 "maxDaysInTransit": 42, # Required. Maximum transit time. 396 "methodName": "A String", # Required. The name of the shipping method. 397 "minDaysInTransit": 42, # Required. Minimum transit time. 398 }, 399 "pickupPromiseInMinutes": 42, # The promised time in minutes in which the order will be ready for pickup. This only applies to buy-online-pickup-in-store same-day order. 400 "shipByDate": "A String", # Required. The ship by date, in ISO 8601 format. 401 "type": "A String", # Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. Acceptable values are: - "`delivery`" - "`pickup`" 402 }, 403 }, 404 ], 405 "notificationMode": "A String", # Restricted. Do not use. 406 "pickupDetails": { # Overrides the predefined pickup details if provided. 407 "locationCode": "A String", # Required. Code of the location defined by provider or merchant. 408 "pickupLocationAddress": { # Required. Pickup location address. 409 "country": "A String", # CLDR country code (e.g. "US"). 410 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 411 "A String", 412 ], 413 "isPostOfficeBox": True or False, # Whether the address is a post office box. 414 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 415 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 416 "recipientName": "A String", # Name of the recipient. 417 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 418 "streetAddress": [ # Street-level part of the address. 419 "A String", 420 ], 421 }, 422 "pickupLocationType": "A String", # Pickup location type. Acceptable values are: - "`locker`" - "`store`" - "`curbside`" 423 "pickupPersons": [ # Required. all pickup persons set by users. 424 { 425 "name": "A String", # Required. Full name of the pickup person. 426 "phoneNumber": "A String", # Required. The phone number of the person picking up the items. 427 }, 428 ], 429 }, 430 "predefinedBillingAddress": "A String", # Required. The billing address. Acceptable values are: - "`dwight`" - "`jim`" - "`pam`" 431 "predefinedDeliveryAddress": "A String", # Required. Identifier of one of the predefined delivery addresses for the delivery. Acceptable values are: - "`dwight`" - "`jim`" - "`pam`" 432 "predefinedEmail": "A String", # Required. Email address of the customer. Acceptable values are: - "`[email protected]`" - "`[email protected]`" - "`[email protected]`" 433 "predefinedPickupDetails": "A String", # Identifier of one of the predefined pickup details. Required for orders containing line items with shipping type `pickup`. Acceptable values are: - "`dwight`" - "`jim`" - "`pam`" 434 "promotions": [ # Promotions associated with the order. 435 { 436 "applicableItems": [ # Items that this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. This field will also be empty for shipping promotions because shipping is not tied to any specific item. 437 { 438 "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. 439 "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. 440 "productId": "A String", # `orders.createtestorder`. 441 "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. 442 }, 443 ], 444 "appliedItems": [ # Items that this promotion have been applied to. Do not provide for `orders.createtestorder`. This field will be empty for shipping promotions because shipping is not tied to any specific item. 445 { 446 "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. 447 "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. 448 "productId": "A String", # `orders.createtestorder`. 449 "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. 450 }, 451 ], 452 "endTime": "A String", # Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". 453 "funder": "A String", # Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. Acceptable values are: - "`google`" - "`merchant`" 454 "merchantPromotionId": "A String", # Required. This field is used to identify promotions within merchants' own systems. 455 "priceValue": { # Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. 456 "currency": "A String", # The currency of the price. 457 "value": "A String", # The price represented as a number. 458 }, 459 "shortTitle": "A String", # A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`. 460 "startTime": "A String", # Promotion start time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". 461 "subtype": "A String", # Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. Acceptable values are: - "`buyMGetMoneyOff`" - "`buyMGetNMoneyOff`" - "`buyMGetNPercentOff`" - "`buyMGetPercentOff`" - "`freeGift`" - "`freeGiftWithItemId`" - "`freeGiftWithValue`" - "`freeShippingOvernight`" - "`freeShippingStandard`" - "`freeShippingTwoDay`" - "`moneyOff`" - "`percentOff`" - "`rewardPoints`" - "`salePrice`" 462 "taxValue": { # Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`. 463 "currency": "A String", # The currency of the price. 464 "value": "A String", # The price represented as a number. 465 }, 466 "title": "A String", # Required. The title of the promotion. 467 "type": "A String", # Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. Acceptable values are: - "`product`" - "`shipping`" 468 }, 469 ], 470 "shippingCost": { # Required. The price of shipping for all items. Shipping tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied. Note that shipping is not taxed in certain states. 471 "currency": "A String", # The currency of the price. 472 "value": "A String", # The price represented as a number. 473 }, 474 "shippingOption": "A String", # Required. The requested shipping option. Acceptable values are: - "`economy`" - "`expedited`" - "`oneDay`" - "`sameDay`" - "`standard`" - "`twoDay`" 475 }, 476} 477 478 x__xgafv: string, V1 error format. 479 Allowed values 480 1 - v1 error format 481 2 - v2 error format 482 483Returns: 484 An object of the form: 485 486 { 487 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersCreateTestOrderResponse`". 488 "orderId": "A String", # The ID of the newly created test order. 489}</pre> 490</div> 491 492<div class="method"> 493 <code class="details" id="createtestreturn">createtestreturn(merchantId, orderId, body=None, x__xgafv=None)</code> 494 <pre>Sandbox only. Creates a test return. 495 496Args: 497 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 498 orderId: string, The ID of the order. (required) 499 body: object, The request body. 500 The object takes the form of: 501 502{ 503 "items": [ # Returned items. 504 { 505 "lineItemId": "A String", # The ID of the line item to return. 506 "quantity": 42, # Quantity that is returned. 507 }, 508 ], 509} 510 511 x__xgafv: string, V1 error format. 512 Allowed values 513 1 - v1 error format 514 2 - v2 error format 515 516Returns: 517 An object of the form: 518 519 { 520 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersCreateTestReturnResponse`". 521 "returnId": "A String", # The ID of the newly created test order return. 522}</pre> 523</div> 524 525<div class="method"> 526 <code class="details" id="get">get(merchantId, orderId, x__xgafv=None)</code> 527 <pre>Retrieves an order from your Merchant Center account. 528 529Args: 530 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 531 orderId: string, The ID of the order. (required) 532 x__xgafv: string, V1 error format. 533 Allowed values 534 1 - v1 error format 535 2 - v2 error format 536 537Returns: 538 An object of the form: 539 540 { # Order. Production access (all methods) requires the order manager role. Sandbox access does not. 541 "acknowledged": True or False, # Whether the order was acknowledged. 542 "annotations": [ # List of key-value pairs that are attached to a given order. 543 { 544 "key": "A String", # Key for additional google provided (as key-value pairs) annotation. 545 "value": "A String", # Value for additional google provided (as key-value pairs) annotation. 546 }, 547 ], 548 "billingAddress": { # The billing address. 549 "country": "A String", # CLDR country code (e.g. "US"). 550 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 551 "A String", 552 ], 553 "isPostOfficeBox": True or False, # Whether the address is a post office box. 554 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 555 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 556 "recipientName": "A String", # Name of the recipient. 557 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 558 "streetAddress": [ # Street-level part of the address. 559 "A String", 560 ], 561 }, 562 "customer": { # The details of the customer who placed the order. 563 "fullName": "A String", # Full name of the customer. 564 "invoiceReceivingEmail": "A String", # Email address for the merchant to send value-added tax or invoice documentation of the order. Only the last document sent is made available to the customer. For more information, see About automated VAT invoicing for Buy on Google. 565 "loyaltyInfo": { # Loyalty program information. 566 "loyaltyNumber": "A String", # The loyalty card/membership number. 567 "name": "A String", # Name of card/membership holder, this field will be populated when 568 }, 569 "marketingRightsInfo": { # Customer's marketing preferences. Contains the marketing opt-in information that is current at the time that the merchant call. User preference selections can change from one order to the next so preferences must be checked with every order. 570 "explicitMarketingPreference": "A String", # Last known customer selection regarding marketing preferences. In certain cases this selection might not be known, so this field would be empty. If a customer selected `granted` in their most recent order, they can be subscribed to marketing emails. Customers who have chosen `denied` must not be subscribed, or must be unsubscribed if already opted-in. Acceptable values are: - "`denied`" - "`granted`" 571 "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. 572 "marketingEmailAddress": "A String", # Email address that can be used for marketing purposes. The field may be empty even if `explicitMarketingPreference` is 'granted'. This happens when retrieving an old order from the customer who deleted their account. 573 }, 574 }, 575 "deliveryDetails": { # Delivery details for shipments of type `delivery`. 576 "address": { # The delivery address 577 "country": "A String", # CLDR country code (e.g. "US"). 578 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 579 "A String", 580 ], 581 "isPostOfficeBox": True or False, # Whether the address is a post office box. 582 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 583 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 584 "recipientName": "A String", # Name of the recipient. 585 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 586 "streetAddress": [ # Street-level part of the address. 587 "A String", 588 ], 589 }, 590 "phoneNumber": "A String", # The phone number of the person receiving the delivery. 591 }, 592 "id": "A String", # The REST ID of the order. Globally unique. 593 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#order`" 594 "lineItems": [ # Line items that are ordered. 595 { 596 "adjustments": [ # Price and tax adjustments applied on the line item. 597 { 598 "priceAdjustment": { # Adjustment for total price of the line item. 599 "currency": "A String", # The currency of the price. 600 "value": "A String", # The price represented as a number. 601 }, 602 "taxAdjustment": { # Adjustment for total tax of the line item. 603 "currency": "A String", # The currency of the price. 604 "value": "A String", # The price represented as a number. 605 }, 606 "type": "A String", # Type of this adjustment. Acceptable values are: - "`promotion`" 607 }, 608 ], 609 "annotations": [ # Annotations that are attached to the line item. 610 { 611 "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. 612 "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. 613 }, 614 ], 615 "cancellations": [ # Cancellations of the line item. 616 { 617 "actor": "A String", # The actor that created the cancellation. Acceptable values are: - "`customer`" - "`googleBot`" - "`googleCustomerService`" - "`googlePayments`" - "`googleSabre`" - "`merchant`" 618 "creationDate": "A String", # Date on which the cancellation has been created, in ISO 8601 format. 619 "quantity": 42, # The quantity that was canceled. 620 "reason": "A String", # The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Buy on Google until you make an update to that product. This will not affect your Shopping ads. Acceptable values are: - "`autoPostInternal`" - "`autoPostInvalidBillingAddress`" - "`autoPostNoInventory`" - "`autoPostPriceError`" - "`autoPostUndeliverableShippingAddress`" - "`couponAbuse`" - "`customerCanceled`" - "`customerInitiatedCancel`" - "`customerSupportRequested`" - "`failToPushOrderGoogleError`" - "`failToPushOrderMerchantError`" - "`failToPushOrderMerchantFulfillmentError`" - "`failToPushOrderToMerchant`" - "`failToPushOrderToMerchantOutOfStock`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`merchantDidNotShipOnTime`" - "`noInventory`" - "`orderTimeout`" - "`other`" - "`paymentAbuse`" - "`paymentDeclined`" - "`priceError`" - "`returnRefundAbuse`" - "`shippingPriceError`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`failedToCaptureFunds`" 621 "reasonText": "A String", # The explanation of the reason. 622 }, 623 ], 624 "id": "A String", # The ID of the line item. 625 "price": { # Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. 626 "currency": "A String", # The currency of the price. 627 "value": "A String", # The price represented as a number. 628 }, 629 "product": { # Product data as seen by customer from the time of the order placement. Note that certain attributes values (e.g. title or gtin) might be reformatted and no longer match values submitted via product feed. 630 "brand": "A String", # Brand of the item. 631 "condition": "A String", # Condition or state of the item. Acceptable values are: - "`new`" - "`refurbished`" - "`used`" 632 "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. 633 "fees": [ # Associated fees at order creation time. 634 { 635 "amount": { # Amount of the fee. 636 "currency": "A String", # The currency of the price. 637 "value": "A String", # The price represented as a number. 638 }, 639 "name": "A String", # Name of the fee. 640 }, 641 ], 642 "gtin": "A String", # Global Trade Item Number (GTIN) of the item. 643 "id": "A String", # The REST ID of the product. 644 "imageLink": "A String", # URL of an image of the item. 645 "itemGroupId": "A String", # Shared identifier for all variants of the same product. 646 "mpn": "A String", # Manufacturer Part Number (MPN) of the item. 647 "offerId": "A String", # An identifier of the item. 648 "price": { # Price of the item. 649 "currency": "A String", # The currency of the price. 650 "value": "A String", # The price represented as a number. 651 }, 652 "shownImage": "A String", # URL to the cached image shown to the user when order was placed. 653 "targetCountry": "A String", # The CLDR territory // code of the target country of the product. 654 "title": "A String", # The title of the product. 655 "variantAttributes": [ # Variant attributes for the item. These are dimensions of the product, such as color, gender, material, pattern, and size. You can find a comprehensive list of variant attributes here. 656 { 657 "dimension": "A String", # The dimension of the variant. 658 "value": "A String", # The value for the dimension. 659 }, 660 ], 661 }, 662 "quantityCanceled": 42, # Number of items canceled. 663 "quantityDelivered": 42, # Number of items delivered. 664 "quantityOrdered": 42, # Number of items ordered. 665 "quantityPending": 42, # Number of items pending. 666 "quantityReadyForPickup": 42, # Number of items ready for pickup. 667 "quantityReturned": 42, # Number of items returned. 668 "quantityShipped": 42, # Number of items shipped. 669 "quantityUndeliverable": 42, # Number of items undeliverable. 670 "returnInfo": { # Details of the return policy for the line item. 671 "daysToReturn": 42, # Required. How many days later the item can be returned. 672 "isReturnable": True or False, # Required. Whether the item is returnable. 673 "policyUrl": "A String", # Required. URL of the item return policy. 674 }, 675 "returns": [ # Returns of the line item. 676 { 677 "actor": "A String", # The actor that created the refund. Acceptable values are: - "`customer`" - "`googleBot`" - "`googleCustomerService`" - "`googlePayments`" - "`googleSabre`" - "`merchant`" 678 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 679 "quantity": 42, # Quantity that is returned. 680 "reason": "A String", # The reason for the return. Acceptable values are: - "`customerDiscretionaryReturn`" - "`customerInitiatedMerchantCancel`" - "`deliveredTooLate`" - "`expiredItem`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`other`" - "`productArrivedDamaged`" - "`productNotAsDescribed`" - "`qualityNotAsExpected`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`wrongProductShipped`" 681 "reasonText": "A String", # The explanation of the reason. 682 }, 683 ], 684 "shippingDetails": { # Details of the requested shipping for the line item. 685 "deliverByDate": "A String", # Required. The delivery by date, in ISO 8601 format. 686 "method": { # Required. Details of the shipping method. 687 "carrier": "A String", # The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values. 688 "maxDaysInTransit": 42, # Required. Maximum transit time. 689 "methodName": "A String", # Required. The name of the shipping method. 690 "minDaysInTransit": 42, # Required. Minimum transit time. 691 }, 692 "pickupPromiseInMinutes": 42, # The promised time in minutes in which the order will be ready for pickup. This only applies to buy-online-pickup-in-store same-day order. 693 "shipByDate": "A String", # Required. The ship by date, in ISO 8601 format. 694 "type": "A String", # Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. Acceptable values are: - "`delivery`" - "`pickup`" 695 }, 696 "tax": { # Total tax amount for the line item. For example, if two items are purchased, and each have a cost tax of $2, the total tax amount will be $4. 697 "currency": "A String", # The currency of the price. 698 "value": "A String", # The price represented as a number. 699 }, 700 }, 701 ], 702 "merchantId": "A String", 703 "merchantOrderId": "A String", # Merchant-provided ID of the order. 704 "netPriceAmount": { # The net amount for the order (price part). For example, if an order was originally for $100 and a refund was issued for $20, the net amount will be $80. 705 "currency": "A String", # The currency of the price. 706 "value": "A String", # The price represented as a number. 707 }, 708 "netTaxAmount": { # The net amount for the order (tax part). Note that in certain cases due to taxable base adjustment `netTaxAmount` might not match to a sum of tax field across all lineItems and refunds. 709 "currency": "A String", # The currency of the price. 710 "value": "A String", # The price represented as a number. 711 }, 712 "paymentStatus": "A String", # The status of the payment. Acceptable values are: - "`paymentCaptured`" - "`paymentRejected`" - "`paymentSecured`" - "`pendingAuthorization`" 713 "pickupDetails": { # Pickup details for shipments of type `pickup`. 714 "address": { # Address of the pickup location where the shipment should be sent. Note that `recipientName` in the address is the name of the business at the pickup location. 715 "country": "A String", # CLDR country code (e.g. "US"). 716 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 717 "A String", 718 ], 719 "isPostOfficeBox": True or False, # Whether the address is a post office box. 720 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 721 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 722 "recipientName": "A String", # Name of the recipient. 723 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 724 "streetAddress": [ # Street-level part of the address. 725 "A String", 726 ], 727 }, 728 "collectors": [ # Collectors authorized to pick up shipment from the pickup location. 729 { 730 "name": "A String", # Name of the person picking up the shipment. 731 "phoneNumber": "A String", # Phone number of the person picking up the shipment. 732 }, 733 ], 734 "locationId": "A String", # ID of the pickup location. 735 "pickupType": "A String", # The pickup type of this order. Acceptable values are: - "`merchantStore`" - "`merchantStoreCurbside`" - "`merchantStoreLocker`" - "`thirdPartyPickupPoint`" - "`thirdPartyLocker`" 736 }, 737 "placedDate": "A String", # The date when the order was placed, in ISO 8601 format. 738 "promotions": [ # Promotions associated with the order. To determine which promotions apply to which products, check the `Promotions[].appliedItems[].lineItemId` field against the `LineItems[].id` field for each promotion. If a promotion is applied to more than 1 offerId, divide the discount value by the number of affected offers to determine how much discount to apply to each offerId. Examples: 1. To calculate price paid by the customer for a single line item including the discount: For each promotion, subtract the `LineItems[].adjustments[].priceAdjustment.value` amount from the `LineItems[].Price.value`. 2. To calculate price paid by the customer for a single line item including the discount in case of multiple quantity: For each promotion, divide the `LineItems[].adjustments[].priceAdjustment.value` by the quantity of products then subtract the resulting value from the `LineItems[].Product.Price.value` for each quantity item. Only 1 promotion can be applied to an offerId in a given order. To refund an item which had a promotion applied to it, make sure to refund the amount after first subtracting the promotion discount from the item price. More details about the program are here. 739 { 740 "applicableItems": [ # Items that this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. This field will also be empty for shipping promotions because shipping is not tied to any specific item. 741 { 742 "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. 743 "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. 744 "productId": "A String", # `orders.createtestorder`. 745 "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. 746 }, 747 ], 748 "appliedItems": [ # Items that this promotion have been applied to. Do not provide for `orders.createtestorder`. This field will be empty for shipping promotions because shipping is not tied to any specific item. 749 { 750 "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. 751 "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. 752 "productId": "A String", # `orders.createtestorder`. 753 "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. 754 }, 755 ], 756 "endTime": "A String", # Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". 757 "funder": "A String", # Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. Acceptable values are: - "`google`" - "`merchant`" 758 "merchantPromotionId": "A String", # Required. This field is used to identify promotions within merchants' own systems. 759 "priceValue": { # Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. 760 "currency": "A String", # The currency of the price. 761 "value": "A String", # The price represented as a number. 762 }, 763 "shortTitle": "A String", # A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`. 764 "startTime": "A String", # Promotion start time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". 765 "subtype": "A String", # Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. Acceptable values are: - "`buyMGetMoneyOff`" - "`buyMGetNMoneyOff`" - "`buyMGetNPercentOff`" - "`buyMGetPercentOff`" - "`freeGift`" - "`freeGiftWithItemId`" - "`freeGiftWithValue`" - "`freeShippingOvernight`" - "`freeShippingStandard`" - "`freeShippingTwoDay`" - "`moneyOff`" - "`percentOff`" - "`rewardPoints`" - "`salePrice`" 766 "taxValue": { # Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`. 767 "currency": "A String", # The currency of the price. 768 "value": "A String", # The price represented as a number. 769 }, 770 "title": "A String", # Required. The title of the promotion. 771 "type": "A String", # Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. Acceptable values are: - "`product`" - "`shipping`" 772 }, 773 ], 774 "refunds": [ # Refunds for the order. 775 { 776 "actor": "A String", # The actor that created the refund. Acceptable values are: - "`customer`" - "`googleBot`" - "`googleCustomerService`" - "`googlePayments`" - "`googleSabre`" - "`merchant`" 777 "amount": { # The amount that is refunded. 778 "currency": "A String", # The currency of the price. 779 "value": "A String", # The price represented as a number. 780 }, 781 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 782 "reason": "A String", # The reason for the refund. Acceptable values are: - "`adjustment`" - "`autoPostInternal`" - "`autoPostInvalidBillingAddress`" - "`autoPostNoInventory`" - "`autoPostPriceError`" - "`autoPostUndeliverableShippingAddress`" - "`couponAbuse`" - "`courtesyAdjustment`" - "`customerCanceled`" - "`customerDiscretionaryReturn`" - "`customerInitiatedMerchantCancel`" - "`customerSupportRequested`" - "`deliveredLateByCarrier`" - "`deliveredTooLate`" - "`expiredItem`" - "`failToPushOrderGoogleError`" - "`failToPushOrderMerchantError`" - "`failToPushOrderMerchantFulfillmentError`" - "`failToPushOrderToMerchant`" - "`failToPushOrderToMerchantOutOfStock`" - "`feeAdjustment`" - "`invalidCoupon`" - "`lateShipmentCredit`" - "`malformedShippingAddress`" - "`merchantDidNotShipOnTime`" - "`noInventory`" - "`orderTimeout`" - "`other`" - "`paymentAbuse`" - "`paymentDeclined`" - "`priceAdjustment`" - "`priceError`" - "`productArrivedDamaged`" - "`productNotAsDescribed`" - "`promoReallocation`" - "`qualityNotAsExpected`" - "`returnRefundAbuse`" - "`shippingCostAdjustment`" - "`shippingPriceError`" - "`taxAdjustment`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`wrongProductShipped`" 783 "reasonText": "A String", # The explanation of the reason. 784 }, 785 ], 786 "shipments": [ # Shipments of the order. 787 { 788 "carrier": "A String", # The carrier handling the shipment. For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. *Note:* You can also use unsupported carriers, but emails to customers will not include the carrier name or tracking URL, and there will be no automatic order status updates. Supported carriers for US are: - "`ups`" (United Parcel Service) *automatic status updates* - "`usps`" (United States Postal Service) *automatic status updates* - "`fedex`" (FedEx) *automatic status updates * - "`dhl`" (DHL eCommerce) *automatic status updates* (US only) - "`ontrac`" (OnTrac) *automatic status updates * - "`dhl express`" (DHL Express) - "`deliv`" (Deliv) - "`dynamex`" (TForce) - "`lasership`" (LaserShip) - "`mpx`" (Military Parcel Xpress) - "`uds`" (United Delivery Service) - "`efw`" (Estes Forwarding Worldwide) - "`jd logistics`" (JD Logistics) - "`yunexpress`" (YunExpress) - "`china post`" (China Post) - "`china ems`" (China Post Express Mail Service) - "`singapore post`" (Singapore Post) - "`pos malaysia`" (Pos Malaysia) - "`postnl`" (PostNL) - "`ptt`" (PTT Turkish Post) - "`eub`" (ePacket) - "`chukou1`" (Chukou1 Logistics) - "`bestex`" (Best Express) - "`canada post`" (Canada Post) - "`purolator`" (Purolator) - "`canpar`" (Canpar) - "`india post`" (India Post) - "`blue dart`" (Blue Dart) - "`delhivery`" (Delhivery) - "`dtdc`" (DTDC) - "`tpc india`" (TPC India) - "`lso`" (Lone Star Overnight) - "`tww`" (Team Worldwide) Supported carriers for FR are: - "`la poste`" (La Poste) *automatic status updates * - "`colissimo`" (Colissimo by La Poste) *automatic status updates* - "`ups`" (United Parcel Service) *automatic status updates * - "`chronopost`" (Chronopost by La Poste) - "`gls`" (General Logistics Systems France) - "`dpd`" (DPD Group by GeoPost) - "`bpost`" (Belgian Post Group) - "`colis prive`" (Colis Privé) - "`boxtal`" (Boxtal) - "`geodis`" (GEODIS) - "`tnt`" (TNT) - "`db schenker`" (DB Schenker) - "`aramex`" (Aramex) 789 "creationDate": "A String", # Date on which the shipment has been created, in ISO 8601 format. 790 "deliveryDate": "A String", # Date on which the shipment has been delivered, in ISO 8601 format. Present only if `status` is `delivered` 791 "id": "A String", # The ID of the shipment. 792 "lineItems": [ # The line items that are shipped. 793 { 794 "lineItemId": "A String", # The ID of the line item that is shipped. This value is assigned by Google when an order is created. Either lineItemId or productId is required. 795 "productId": "A String", # The ID of the product to ship. This is the REST ID used in the products service. Either lineItemId or productId is required. 796 "quantity": 42, # The quantity that is shipped. 797 }, 798 ], 799 "scheduledDeliveryDetails": { # Delivery details of the shipment if scheduling is needed. 800 "carrierPhoneNumber": "A String", # The phone number of the carrier fulfilling the delivery. The phone number is formatted as the international notation in ITU-T Recommendation E.123 (e.g., "+41 44 668 1800"). 801 "scheduledDate": "A String", # The date a shipment is scheduled for delivery, in ISO 8601 format. 802 }, 803 "shipmentGroupId": "A String", # The shipment group ID of the shipment. This is set in shiplineitems request. 804 "status": "A String", # The status of the shipment. Acceptable values are: - "`delivered`" - "`readyForPickup`" - "`shipped`" - "`undeliverable`" 805 "trackingId": "A String", # The tracking ID for the shipment. 806 }, 807 ], 808 "shippingCost": { # The total cost of shipping for all items. 809 "currency": "A String", # The currency of the price. 810 "value": "A String", # The price represented as a number. 811 }, 812 "shippingCostTax": { # The tax for the total shipping cost. 813 "currency": "A String", # The currency of the price. 814 "value": "A String", # The price represented as a number. 815 }, 816 "status": "A String", # The status of the order. Acceptable values are: - "`canceled`" - "`delivered`" - "`inProgress`" - "`partiallyDelivered`" - "`partiallyReturned`" - "`partiallyShipped`" - "`pendingShipment`" - "`returned`" - "`shipped`" 817 "taxCollector": "A String", # The party responsible for collecting and remitting taxes. Acceptable values are: - "`marketplaceFacilitator`" - "`merchant`" 818}</pre> 819</div> 820 821<div class="method"> 822 <code class="details" id="getbymerchantorderid">getbymerchantorderid(merchantId, merchantOrderId, x__xgafv=None)</code> 823 <pre>Retrieves an order using merchant order ID. 824 825Args: 826 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 827 merchantOrderId: string, The merchant order ID to be looked for. (required) 828 x__xgafv: string, V1 error format. 829 Allowed values 830 1 - v1 error format 831 2 - v2 error format 832 833Returns: 834 An object of the form: 835 836 { 837 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersGetByMerchantOrderIdResponse`". 838 "order": { # Order. Production access (all methods) requires the order manager role. Sandbox access does not. # The requested order. 839 "acknowledged": True or False, # Whether the order was acknowledged. 840 "annotations": [ # List of key-value pairs that are attached to a given order. 841 { 842 "key": "A String", # Key for additional google provided (as key-value pairs) annotation. 843 "value": "A String", # Value for additional google provided (as key-value pairs) annotation. 844 }, 845 ], 846 "billingAddress": { # The billing address. 847 "country": "A String", # CLDR country code (e.g. "US"). 848 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 849 "A String", 850 ], 851 "isPostOfficeBox": True or False, # Whether the address is a post office box. 852 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 853 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 854 "recipientName": "A String", # Name of the recipient. 855 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 856 "streetAddress": [ # Street-level part of the address. 857 "A String", 858 ], 859 }, 860 "customer": { # The details of the customer who placed the order. 861 "fullName": "A String", # Full name of the customer. 862 "invoiceReceivingEmail": "A String", # Email address for the merchant to send value-added tax or invoice documentation of the order. Only the last document sent is made available to the customer. For more information, see About automated VAT invoicing for Buy on Google. 863 "loyaltyInfo": { # Loyalty program information. 864 "loyaltyNumber": "A String", # The loyalty card/membership number. 865 "name": "A String", # Name of card/membership holder, this field will be populated when 866 }, 867 "marketingRightsInfo": { # Customer's marketing preferences. Contains the marketing opt-in information that is current at the time that the merchant call. User preference selections can change from one order to the next so preferences must be checked with every order. 868 "explicitMarketingPreference": "A String", # Last known customer selection regarding marketing preferences. In certain cases this selection might not be known, so this field would be empty. If a customer selected `granted` in their most recent order, they can be subscribed to marketing emails. Customers who have chosen `denied` must not be subscribed, or must be unsubscribed if already opted-in. Acceptable values are: - "`denied`" - "`granted`" 869 "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. 870 "marketingEmailAddress": "A String", # Email address that can be used for marketing purposes. The field may be empty even if `explicitMarketingPreference` is 'granted'. This happens when retrieving an old order from the customer who deleted their account. 871 }, 872 }, 873 "deliveryDetails": { # Delivery details for shipments of type `delivery`. 874 "address": { # The delivery address 875 "country": "A String", # CLDR country code (e.g. "US"). 876 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 877 "A String", 878 ], 879 "isPostOfficeBox": True or False, # Whether the address is a post office box. 880 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 881 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 882 "recipientName": "A String", # Name of the recipient. 883 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 884 "streetAddress": [ # Street-level part of the address. 885 "A String", 886 ], 887 }, 888 "phoneNumber": "A String", # The phone number of the person receiving the delivery. 889 }, 890 "id": "A String", # The REST ID of the order. Globally unique. 891 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#order`" 892 "lineItems": [ # Line items that are ordered. 893 { 894 "adjustments": [ # Price and tax adjustments applied on the line item. 895 { 896 "priceAdjustment": { # Adjustment for total price of the line item. 897 "currency": "A String", # The currency of the price. 898 "value": "A String", # The price represented as a number. 899 }, 900 "taxAdjustment": { # Adjustment for total tax of the line item. 901 "currency": "A String", # The currency of the price. 902 "value": "A String", # The price represented as a number. 903 }, 904 "type": "A String", # Type of this adjustment. Acceptable values are: - "`promotion`" 905 }, 906 ], 907 "annotations": [ # Annotations that are attached to the line item. 908 { 909 "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. 910 "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. 911 }, 912 ], 913 "cancellations": [ # Cancellations of the line item. 914 { 915 "actor": "A String", # The actor that created the cancellation. Acceptable values are: - "`customer`" - "`googleBot`" - "`googleCustomerService`" - "`googlePayments`" - "`googleSabre`" - "`merchant`" 916 "creationDate": "A String", # Date on which the cancellation has been created, in ISO 8601 format. 917 "quantity": 42, # The quantity that was canceled. 918 "reason": "A String", # The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Buy on Google until you make an update to that product. This will not affect your Shopping ads. Acceptable values are: - "`autoPostInternal`" - "`autoPostInvalidBillingAddress`" - "`autoPostNoInventory`" - "`autoPostPriceError`" - "`autoPostUndeliverableShippingAddress`" - "`couponAbuse`" - "`customerCanceled`" - "`customerInitiatedCancel`" - "`customerSupportRequested`" - "`failToPushOrderGoogleError`" - "`failToPushOrderMerchantError`" - "`failToPushOrderMerchantFulfillmentError`" - "`failToPushOrderToMerchant`" - "`failToPushOrderToMerchantOutOfStock`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`merchantDidNotShipOnTime`" - "`noInventory`" - "`orderTimeout`" - "`other`" - "`paymentAbuse`" - "`paymentDeclined`" - "`priceError`" - "`returnRefundAbuse`" - "`shippingPriceError`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`failedToCaptureFunds`" 919 "reasonText": "A String", # The explanation of the reason. 920 }, 921 ], 922 "id": "A String", # The ID of the line item. 923 "price": { # Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. 924 "currency": "A String", # The currency of the price. 925 "value": "A String", # The price represented as a number. 926 }, 927 "product": { # Product data as seen by customer from the time of the order placement. Note that certain attributes values (e.g. title or gtin) might be reformatted and no longer match values submitted via product feed. 928 "brand": "A String", # Brand of the item. 929 "condition": "A String", # Condition or state of the item. Acceptable values are: - "`new`" - "`refurbished`" - "`used`" 930 "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. 931 "fees": [ # Associated fees at order creation time. 932 { 933 "amount": { # Amount of the fee. 934 "currency": "A String", # The currency of the price. 935 "value": "A String", # The price represented as a number. 936 }, 937 "name": "A String", # Name of the fee. 938 }, 939 ], 940 "gtin": "A String", # Global Trade Item Number (GTIN) of the item. 941 "id": "A String", # The REST ID of the product. 942 "imageLink": "A String", # URL of an image of the item. 943 "itemGroupId": "A String", # Shared identifier for all variants of the same product. 944 "mpn": "A String", # Manufacturer Part Number (MPN) of the item. 945 "offerId": "A String", # An identifier of the item. 946 "price": { # Price of the item. 947 "currency": "A String", # The currency of the price. 948 "value": "A String", # The price represented as a number. 949 }, 950 "shownImage": "A String", # URL to the cached image shown to the user when order was placed. 951 "targetCountry": "A String", # The CLDR territory // code of the target country of the product. 952 "title": "A String", # The title of the product. 953 "variantAttributes": [ # Variant attributes for the item. These are dimensions of the product, such as color, gender, material, pattern, and size. You can find a comprehensive list of variant attributes here. 954 { 955 "dimension": "A String", # The dimension of the variant. 956 "value": "A String", # The value for the dimension. 957 }, 958 ], 959 }, 960 "quantityCanceled": 42, # Number of items canceled. 961 "quantityDelivered": 42, # Number of items delivered. 962 "quantityOrdered": 42, # Number of items ordered. 963 "quantityPending": 42, # Number of items pending. 964 "quantityReadyForPickup": 42, # Number of items ready for pickup. 965 "quantityReturned": 42, # Number of items returned. 966 "quantityShipped": 42, # Number of items shipped. 967 "quantityUndeliverable": 42, # Number of items undeliverable. 968 "returnInfo": { # Details of the return policy for the line item. 969 "daysToReturn": 42, # Required. How many days later the item can be returned. 970 "isReturnable": True or False, # Required. Whether the item is returnable. 971 "policyUrl": "A String", # Required. URL of the item return policy. 972 }, 973 "returns": [ # Returns of the line item. 974 { 975 "actor": "A String", # The actor that created the refund. Acceptable values are: - "`customer`" - "`googleBot`" - "`googleCustomerService`" - "`googlePayments`" - "`googleSabre`" - "`merchant`" 976 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 977 "quantity": 42, # Quantity that is returned. 978 "reason": "A String", # The reason for the return. Acceptable values are: - "`customerDiscretionaryReturn`" - "`customerInitiatedMerchantCancel`" - "`deliveredTooLate`" - "`expiredItem`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`other`" - "`productArrivedDamaged`" - "`productNotAsDescribed`" - "`qualityNotAsExpected`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`wrongProductShipped`" 979 "reasonText": "A String", # The explanation of the reason. 980 }, 981 ], 982 "shippingDetails": { # Details of the requested shipping for the line item. 983 "deliverByDate": "A String", # Required. The delivery by date, in ISO 8601 format. 984 "method": { # Required. Details of the shipping method. 985 "carrier": "A String", # The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values. 986 "maxDaysInTransit": 42, # Required. Maximum transit time. 987 "methodName": "A String", # Required. The name of the shipping method. 988 "minDaysInTransit": 42, # Required. Minimum transit time. 989 }, 990 "pickupPromiseInMinutes": 42, # The promised time in minutes in which the order will be ready for pickup. This only applies to buy-online-pickup-in-store same-day order. 991 "shipByDate": "A String", # Required. The ship by date, in ISO 8601 format. 992 "type": "A String", # Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. Acceptable values are: - "`delivery`" - "`pickup`" 993 }, 994 "tax": { # Total tax amount for the line item. For example, if two items are purchased, and each have a cost tax of $2, the total tax amount will be $4. 995 "currency": "A String", # The currency of the price. 996 "value": "A String", # The price represented as a number. 997 }, 998 }, 999 ], 1000 "merchantId": "A String", 1001 "merchantOrderId": "A String", # Merchant-provided ID of the order. 1002 "netPriceAmount": { # The net amount for the order (price part). For example, if an order was originally for $100 and a refund was issued for $20, the net amount will be $80. 1003 "currency": "A String", # The currency of the price. 1004 "value": "A String", # The price represented as a number. 1005 }, 1006 "netTaxAmount": { # The net amount for the order (tax part). Note that in certain cases due to taxable base adjustment `netTaxAmount` might not match to a sum of tax field across all lineItems and refunds. 1007 "currency": "A String", # The currency of the price. 1008 "value": "A String", # The price represented as a number. 1009 }, 1010 "paymentStatus": "A String", # The status of the payment. Acceptable values are: - "`paymentCaptured`" - "`paymentRejected`" - "`paymentSecured`" - "`pendingAuthorization`" 1011 "pickupDetails": { # Pickup details for shipments of type `pickup`. 1012 "address": { # Address of the pickup location where the shipment should be sent. Note that `recipientName` in the address is the name of the business at the pickup location. 1013 "country": "A String", # CLDR country code (e.g. "US"). 1014 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 1015 "A String", 1016 ], 1017 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1018 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1019 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1020 "recipientName": "A String", # Name of the recipient. 1021 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1022 "streetAddress": [ # Street-level part of the address. 1023 "A String", 1024 ], 1025 }, 1026 "collectors": [ # Collectors authorized to pick up shipment from the pickup location. 1027 { 1028 "name": "A String", # Name of the person picking up the shipment. 1029 "phoneNumber": "A String", # Phone number of the person picking up the shipment. 1030 }, 1031 ], 1032 "locationId": "A String", # ID of the pickup location. 1033 "pickupType": "A String", # The pickup type of this order. Acceptable values are: - "`merchantStore`" - "`merchantStoreCurbside`" - "`merchantStoreLocker`" - "`thirdPartyPickupPoint`" - "`thirdPartyLocker`" 1034 }, 1035 "placedDate": "A String", # The date when the order was placed, in ISO 8601 format. 1036 "promotions": [ # Promotions associated with the order. To determine which promotions apply to which products, check the `Promotions[].appliedItems[].lineItemId` field against the `LineItems[].id` field for each promotion. If a promotion is applied to more than 1 offerId, divide the discount value by the number of affected offers to determine how much discount to apply to each offerId. Examples: 1. To calculate price paid by the customer for a single line item including the discount: For each promotion, subtract the `LineItems[].adjustments[].priceAdjustment.value` amount from the `LineItems[].Price.value`. 2. To calculate price paid by the customer for a single line item including the discount in case of multiple quantity: For each promotion, divide the `LineItems[].adjustments[].priceAdjustment.value` by the quantity of products then subtract the resulting value from the `LineItems[].Product.Price.value` for each quantity item. Only 1 promotion can be applied to an offerId in a given order. To refund an item which had a promotion applied to it, make sure to refund the amount after first subtracting the promotion discount from the item price. More details about the program are here. 1037 { 1038 "applicableItems": [ # Items that this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. This field will also be empty for shipping promotions because shipping is not tied to any specific item. 1039 { 1040 "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. 1041 "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. 1042 "productId": "A String", # `orders.createtestorder`. 1043 "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. 1044 }, 1045 ], 1046 "appliedItems": [ # Items that this promotion have been applied to. Do not provide for `orders.createtestorder`. This field will be empty for shipping promotions because shipping is not tied to any specific item. 1047 { 1048 "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. 1049 "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. 1050 "productId": "A String", # `orders.createtestorder`. 1051 "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. 1052 }, 1053 ], 1054 "endTime": "A String", # Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". 1055 "funder": "A String", # Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. Acceptable values are: - "`google`" - "`merchant`" 1056 "merchantPromotionId": "A String", # Required. This field is used to identify promotions within merchants' own systems. 1057 "priceValue": { # Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. 1058 "currency": "A String", # The currency of the price. 1059 "value": "A String", # The price represented as a number. 1060 }, 1061 "shortTitle": "A String", # A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`. 1062 "startTime": "A String", # Promotion start time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". 1063 "subtype": "A String", # Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. Acceptable values are: - "`buyMGetMoneyOff`" - "`buyMGetNMoneyOff`" - "`buyMGetNPercentOff`" - "`buyMGetPercentOff`" - "`freeGift`" - "`freeGiftWithItemId`" - "`freeGiftWithValue`" - "`freeShippingOvernight`" - "`freeShippingStandard`" - "`freeShippingTwoDay`" - "`moneyOff`" - "`percentOff`" - "`rewardPoints`" - "`salePrice`" 1064 "taxValue": { # Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`. 1065 "currency": "A String", # The currency of the price. 1066 "value": "A String", # The price represented as a number. 1067 }, 1068 "title": "A String", # Required. The title of the promotion. 1069 "type": "A String", # Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. Acceptable values are: - "`product`" - "`shipping`" 1070 }, 1071 ], 1072 "refunds": [ # Refunds for the order. 1073 { 1074 "actor": "A String", # The actor that created the refund. Acceptable values are: - "`customer`" - "`googleBot`" - "`googleCustomerService`" - "`googlePayments`" - "`googleSabre`" - "`merchant`" 1075 "amount": { # The amount that is refunded. 1076 "currency": "A String", # The currency of the price. 1077 "value": "A String", # The price represented as a number. 1078 }, 1079 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 1080 "reason": "A String", # The reason for the refund. Acceptable values are: - "`adjustment`" - "`autoPostInternal`" - "`autoPostInvalidBillingAddress`" - "`autoPostNoInventory`" - "`autoPostPriceError`" - "`autoPostUndeliverableShippingAddress`" - "`couponAbuse`" - "`courtesyAdjustment`" - "`customerCanceled`" - "`customerDiscretionaryReturn`" - "`customerInitiatedMerchantCancel`" - "`customerSupportRequested`" - "`deliveredLateByCarrier`" - "`deliveredTooLate`" - "`expiredItem`" - "`failToPushOrderGoogleError`" - "`failToPushOrderMerchantError`" - "`failToPushOrderMerchantFulfillmentError`" - "`failToPushOrderToMerchant`" - "`failToPushOrderToMerchantOutOfStock`" - "`feeAdjustment`" - "`invalidCoupon`" - "`lateShipmentCredit`" - "`malformedShippingAddress`" - "`merchantDidNotShipOnTime`" - "`noInventory`" - "`orderTimeout`" - "`other`" - "`paymentAbuse`" - "`paymentDeclined`" - "`priceAdjustment`" - "`priceError`" - "`productArrivedDamaged`" - "`productNotAsDescribed`" - "`promoReallocation`" - "`qualityNotAsExpected`" - "`returnRefundAbuse`" - "`shippingCostAdjustment`" - "`shippingPriceError`" - "`taxAdjustment`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`wrongProductShipped`" 1081 "reasonText": "A String", # The explanation of the reason. 1082 }, 1083 ], 1084 "shipments": [ # Shipments of the order. 1085 { 1086 "carrier": "A String", # The carrier handling the shipment. For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. *Note:* You can also use unsupported carriers, but emails to customers will not include the carrier name or tracking URL, and there will be no automatic order status updates. Supported carriers for US are: - "`ups`" (United Parcel Service) *automatic status updates* - "`usps`" (United States Postal Service) *automatic status updates* - "`fedex`" (FedEx) *automatic status updates * - "`dhl`" (DHL eCommerce) *automatic status updates* (US only) - "`ontrac`" (OnTrac) *automatic status updates * - "`dhl express`" (DHL Express) - "`deliv`" (Deliv) - "`dynamex`" (TForce) - "`lasership`" (LaserShip) - "`mpx`" (Military Parcel Xpress) - "`uds`" (United Delivery Service) - "`efw`" (Estes Forwarding Worldwide) - "`jd logistics`" (JD Logistics) - "`yunexpress`" (YunExpress) - "`china post`" (China Post) - "`china ems`" (China Post Express Mail Service) - "`singapore post`" (Singapore Post) - "`pos malaysia`" (Pos Malaysia) - "`postnl`" (PostNL) - "`ptt`" (PTT Turkish Post) - "`eub`" (ePacket) - "`chukou1`" (Chukou1 Logistics) - "`bestex`" (Best Express) - "`canada post`" (Canada Post) - "`purolator`" (Purolator) - "`canpar`" (Canpar) - "`india post`" (India Post) - "`blue dart`" (Blue Dart) - "`delhivery`" (Delhivery) - "`dtdc`" (DTDC) - "`tpc india`" (TPC India) - "`lso`" (Lone Star Overnight) - "`tww`" (Team Worldwide) Supported carriers for FR are: - "`la poste`" (La Poste) *automatic status updates * - "`colissimo`" (Colissimo by La Poste) *automatic status updates* - "`ups`" (United Parcel Service) *automatic status updates * - "`chronopost`" (Chronopost by La Poste) - "`gls`" (General Logistics Systems France) - "`dpd`" (DPD Group by GeoPost) - "`bpost`" (Belgian Post Group) - "`colis prive`" (Colis Privé) - "`boxtal`" (Boxtal) - "`geodis`" (GEODIS) - "`tnt`" (TNT) - "`db schenker`" (DB Schenker) - "`aramex`" (Aramex) 1087 "creationDate": "A String", # Date on which the shipment has been created, in ISO 8601 format. 1088 "deliveryDate": "A String", # Date on which the shipment has been delivered, in ISO 8601 format. Present only if `status` is `delivered` 1089 "id": "A String", # The ID of the shipment. 1090 "lineItems": [ # The line items that are shipped. 1091 { 1092 "lineItemId": "A String", # The ID of the line item that is shipped. This value is assigned by Google when an order is created. Either lineItemId or productId is required. 1093 "productId": "A String", # The ID of the product to ship. This is the REST ID used in the products service. Either lineItemId or productId is required. 1094 "quantity": 42, # The quantity that is shipped. 1095 }, 1096 ], 1097 "scheduledDeliveryDetails": { # Delivery details of the shipment if scheduling is needed. 1098 "carrierPhoneNumber": "A String", # The phone number of the carrier fulfilling the delivery. The phone number is formatted as the international notation in ITU-T Recommendation E.123 (e.g., "+41 44 668 1800"). 1099 "scheduledDate": "A String", # The date a shipment is scheduled for delivery, in ISO 8601 format. 1100 }, 1101 "shipmentGroupId": "A String", # The shipment group ID of the shipment. This is set in shiplineitems request. 1102 "status": "A String", # The status of the shipment. Acceptable values are: - "`delivered`" - "`readyForPickup`" - "`shipped`" - "`undeliverable`" 1103 "trackingId": "A String", # The tracking ID for the shipment. 1104 }, 1105 ], 1106 "shippingCost": { # The total cost of shipping for all items. 1107 "currency": "A String", # The currency of the price. 1108 "value": "A String", # The price represented as a number. 1109 }, 1110 "shippingCostTax": { # The tax for the total shipping cost. 1111 "currency": "A String", # The currency of the price. 1112 "value": "A String", # The price represented as a number. 1113 }, 1114 "status": "A String", # The status of the order. Acceptable values are: - "`canceled`" - "`delivered`" - "`inProgress`" - "`partiallyDelivered`" - "`partiallyReturned`" - "`partiallyShipped`" - "`pendingShipment`" - "`returned`" - "`shipped`" 1115 "taxCollector": "A String", # The party responsible for collecting and remitting taxes. Acceptable values are: - "`marketplaceFacilitator`" - "`merchant`" 1116 }, 1117}</pre> 1118</div> 1119 1120<div class="method"> 1121 <code class="details" id="gettestordertemplate">gettestordertemplate(merchantId, templateName, country=None, x__xgafv=None)</code> 1122 <pre>Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. 1123 1124Args: 1125 merchantId: string, The ID of the account that should manage the order. This cannot be a multi-client account. (required) 1126 templateName: string, The name of the template to retrieve. (required) 1127 Allowed values 1128 TEMPLATE1 - Get `template1`. 1129 TEMPLATE2 - Get `template2`. 1130 TEMPLATE1A - Get `template1A`. 1131 TEMPLATE1B - Get `template1B`. 1132 TEMPLATE3 - Get `template3`. 1133 TEMPLATE4 - Get `template4`. 1134 country: string, The country of the template to retrieve. Defaults to `US`. 1135 x__xgafv: string, V1 error format. 1136 Allowed values 1137 1 - v1 error format 1138 2 - v2 error format 1139 1140Returns: 1141 An object of the form: 1142 1143 { 1144 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersGetTestOrderTemplateResponse`". 1145 "template": { # The requested test order template. 1146 "deliveryDetails": { # Overrides the predefined delivery details if provided. 1147 "address": { # The delivery address 1148 "country": "A String", # CLDR country code (e.g. "US"). 1149 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 1150 "A String", 1151 ], 1152 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1153 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1154 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1155 "recipientName": "A String", # Name of the recipient. 1156 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1157 "streetAddress": [ # Street-level part of the address. 1158 "A String", 1159 ], 1160 }, 1161 "isScheduledDelivery": True or False, # Whether the order is scheduled delivery order. 1162 "phoneNumber": "A String", # The phone number of the person receiving the delivery. 1163 }, 1164 "enableOrderinvoices": True or False, # Whether the orderinvoices service should support this order. 1165 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#testOrder`" 1166 "lineItems": [ # Required. Line items that are ordered. At least one line item must be provided. 1167 { 1168 "product": { # Required. Product data from the time of the order placement. 1169 "brand": "A String", # Required. Brand of the item. 1170 "condition": "A String", # Required. Condition or state of the item. Acceptable values are: - "`new`" 1171 "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. Acceptable values are: - "`en`" - "`fr`" 1172 "fees": [ # Fees for the item. Optional. 1173 { 1174 "amount": { # Amount of the fee. 1175 "currency": "A String", # The currency of the price. 1176 "value": "A String", # The price represented as a number. 1177 }, 1178 "name": "A String", # Name of the fee. 1179 }, 1180 ], 1181 "gtin": "A String", # Global Trade Item Number (GTIN) of the item. Optional. 1182 "imageLink": "A String", # Required. URL of an image of the item. 1183 "itemGroupId": "A String", # Shared identifier for all variants of the same product. Optional. 1184 "mpn": "A String", # Manufacturer Part Number (MPN) of the item. Optional. 1185 "offerId": "A String", # Required. An identifier of the item. 1186 "price": { # Required. The price for the product. Tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied. 1187 "currency": "A String", # The currency of the price. 1188 "value": "A String", # The price represented as a number. 1189 }, 1190 "targetCountry": "A String", # Required. The CLDR territory // code of the target country of the product. 1191 "title": "A String", # Required. The title of the product. 1192 "variantAttributes": [ # Variant attributes for the item. Optional. 1193 { 1194 "dimension": "A String", # The dimension of the variant. 1195 "value": "A String", # The value for the dimension. 1196 }, 1197 ], 1198 }, 1199 "quantityOrdered": 42, # Required. Number of items ordered. 1200 "returnInfo": { # Required. Details of the return policy for the line item. 1201 "daysToReturn": 42, # Required. How many days later the item can be returned. 1202 "isReturnable": True or False, # Required. Whether the item is returnable. 1203 "policyUrl": "A String", # Required. URL of the item return policy. 1204 }, 1205 "shippingDetails": { # Required. Details of the requested shipping for the line item. 1206 "deliverByDate": "A String", # Required. The delivery by date, in ISO 8601 format. 1207 "method": { # Required. Details of the shipping method. 1208 "carrier": "A String", # The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values. 1209 "maxDaysInTransit": 42, # Required. Maximum transit time. 1210 "methodName": "A String", # Required. The name of the shipping method. 1211 "minDaysInTransit": 42, # Required. Minimum transit time. 1212 }, 1213 "pickupPromiseInMinutes": 42, # The promised time in minutes in which the order will be ready for pickup. This only applies to buy-online-pickup-in-store same-day order. 1214 "shipByDate": "A String", # Required. The ship by date, in ISO 8601 format. 1215 "type": "A String", # Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. Acceptable values are: - "`delivery`" - "`pickup`" 1216 }, 1217 }, 1218 ], 1219 "notificationMode": "A String", # Restricted. Do not use. 1220 "pickupDetails": { # Overrides the predefined pickup details if provided. 1221 "locationCode": "A String", # Required. Code of the location defined by provider or merchant. 1222 "pickupLocationAddress": { # Required. Pickup location address. 1223 "country": "A String", # CLDR country code (e.g. "US"). 1224 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 1225 "A String", 1226 ], 1227 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1228 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1229 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1230 "recipientName": "A String", # Name of the recipient. 1231 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1232 "streetAddress": [ # Street-level part of the address. 1233 "A String", 1234 ], 1235 }, 1236 "pickupLocationType": "A String", # Pickup location type. Acceptable values are: - "`locker`" - "`store`" - "`curbside`" 1237 "pickupPersons": [ # Required. all pickup persons set by users. 1238 { 1239 "name": "A String", # Required. Full name of the pickup person. 1240 "phoneNumber": "A String", # Required. The phone number of the person picking up the items. 1241 }, 1242 ], 1243 }, 1244 "predefinedBillingAddress": "A String", # Required. The billing address. Acceptable values are: - "`dwight`" - "`jim`" - "`pam`" 1245 "predefinedDeliveryAddress": "A String", # Required. Identifier of one of the predefined delivery addresses for the delivery. Acceptable values are: - "`dwight`" - "`jim`" - "`pam`" 1246 "predefinedEmail": "A String", # Required. Email address of the customer. Acceptable values are: - "`[email protected]`" - "`[email protected]`" - "`[email protected]`" 1247 "predefinedPickupDetails": "A String", # Identifier of one of the predefined pickup details. Required for orders containing line items with shipping type `pickup`. Acceptable values are: - "`dwight`" - "`jim`" - "`pam`" 1248 "promotions": [ # Promotions associated with the order. 1249 { 1250 "applicableItems": [ # Items that this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. This field will also be empty for shipping promotions because shipping is not tied to any specific item. 1251 { 1252 "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. 1253 "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. 1254 "productId": "A String", # `orders.createtestorder`. 1255 "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. 1256 }, 1257 ], 1258 "appliedItems": [ # Items that this promotion have been applied to. Do not provide for `orders.createtestorder`. This field will be empty for shipping promotions because shipping is not tied to any specific item. 1259 { 1260 "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. 1261 "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. 1262 "productId": "A String", # `orders.createtestorder`. 1263 "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. 1264 }, 1265 ], 1266 "endTime": "A String", # Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". 1267 "funder": "A String", # Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. Acceptable values are: - "`google`" - "`merchant`" 1268 "merchantPromotionId": "A String", # Required. This field is used to identify promotions within merchants' own systems. 1269 "priceValue": { # Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. 1270 "currency": "A String", # The currency of the price. 1271 "value": "A String", # The price represented as a number. 1272 }, 1273 "shortTitle": "A String", # A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`. 1274 "startTime": "A String", # Promotion start time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". 1275 "subtype": "A String", # Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. Acceptable values are: - "`buyMGetMoneyOff`" - "`buyMGetNMoneyOff`" - "`buyMGetNPercentOff`" - "`buyMGetPercentOff`" - "`freeGift`" - "`freeGiftWithItemId`" - "`freeGiftWithValue`" - "`freeShippingOvernight`" - "`freeShippingStandard`" - "`freeShippingTwoDay`" - "`moneyOff`" - "`percentOff`" - "`rewardPoints`" - "`salePrice`" 1276 "taxValue": { # Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`. 1277 "currency": "A String", # The currency of the price. 1278 "value": "A String", # The price represented as a number. 1279 }, 1280 "title": "A String", # Required. The title of the promotion. 1281 "type": "A String", # Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. Acceptable values are: - "`product`" - "`shipping`" 1282 }, 1283 ], 1284 "shippingCost": { # Required. The price of shipping for all items. Shipping tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied. Note that shipping is not taxed in certain states. 1285 "currency": "A String", # The currency of the price. 1286 "value": "A String", # The price represented as a number. 1287 }, 1288 "shippingOption": "A String", # Required. The requested shipping option. Acceptable values are: - "`economy`" - "`expedited`" - "`oneDay`" - "`sameDay`" - "`standard`" - "`twoDay`" 1289 }, 1290}</pre> 1291</div> 1292 1293<div class="method"> 1294 <code class="details" id="instorerefundlineitem">instorerefundlineitem(merchantId, orderId, body=None, x__xgafv=None)</code> 1295 <pre>Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return. 1296 1297Args: 1298 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1299 orderId: string, The ID of the order. (required) 1300 body: object, The request body. 1301 The object takes the form of: 1302 1303{ 1304 "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. 1305 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1306 "priceAmount": { # The amount to be refunded. This may be pre-tax or post-tax depending on the location of the order. Required. 1307 "currency": "A String", # The currency of the price. 1308 "value": "A String", # The price represented as a number. 1309 }, 1310 "productId": "A String", # The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required. 1311 "quantity": 42, # The quantity to return and refund. 1312 "reason": "A String", # The reason for the return. Acceptable values are: - "`customerDiscretionaryReturn`" - "`customerInitiatedMerchantCancel`" - "`deliveredTooLate`" - "`expiredItem`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`other`" - "`productArrivedDamaged`" - "`productNotAsDescribed`" - "`qualityNotAsExpected`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`wrongProductShipped`" 1313 "reasonText": "A String", # The explanation of the reason. 1314 "taxAmount": { # The amount of tax to be refunded. Required. 1315 "currency": "A String", # The currency of the price. 1316 "value": "A String", # The price represented as a number. 1317 }, 1318} 1319 1320 x__xgafv: string, V1 error format. 1321 Allowed values 1322 1 - v1 error format 1323 2 - v2 error format 1324 1325Returns: 1326 An object of the form: 1327 1328 { 1329 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 1330 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersInStoreRefundLineItemResponse`". 1331}</pre> 1332</div> 1333 1334<div class="method"> 1335 <code class="details" id="list">list(merchantId, acknowledged=None, maxResults=None, orderBy=None, pageToken=None, placedDateEnd=None, placedDateStart=None, statuses=None, x__xgafv=None)</code> 1336 <pre>Lists the orders in your Merchant Center account. 1337 1338Args: 1339 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1340 acknowledged: boolean, Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged. We recommend using this filter set to `false`, in conjunction with the `acknowledge` call, such that only un-acknowledged orders are returned. 1341 maxResults: integer, The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 orders per page. 1342 orderBy: string, Order results by placement date in descending or ascending order. Acceptable values are: - placedDateAsc - placedDateDesc 1343 pageToken: string, The token returned by the previous request. 1344 placedDateEnd: string, Obtains orders placed before this date (exclusively), in ISO 8601 format. 1345 placedDateStart: string, Obtains orders placed after this date (inclusively), in ISO 8601 format. 1346 statuses: string, Obtains orders that match any of the specified statuses. Please note that `active` is a shortcut for `pendingShipment` and `partiallyShipped`, and `completed` is a shortcut for `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, `returned`, and `canceled`. (repeated) 1347 Allowed values 1348 ACTIVE - Return orders with status `active`. The `active` status includes `pendingShipment` and `partiallyShipped` orders. 1349 COMPLETED - Return orders with status `completed`. The `completed` status includes `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, `returned`, and `canceled` orders. 1350 CANCELED - Return orders with status `canceled`. 1351 IN_PROGRESS - Return orders with status `inProgress`. 1352 PENDING_SHIPMENT - Return orders with status `pendingShipment`. 1353 PARTIALLY_SHIPPED - Return orders with status `partiallyShipped`. 1354 SHIPPED - Return orders with status `shipped`. 1355 PARTIALLY_DELIVERED - Return orders with status `partiallyDelivered`. 1356 DELIVERED - Return orders with status `delivered`. 1357 PARTIALLY_RETURNED - Return orders with status `partiallyReturned`. 1358 RETURNED - Return orders with status `returned`. 1359 x__xgafv: string, V1 error format. 1360 Allowed values 1361 1 - v1 error format 1362 2 - v2 error format 1363 1364Returns: 1365 An object of the form: 1366 1367 { 1368 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersListResponse`". 1369 "nextPageToken": "A String", # The token for the retrieval of the next page of orders. 1370 "resources": [ 1371 { # Order. Production access (all methods) requires the order manager role. Sandbox access does not. 1372 "acknowledged": True or False, # Whether the order was acknowledged. 1373 "annotations": [ # List of key-value pairs that are attached to a given order. 1374 { 1375 "key": "A String", # Key for additional google provided (as key-value pairs) annotation. 1376 "value": "A String", # Value for additional google provided (as key-value pairs) annotation. 1377 }, 1378 ], 1379 "billingAddress": { # The billing address. 1380 "country": "A String", # CLDR country code (e.g. "US"). 1381 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 1382 "A String", 1383 ], 1384 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1385 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1386 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1387 "recipientName": "A String", # Name of the recipient. 1388 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1389 "streetAddress": [ # Street-level part of the address. 1390 "A String", 1391 ], 1392 }, 1393 "customer": { # The details of the customer who placed the order. 1394 "fullName": "A String", # Full name of the customer. 1395 "invoiceReceivingEmail": "A String", # Email address for the merchant to send value-added tax or invoice documentation of the order. Only the last document sent is made available to the customer. For more information, see About automated VAT invoicing for Buy on Google. 1396 "loyaltyInfo": { # Loyalty program information. 1397 "loyaltyNumber": "A String", # The loyalty card/membership number. 1398 "name": "A String", # Name of card/membership holder, this field will be populated when 1399 }, 1400 "marketingRightsInfo": { # Customer's marketing preferences. Contains the marketing opt-in information that is current at the time that the merchant call. User preference selections can change from one order to the next so preferences must be checked with every order. 1401 "explicitMarketingPreference": "A String", # Last known customer selection regarding marketing preferences. In certain cases this selection might not be known, so this field would be empty. If a customer selected `granted` in their most recent order, they can be subscribed to marketing emails. Customers who have chosen `denied` must not be subscribed, or must be unsubscribed if already opted-in. Acceptable values are: - "`denied`" - "`granted`" 1402 "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. 1403 "marketingEmailAddress": "A String", # Email address that can be used for marketing purposes. The field may be empty even if `explicitMarketingPreference` is 'granted'. This happens when retrieving an old order from the customer who deleted their account. 1404 }, 1405 }, 1406 "deliveryDetails": { # Delivery details for shipments of type `delivery`. 1407 "address": { # The delivery address 1408 "country": "A String", # CLDR country code (e.g. "US"). 1409 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 1410 "A String", 1411 ], 1412 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1413 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1414 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1415 "recipientName": "A String", # Name of the recipient. 1416 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1417 "streetAddress": [ # Street-level part of the address. 1418 "A String", 1419 ], 1420 }, 1421 "phoneNumber": "A String", # The phone number of the person receiving the delivery. 1422 }, 1423 "id": "A String", # The REST ID of the order. Globally unique. 1424 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#order`" 1425 "lineItems": [ # Line items that are ordered. 1426 { 1427 "adjustments": [ # Price and tax adjustments applied on the line item. 1428 { 1429 "priceAdjustment": { # Adjustment for total price of the line item. 1430 "currency": "A String", # The currency of the price. 1431 "value": "A String", # The price represented as a number. 1432 }, 1433 "taxAdjustment": { # Adjustment for total tax of the line item. 1434 "currency": "A String", # The currency of the price. 1435 "value": "A String", # The price represented as a number. 1436 }, 1437 "type": "A String", # Type of this adjustment. Acceptable values are: - "`promotion`" 1438 }, 1439 ], 1440 "annotations": [ # Annotations that are attached to the line item. 1441 { 1442 "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. 1443 "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. 1444 }, 1445 ], 1446 "cancellations": [ # Cancellations of the line item. 1447 { 1448 "actor": "A String", # The actor that created the cancellation. Acceptable values are: - "`customer`" - "`googleBot`" - "`googleCustomerService`" - "`googlePayments`" - "`googleSabre`" - "`merchant`" 1449 "creationDate": "A String", # Date on which the cancellation has been created, in ISO 8601 format. 1450 "quantity": 42, # The quantity that was canceled. 1451 "reason": "A String", # The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Buy on Google until you make an update to that product. This will not affect your Shopping ads. Acceptable values are: - "`autoPostInternal`" - "`autoPostInvalidBillingAddress`" - "`autoPostNoInventory`" - "`autoPostPriceError`" - "`autoPostUndeliverableShippingAddress`" - "`couponAbuse`" - "`customerCanceled`" - "`customerInitiatedCancel`" - "`customerSupportRequested`" - "`failToPushOrderGoogleError`" - "`failToPushOrderMerchantError`" - "`failToPushOrderMerchantFulfillmentError`" - "`failToPushOrderToMerchant`" - "`failToPushOrderToMerchantOutOfStock`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`merchantDidNotShipOnTime`" - "`noInventory`" - "`orderTimeout`" - "`other`" - "`paymentAbuse`" - "`paymentDeclined`" - "`priceError`" - "`returnRefundAbuse`" - "`shippingPriceError`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`failedToCaptureFunds`" 1452 "reasonText": "A String", # The explanation of the reason. 1453 }, 1454 ], 1455 "id": "A String", # The ID of the line item. 1456 "price": { # Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. 1457 "currency": "A String", # The currency of the price. 1458 "value": "A String", # The price represented as a number. 1459 }, 1460 "product": { # Product data as seen by customer from the time of the order placement. Note that certain attributes values (e.g. title or gtin) might be reformatted and no longer match values submitted via product feed. 1461 "brand": "A String", # Brand of the item. 1462 "condition": "A String", # Condition or state of the item. Acceptable values are: - "`new`" - "`refurbished`" - "`used`" 1463 "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. 1464 "fees": [ # Associated fees at order creation time. 1465 { 1466 "amount": { # Amount of the fee. 1467 "currency": "A String", # The currency of the price. 1468 "value": "A String", # The price represented as a number. 1469 }, 1470 "name": "A String", # Name of the fee. 1471 }, 1472 ], 1473 "gtin": "A String", # Global Trade Item Number (GTIN) of the item. 1474 "id": "A String", # The REST ID of the product. 1475 "imageLink": "A String", # URL of an image of the item. 1476 "itemGroupId": "A String", # Shared identifier for all variants of the same product. 1477 "mpn": "A String", # Manufacturer Part Number (MPN) of the item. 1478 "offerId": "A String", # An identifier of the item. 1479 "price": { # Price of the item. 1480 "currency": "A String", # The currency of the price. 1481 "value": "A String", # The price represented as a number. 1482 }, 1483 "shownImage": "A String", # URL to the cached image shown to the user when order was placed. 1484 "targetCountry": "A String", # The CLDR territory // code of the target country of the product. 1485 "title": "A String", # The title of the product. 1486 "variantAttributes": [ # Variant attributes for the item. These are dimensions of the product, such as color, gender, material, pattern, and size. You can find a comprehensive list of variant attributes here. 1487 { 1488 "dimension": "A String", # The dimension of the variant. 1489 "value": "A String", # The value for the dimension. 1490 }, 1491 ], 1492 }, 1493 "quantityCanceled": 42, # Number of items canceled. 1494 "quantityDelivered": 42, # Number of items delivered. 1495 "quantityOrdered": 42, # Number of items ordered. 1496 "quantityPending": 42, # Number of items pending. 1497 "quantityReadyForPickup": 42, # Number of items ready for pickup. 1498 "quantityReturned": 42, # Number of items returned. 1499 "quantityShipped": 42, # Number of items shipped. 1500 "quantityUndeliverable": 42, # Number of items undeliverable. 1501 "returnInfo": { # Details of the return policy for the line item. 1502 "daysToReturn": 42, # Required. How many days later the item can be returned. 1503 "isReturnable": True or False, # Required. Whether the item is returnable. 1504 "policyUrl": "A String", # Required. URL of the item return policy. 1505 }, 1506 "returns": [ # Returns of the line item. 1507 { 1508 "actor": "A String", # The actor that created the refund. Acceptable values are: - "`customer`" - "`googleBot`" - "`googleCustomerService`" - "`googlePayments`" - "`googleSabre`" - "`merchant`" 1509 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 1510 "quantity": 42, # Quantity that is returned. 1511 "reason": "A String", # The reason for the return. Acceptable values are: - "`customerDiscretionaryReturn`" - "`customerInitiatedMerchantCancel`" - "`deliveredTooLate`" - "`expiredItem`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`other`" - "`productArrivedDamaged`" - "`productNotAsDescribed`" - "`qualityNotAsExpected`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`wrongProductShipped`" 1512 "reasonText": "A String", # The explanation of the reason. 1513 }, 1514 ], 1515 "shippingDetails": { # Details of the requested shipping for the line item. 1516 "deliverByDate": "A String", # Required. The delivery by date, in ISO 8601 format. 1517 "method": { # Required. Details of the shipping method. 1518 "carrier": "A String", # The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values. 1519 "maxDaysInTransit": 42, # Required. Maximum transit time. 1520 "methodName": "A String", # Required. The name of the shipping method. 1521 "minDaysInTransit": 42, # Required. Minimum transit time. 1522 }, 1523 "pickupPromiseInMinutes": 42, # The promised time in minutes in which the order will be ready for pickup. This only applies to buy-online-pickup-in-store same-day order. 1524 "shipByDate": "A String", # Required. The ship by date, in ISO 8601 format. 1525 "type": "A String", # Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. Acceptable values are: - "`delivery`" - "`pickup`" 1526 }, 1527 "tax": { # Total tax amount for the line item. For example, if two items are purchased, and each have a cost tax of $2, the total tax amount will be $4. 1528 "currency": "A String", # The currency of the price. 1529 "value": "A String", # The price represented as a number. 1530 }, 1531 }, 1532 ], 1533 "merchantId": "A String", 1534 "merchantOrderId": "A String", # Merchant-provided ID of the order. 1535 "netPriceAmount": { # The net amount for the order (price part). For example, if an order was originally for $100 and a refund was issued for $20, the net amount will be $80. 1536 "currency": "A String", # The currency of the price. 1537 "value": "A String", # The price represented as a number. 1538 }, 1539 "netTaxAmount": { # The net amount for the order (tax part). Note that in certain cases due to taxable base adjustment `netTaxAmount` might not match to a sum of tax field across all lineItems and refunds. 1540 "currency": "A String", # The currency of the price. 1541 "value": "A String", # The price represented as a number. 1542 }, 1543 "paymentStatus": "A String", # The status of the payment. Acceptable values are: - "`paymentCaptured`" - "`paymentRejected`" - "`paymentSecured`" - "`pendingAuthorization`" 1544 "pickupDetails": { # Pickup details for shipments of type `pickup`. 1545 "address": { # Address of the pickup location where the shipment should be sent. Note that `recipientName` in the address is the name of the business at the pickup location. 1546 "country": "A String", # CLDR country code (e.g. "US"). 1547 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States 1548 "A String", 1549 ], 1550 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1551 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1552 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1553 "recipientName": "A String", # Name of the recipient. 1554 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1555 "streetAddress": [ # Street-level part of the address. 1556 "A String", 1557 ], 1558 }, 1559 "collectors": [ # Collectors authorized to pick up shipment from the pickup location. 1560 { 1561 "name": "A String", # Name of the person picking up the shipment. 1562 "phoneNumber": "A String", # Phone number of the person picking up the shipment. 1563 }, 1564 ], 1565 "locationId": "A String", # ID of the pickup location. 1566 "pickupType": "A String", # The pickup type of this order. Acceptable values are: - "`merchantStore`" - "`merchantStoreCurbside`" - "`merchantStoreLocker`" - "`thirdPartyPickupPoint`" - "`thirdPartyLocker`" 1567 }, 1568 "placedDate": "A String", # The date when the order was placed, in ISO 8601 format. 1569 "promotions": [ # Promotions associated with the order. To determine which promotions apply to which products, check the `Promotions[].appliedItems[].lineItemId` field against the `LineItems[].id` field for each promotion. If a promotion is applied to more than 1 offerId, divide the discount value by the number of affected offers to determine how much discount to apply to each offerId. Examples: 1. To calculate price paid by the customer for a single line item including the discount: For each promotion, subtract the `LineItems[].adjustments[].priceAdjustment.value` amount from the `LineItems[].Price.value`. 2. To calculate price paid by the customer for a single line item including the discount in case of multiple quantity: For each promotion, divide the `LineItems[].adjustments[].priceAdjustment.value` by the quantity of products then subtract the resulting value from the `LineItems[].Product.Price.value` for each quantity item. Only 1 promotion can be applied to an offerId in a given order. To refund an item which had a promotion applied to it, make sure to refund the amount after first subtracting the promotion discount from the item price. More details about the program are here. 1570 { 1571 "applicableItems": [ # Items that this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. This field will also be empty for shipping promotions because shipping is not tied to any specific item. 1572 { 1573 "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. 1574 "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. 1575 "productId": "A String", # `orders.createtestorder`. 1576 "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. 1577 }, 1578 ], 1579 "appliedItems": [ # Items that this promotion have been applied to. Do not provide for `orders.createtestorder`. This field will be empty for shipping promotions because shipping is not tied to any specific item. 1580 { 1581 "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. 1582 "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. 1583 "productId": "A String", # `orders.createtestorder`. 1584 "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. 1585 }, 1586 ], 1587 "endTime": "A String", # Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". 1588 "funder": "A String", # Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. Acceptable values are: - "`google`" - "`merchant`" 1589 "merchantPromotionId": "A String", # Required. This field is used to identify promotions within merchants' own systems. 1590 "priceValue": { # Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. 1591 "currency": "A String", # The currency of the price. 1592 "value": "A String", # The price represented as a number. 1593 }, 1594 "shortTitle": "A String", # A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`. 1595 "startTime": "A String", # Promotion start time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". 1596 "subtype": "A String", # Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. Acceptable values are: - "`buyMGetMoneyOff`" - "`buyMGetNMoneyOff`" - "`buyMGetNPercentOff`" - "`buyMGetPercentOff`" - "`freeGift`" - "`freeGiftWithItemId`" - "`freeGiftWithValue`" - "`freeShippingOvernight`" - "`freeShippingStandard`" - "`freeShippingTwoDay`" - "`moneyOff`" - "`percentOff`" - "`rewardPoints`" - "`salePrice`" 1597 "taxValue": { # Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`. 1598 "currency": "A String", # The currency of the price. 1599 "value": "A String", # The price represented as a number. 1600 }, 1601 "title": "A String", # Required. The title of the promotion. 1602 "type": "A String", # Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. Acceptable values are: - "`product`" - "`shipping`" 1603 }, 1604 ], 1605 "refunds": [ # Refunds for the order. 1606 { 1607 "actor": "A String", # The actor that created the refund. Acceptable values are: - "`customer`" - "`googleBot`" - "`googleCustomerService`" - "`googlePayments`" - "`googleSabre`" - "`merchant`" 1608 "amount": { # The amount that is refunded. 1609 "currency": "A String", # The currency of the price. 1610 "value": "A String", # The price represented as a number. 1611 }, 1612 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 1613 "reason": "A String", # The reason for the refund. Acceptable values are: - "`adjustment`" - "`autoPostInternal`" - "`autoPostInvalidBillingAddress`" - "`autoPostNoInventory`" - "`autoPostPriceError`" - "`autoPostUndeliverableShippingAddress`" - "`couponAbuse`" - "`courtesyAdjustment`" - "`customerCanceled`" - "`customerDiscretionaryReturn`" - "`customerInitiatedMerchantCancel`" - "`customerSupportRequested`" - "`deliveredLateByCarrier`" - "`deliveredTooLate`" - "`expiredItem`" - "`failToPushOrderGoogleError`" - "`failToPushOrderMerchantError`" - "`failToPushOrderMerchantFulfillmentError`" - "`failToPushOrderToMerchant`" - "`failToPushOrderToMerchantOutOfStock`" - "`feeAdjustment`" - "`invalidCoupon`" - "`lateShipmentCredit`" - "`malformedShippingAddress`" - "`merchantDidNotShipOnTime`" - "`noInventory`" - "`orderTimeout`" - "`other`" - "`paymentAbuse`" - "`paymentDeclined`" - "`priceAdjustment`" - "`priceError`" - "`productArrivedDamaged`" - "`productNotAsDescribed`" - "`promoReallocation`" - "`qualityNotAsExpected`" - "`returnRefundAbuse`" - "`shippingCostAdjustment`" - "`shippingPriceError`" - "`taxAdjustment`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`wrongProductShipped`" 1614 "reasonText": "A String", # The explanation of the reason. 1615 }, 1616 ], 1617 "shipments": [ # Shipments of the order. 1618 { 1619 "carrier": "A String", # The carrier handling the shipment. For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. *Note:* You can also use unsupported carriers, but emails to customers will not include the carrier name or tracking URL, and there will be no automatic order status updates. Supported carriers for US are: - "`ups`" (United Parcel Service) *automatic status updates* - "`usps`" (United States Postal Service) *automatic status updates* - "`fedex`" (FedEx) *automatic status updates * - "`dhl`" (DHL eCommerce) *automatic status updates* (US only) - "`ontrac`" (OnTrac) *automatic status updates * - "`dhl express`" (DHL Express) - "`deliv`" (Deliv) - "`dynamex`" (TForce) - "`lasership`" (LaserShip) - "`mpx`" (Military Parcel Xpress) - "`uds`" (United Delivery Service) - "`efw`" (Estes Forwarding Worldwide) - "`jd logistics`" (JD Logistics) - "`yunexpress`" (YunExpress) - "`china post`" (China Post) - "`china ems`" (China Post Express Mail Service) - "`singapore post`" (Singapore Post) - "`pos malaysia`" (Pos Malaysia) - "`postnl`" (PostNL) - "`ptt`" (PTT Turkish Post) - "`eub`" (ePacket) - "`chukou1`" (Chukou1 Logistics) - "`bestex`" (Best Express) - "`canada post`" (Canada Post) - "`purolator`" (Purolator) - "`canpar`" (Canpar) - "`india post`" (India Post) - "`blue dart`" (Blue Dart) - "`delhivery`" (Delhivery) - "`dtdc`" (DTDC) - "`tpc india`" (TPC India) - "`lso`" (Lone Star Overnight) - "`tww`" (Team Worldwide) Supported carriers for FR are: - "`la poste`" (La Poste) *automatic status updates * - "`colissimo`" (Colissimo by La Poste) *automatic status updates* - "`ups`" (United Parcel Service) *automatic status updates * - "`chronopost`" (Chronopost by La Poste) - "`gls`" (General Logistics Systems France) - "`dpd`" (DPD Group by GeoPost) - "`bpost`" (Belgian Post Group) - "`colis prive`" (Colis Privé) - "`boxtal`" (Boxtal) - "`geodis`" (GEODIS) - "`tnt`" (TNT) - "`db schenker`" (DB Schenker) - "`aramex`" (Aramex) 1620 "creationDate": "A String", # Date on which the shipment has been created, in ISO 8601 format. 1621 "deliveryDate": "A String", # Date on which the shipment has been delivered, in ISO 8601 format. Present only if `status` is `delivered` 1622 "id": "A String", # The ID of the shipment. 1623 "lineItems": [ # The line items that are shipped. 1624 { 1625 "lineItemId": "A String", # The ID of the line item that is shipped. This value is assigned by Google when an order is created. Either lineItemId or productId is required. 1626 "productId": "A String", # The ID of the product to ship. This is the REST ID used in the products service. Either lineItemId or productId is required. 1627 "quantity": 42, # The quantity that is shipped. 1628 }, 1629 ], 1630 "scheduledDeliveryDetails": { # Delivery details of the shipment if scheduling is needed. 1631 "carrierPhoneNumber": "A String", # The phone number of the carrier fulfilling the delivery. The phone number is formatted as the international notation in ITU-T Recommendation E.123 (e.g., "+41 44 668 1800"). 1632 "scheduledDate": "A String", # The date a shipment is scheduled for delivery, in ISO 8601 format. 1633 }, 1634 "shipmentGroupId": "A String", # The shipment group ID of the shipment. This is set in shiplineitems request. 1635 "status": "A String", # The status of the shipment. Acceptable values are: - "`delivered`" - "`readyForPickup`" - "`shipped`" - "`undeliverable`" 1636 "trackingId": "A String", # The tracking ID for the shipment. 1637 }, 1638 ], 1639 "shippingCost": { # The total cost of shipping for all items. 1640 "currency": "A String", # The currency of the price. 1641 "value": "A String", # The price represented as a number. 1642 }, 1643 "shippingCostTax": { # The tax for the total shipping cost. 1644 "currency": "A String", # The currency of the price. 1645 "value": "A String", # The price represented as a number. 1646 }, 1647 "status": "A String", # The status of the order. Acceptable values are: - "`canceled`" - "`delivered`" - "`inProgress`" - "`partiallyDelivered`" - "`partiallyReturned`" - "`partiallyShipped`" - "`pendingShipment`" - "`returned`" - "`shipped`" 1648 "taxCollector": "A String", # The party responsible for collecting and remitting taxes. Acceptable values are: - "`marketplaceFacilitator`" - "`merchant`" 1649 }, 1650 ], 1651}</pre> 1652</div> 1653 1654<div class="method"> 1655 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 1656 <pre>Retrieves the next page of results. 1657 1658Args: 1659 previous_request: The request for the previous page. (required) 1660 previous_response: The response from the request for the previous page. (required) 1661 1662Returns: 1663 A request object that you can call 'execute()' on to request the next 1664 page. Returns None if there are no more items in the collection. 1665 </pre> 1666</div> 1667 1668<div class="method"> 1669 <code class="details" id="refunditem">refunditem(merchantId, orderId, body=None, x__xgafv=None)</code> 1670 <pre>Issues a partial or total refund for items and shipment. 1671 1672Args: 1673 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1674 orderId: string, The ID of the order to refund. (required) 1675 body: object, The request body. 1676 The object takes the form of: 1677 1678{ 1679 "items": [ # The items that are refunded. Either Item or Shipping must be provided in the request. 1680 { 1681 "amount": { # The total amount that is refunded. (e.g. refunding $5 each for 2 products should be done by setting quantity to 2 and amount to 10$) In case of multiple refunds, this should be the amount you currently want to refund to the customer. 1682 "priceAmount": { # The pre-tax or post-tax price depends on the location of the order. - For countries (e.g. US) where price attribute excludes tax, this field corresponds to the pre-tax value. - For coutries (e.g. France) where price attribute includes tax, this field corresponds to the post-tax value . 1683 "currency": "A String", # The currency of the price. 1684 "value": "A String", # The price represented as a number. 1685 }, 1686 "taxAmount": { # Tax value, present only for countries where price attribute excludes tax (e.g. US). No tax is referenced as 0 value with the corresponding `currency`. 1687 "currency": "A String", # The currency of the price. 1688 "value": "A String", # The price represented as a number. 1689 }, 1690 }, 1691 "fullRefund": True or False, # If true, the full item will be refunded. If this is true, amount should not be provided and will be ignored. 1692 "lineItemId": "A String", # The ID of the line item. Either lineItemId or productId is required. 1693 "productId": "A String", # The ID of the product. This is the REST ID used in the products service. Either lineItemId or productId is required. 1694 "quantity": 42, # The number of products that are refunded. 1695 }, 1696 ], 1697 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1698 "reason": "A String", # The reason for the refund. Acceptable values are: - "`shippingCostAdjustment`" - "`priceAdjustment`" - "`taxAdjustment`" - "`feeAdjustment`" - "`courtesyAdjustment`" - "`adjustment`" - "`customerCancelled`" - "`noInventory`" - "`productNotAsDescribed`" - "`undeliverableShippingAddress`" - "`wrongProductShipped`" - "`lateShipmentCredit`" - "`deliveredLateByCarrier`" - "`productArrivedDamaged`" 1699 "reasonText": "A String", # The explanation of the reason. 1700 "shipping": { # The refund on shipping. Optional, but either Item or Shipping must be provided in the request. 1701 "amount": { # The amount that is refunded. If this is not the first refund for the shipment, this should be the newly refunded amount. 1702 "currency": "A String", # The currency of the price. 1703 "value": "A String", # The price represented as a number. 1704 }, 1705 "fullRefund": True or False, # If set to true, all shipping costs for the order will be refunded. If this is true, amount should not be provided and will be ignored. If set to false, submit the amount of the partial shipping refund, excluding the shipping tax. The shipping tax is calculated and handled on Google's side. 1706 }, 1707} 1708 1709 x__xgafv: string, V1 error format. 1710 Allowed values 1711 1 - v1 error format 1712 2 - v2 error format 1713 1714Returns: 1715 An object of the form: 1716 1717 { 1718 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 1719 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersRefundItemResponse`". 1720}</pre> 1721</div> 1722 1723<div class="method"> 1724 <code class="details" id="refundorder">refundorder(merchantId, orderId, body=None, x__xgafv=None)</code> 1725 <pre>Issues a partial or total refund for an order. 1726 1727Args: 1728 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1729 orderId: string, The ID of the order to refund. (required) 1730 body: object, The request body. 1731 The object takes the form of: 1732 1733{ 1734 "amount": { # The amount that is refunded. If this is not the first refund for the order, this should be the newly refunded amount. 1735 "priceAmount": { # The pre-tax or post-tax price depends on the location of the order. - For countries (e.g. US) where price attribute excludes tax, this field corresponds to the pre-tax value. - For coutries (e.g. France) where price attribute includes tax, this field corresponds to the post-tax value . 1736 "currency": "A String", # The currency of the price. 1737 "value": "A String", # The price represented as a number. 1738 }, 1739 "taxAmount": { # Tax value, present only for countries where price attribute excludes tax (e.g. US). No tax is referenced as 0 value with the corresponding `currency`. 1740 "currency": "A String", # The currency of the price. 1741 "value": "A String", # The price represented as a number. 1742 }, 1743 }, 1744 "fullRefund": True or False, # If true, the full order will be refunded, including shipping. If this is true, amount should not be provided and will be ignored. 1745 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1746 "reason": "A String", # The reason for the refund. Acceptable values are: - "`courtesyAdjustment`" - "`other`" 1747 "reasonText": "A String", # The explanation of the reason. 1748} 1749 1750 x__xgafv: string, V1 error format. 1751 Allowed values 1752 1 - v1 error format 1753 2 - v2 error format 1754 1755Returns: 1756 An object of the form: 1757 1758 { 1759 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 1760 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersRefundOrderResponse`". 1761}</pre> 1762</div> 1763 1764<div class="method"> 1765 <code class="details" id="rejectreturnlineitem">rejectreturnlineitem(merchantId, orderId, body=None, x__xgafv=None)</code> 1766 <pre>Rejects return on an line item. 1767 1768Args: 1769 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1770 orderId: string, The ID of the order. (required) 1771 body: object, The request body. 1772 The object takes the form of: 1773 1774{ 1775 "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. 1776 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1777 "productId": "A String", # The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required. 1778 "quantity": 42, # The quantity to return and refund. 1779 "reason": "A String", # The reason for the return. Acceptable values are: - "`damagedOrUsed`" - "`missingComponent`" - "`notEligible`" - "`other`" - "`outOfReturnWindow`" 1780 "reasonText": "A String", # The explanation of the reason. 1781} 1782 1783 x__xgafv: string, V1 error format. 1784 Allowed values 1785 1 - v1 error format 1786 2 - v2 error format 1787 1788Returns: 1789 An object of the form: 1790 1791 { 1792 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 1793 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersRejectReturnLineItemResponse`". 1794}</pre> 1795</div> 1796 1797<div class="method"> 1798 <code class="details" id="returnrefundlineitem">returnrefundlineitem(merchantId, orderId, body=None, x__xgafv=None)</code> 1799 <pre>Returns and refunds a line item. Note that this method can only be called on fully shipped orders. Please also note that the Orderreturns API is the preferred way to handle returns after you receive a return from a customer. You can use Orderreturns.list or Orderreturns.get to search for the return, and then use Orderreturns.processreturn to issue the refund. If the return cannot be found, then we recommend using this API to issue a refund. 1800 1801Args: 1802 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1803 orderId: string, The ID of the order. (required) 1804 body: object, The request body. 1805 The object takes the form of: 1806 1807{ 1808 "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. 1809 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1810 "priceAmount": { # The amount to be refunded. This may be pre-tax or post-tax depending on the location of the order. If omitted, refundless return is assumed. 1811 "currency": "A String", # The currency of the price. 1812 "value": "A String", # The price represented as a number. 1813 }, 1814 "productId": "A String", # The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required. 1815 "quantity": 42, # The quantity to return and refund. Quantity is required. 1816 "reason": "A String", # The reason for the return. Acceptable values are: - "`customerDiscretionaryReturn`" - "`customerInitiatedMerchantCancel`" - "`deliveredTooLate`" - "`expiredItem`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`other`" - "`productArrivedDamaged`" - "`productNotAsDescribed`" - "`qualityNotAsExpected`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`wrongProductShipped`" 1817 "reasonText": "A String", # The explanation of the reason. 1818 "taxAmount": { # The amount of tax to be refunded. Optional, but if filled, then priceAmount must be set. Calculated automatically if not provided. 1819 "currency": "A String", # The currency of the price. 1820 "value": "A String", # The price represented as a number. 1821 }, 1822} 1823 1824 x__xgafv: string, V1 error format. 1825 Allowed values 1826 1 - v1 error format 1827 2 - v2 error format 1828 1829Returns: 1830 An object of the form: 1831 1832 { 1833 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 1834 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersReturnRefundLineItemResponse`". 1835}</pre> 1836</div> 1837 1838<div class="method"> 1839 <code class="details" id="setlineitemmetadata">setlineitemmetadata(merchantId, orderId, body=None, x__xgafv=None)</code> 1840 <pre>Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided via other methods. Submitted key-value pairs can be retrieved as part of the orders resource. 1841 1842Args: 1843 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1844 orderId: string, The ID of the order. (required) 1845 body: object, The request body. 1846 The object takes the form of: 1847 1848{ 1849 "annotations": [ 1850 { 1851 "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. 1852 "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. 1853 }, 1854 ], 1855 "lineItemId": "A String", # The ID of the line item to set metadata. Either lineItemId or productId is required. 1856 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1857 "productId": "A String", # The ID of the product to set metadata. This is the REST ID used in the products service. Either lineItemId or productId is required. 1858} 1859 1860 x__xgafv: string, V1 error format. 1861 Allowed values 1862 1 - v1 error format 1863 2 - v2 error format 1864 1865Returns: 1866 An object of the form: 1867 1868 { 1869 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 1870 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersSetLineItemMetadataResponse`". 1871}</pre> 1872</div> 1873 1874<div class="method"> 1875 <code class="details" id="shiplineitems">shiplineitems(merchantId, orderId, body=None, x__xgafv=None)</code> 1876 <pre>Marks line item(s) as shipped. 1877 1878Args: 1879 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1880 orderId: string, The ID of the order. (required) 1881 body: object, The request body. 1882 The object takes the form of: 1883 1884{ 1885 "lineItems": [ # Line items to ship. 1886 { 1887 "lineItemId": "A String", # The ID of the line item that is shipped. This value is assigned by Google when an order is created. Either lineItemId or productId is required. 1888 "productId": "A String", # The ID of the product to ship. This is the REST ID used in the products service. Either lineItemId or productId is required. 1889 "quantity": 42, # The quantity that is shipped. 1890 }, 1891 ], 1892 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1893 "shipmentGroupId": "A String", # ID of the shipment group. Required for orders that use the orderinvoices service. 1894 "shipmentInfos": [ # Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs). 1895 { 1896 "carrier": "A String", # The carrier handling the shipment. See `shipments[].carrier` in the Orders resource representation for a list of acceptable values. 1897 "shipmentId": "A String", # Required. The ID of the shipment. This is assigned by the merchant and is unique to each shipment. 1898 "trackingId": "A String", # The tracking ID for the shipment. 1899 }, 1900 ], 1901} 1902 1903 x__xgafv: string, V1 error format. 1904 Allowed values 1905 1 - v1 error format 1906 2 - v2 error format 1907 1908Returns: 1909 An object of the form: 1910 1911 { 1912 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 1913 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersShipLineItemsResponse`". 1914}</pre> 1915</div> 1916 1917<div class="method"> 1918 <code class="details" id="updatelineitemshippingdetails">updatelineitemshippingdetails(merchantId, orderId, body=None, x__xgafv=None)</code> 1919 <pre>Updates ship by and delivery by dates for a line item. 1920 1921Args: 1922 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1923 orderId: string, The ID of the order. (required) 1924 body: object, The request body. 1925 The object takes the form of: 1926 1927{ 1928 "deliverByDate": "A String", # Updated delivery by date, in ISO 8601 format. If not specified only ship by date is updated. Provided date should be within 1 year timeframe and can not be a date in the past. 1929 "lineItemId": "A String", # The ID of the line item to set metadata. Either lineItemId or productId is required. 1930 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1931 "productId": "A String", # The ID of the product to set metadata. This is the REST ID used in the products service. Either lineItemId or productId is required. 1932 "shipByDate": "A String", # Updated ship by date, in ISO 8601 format. If not specified only deliver by date is updated. Provided date should be within 1 year timeframe and can not be a date in the past. 1933} 1934 1935 x__xgafv: string, V1 error format. 1936 Allowed values 1937 1 - v1 error format 1938 2 - v2 error format 1939 1940Returns: 1941 An object of the form: 1942 1943 { 1944 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 1945 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersUpdateLineItemShippingDetailsResponse`". 1946}</pre> 1947</div> 1948 1949<div class="method"> 1950 <code class="details" id="updatemerchantorderid">updatemerchantorderid(merchantId, orderId, body=None, x__xgafv=None)</code> 1951 <pre>Updates the merchant order ID for a given order. 1952 1953Args: 1954 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1955 orderId: string, The ID of the order. (required) 1956 body: object, The request body. 1957 The object takes the form of: 1958 1959{ 1960 "merchantOrderId": "A String", # The merchant order id to be assigned to the order. Must be unique per merchant. 1961 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1962} 1963 1964 x__xgafv: string, V1 error format. 1965 Allowed values 1966 1 - v1 error format 1967 2 - v2 error format 1968 1969Returns: 1970 An object of the form: 1971 1972 { 1973 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 1974 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersUpdateMerchantOrderIdResponse`". 1975}</pre> 1976</div> 1977 1978<div class="method"> 1979 <code class="details" id="updateshipment">updateshipment(merchantId, orderId, body=None, x__xgafv=None)</code> 1980 <pre>Updates a shipment's status, carrier, and/or tracking ID. 1981 1982Args: 1983 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1984 orderId: string, The ID of the order. (required) 1985 body: object, The request body. 1986 The object takes the form of: 1987 1988{ 1989 "carrier": "A String", # The carrier handling the shipment. Not updated if missing. See `shipments[].carrier` in the Orders resource representation for a list of acceptable values. 1990 "deliveryDate": "A String", # Date on which the shipment has been delivered, in ISO 8601 format. Optional and can be provided only if `status` is `delivered`. 1991 "lastPickupDate": "A String", # Date after which the pickup will expire, in ISO 8601 format. Required only when order is buy-online-pickup-in-store(BOPIS) and `status` is `ready for pickup`. 1992 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1993 "readyPickupDate": "A String", # Date on which the shipment has been ready for pickup, in ISO 8601 format. Optional and can be provided only if `status` is `ready for pickup`. 1994 "scheduledDeliveryDetails": { # ScheduledDeliveryDetails used to update the scheduled delivery order. # Delivery details of the shipment if scheduling is needed. 1995 "carrierPhoneNumber": "A String", # The phone number of the carrier fulfilling the delivery. The phone number should be formatted as the international notation in 1996 "scheduledDate": "A String", # The date a shipment is scheduled for delivery, in ISO 8601 format. 1997 }, 1998 "shipmentId": "A String", # The ID of the shipment. 1999 "status": "A String", # New status for the shipment. Not updated if missing. Acceptable values are: - "`delivered`" - "`undeliverable`" - "`readyForPickup`" 2000 "trackingId": "A String", # The tracking ID for the shipment. Not updated if missing. 2001 "undeliveredDate": "A String", # Date on which the shipment has been undeliverable, in ISO 8601 format. Optional and can be provided only if `status` is `undeliverable`. 2002} 2003 2004 x__xgafv: string, V1 error format. 2005 Allowed values 2006 1 - v1 error format 2007 2 - v2 error format 2008 2009Returns: 2010 An object of the form: 2011 2012 { 2013 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 2014 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "`content#ordersUpdateShipmentResponse`". 2015}</pre> 2016</div> 2017 2018</body></html>