1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="content_v2.html">Content API for Shopping</a> . <a href="content_v2.orders.html">orders</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#acknowledge">acknowledge(merchantId, orderId, body)</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)</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)</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)</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)</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="#createtestorder">createtestorder(merchantId, body)</a></code></p> 94<p class="firstline">Sandbox only. Creates a test order.</p> 95<p class="toc_element"> 96 <code><a href="#createtestreturn">createtestreturn(merchantId, orderId, body)</a></code></p> 97<p class="firstline">Sandbox only. Creates a test return.</p> 98<p class="toc_element"> 99 <code><a href="#custombatch">custombatch(body)</a></code></p> 100<p class="firstline">Retrieves or modifies multiple orders in a single request.</p> 101<p class="toc_element"> 102 <code><a href="#get">get(merchantId, orderId)</a></code></p> 103<p class="firstline">Retrieves an order from your Merchant Center account.</p> 104<p class="toc_element"> 105 <code><a href="#getbymerchantorderid">getbymerchantorderid(merchantId, merchantOrderId)</a></code></p> 106<p class="firstline">Retrieves an order using merchant order ID.</p> 107<p class="toc_element"> 108 <code><a href="#gettestordertemplate">gettestordertemplate(merchantId, templateName, country=None)</a></code></p> 109<p class="firstline">Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.</p> 110<p class="toc_element"> 111 <code><a href="#instorerefundlineitem">instorerefundlineitem(merchantId, orderId, body)</a></code></p> 112<p class="firstline">Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store).</p> 113<p class="toc_element"> 114 <code><a href="#list">list(merchantId, orderBy=None, pageToken=None, placedDateEnd=None, acknowledged=None, maxResults=None, placedDateStart=None, statuses=None)</a></code></p> 115<p class="firstline">Lists the orders in your Merchant Center account.</p> 116<p class="toc_element"> 117 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 118<p class="firstline">Retrieves the next page of results.</p> 119<p class="toc_element"> 120 <code><a href="#refund">refund(merchantId, orderId, body)</a></code></p> 121<p class="firstline">Deprecated, please use returnRefundLineItem instead.</p> 122<p class="toc_element"> 123 <code><a href="#rejectreturnlineitem">rejectreturnlineitem(merchantId, orderId, body)</a></code></p> 124<p class="firstline">Rejects return on an line item.</p> 125<p class="toc_element"> 126 <code><a href="#returnlineitem">returnlineitem(merchantId, orderId, body)</a></code></p> 127<p class="firstline">Returns a line item.</p> 128<p class="toc_element"> 129 <code><a href="#returnrefundlineitem">returnrefundlineitem(merchantId, orderId, body)</a></code></p> 130<p class="firstline">Returns and refunds a line item. Note that this method can only be called on fully shipped orders.</p> 131<p class="toc_element"> 132 <code><a href="#setlineitemmetadata">setlineitemmetadata(merchantId, orderId, body)</a></code></p> 133<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> 134<p class="toc_element"> 135 <code><a href="#shiplineitems">shiplineitems(merchantId, orderId, body)</a></code></p> 136<p class="firstline">Marks line item(s) as shipped.</p> 137<p class="toc_element"> 138 <code><a href="#updatelineitemshippingdetails">updatelineitemshippingdetails(merchantId, orderId, body)</a></code></p> 139<p class="firstline">Updates ship by and delivery by dates for a line item.</p> 140<p class="toc_element"> 141 <code><a href="#updatemerchantorderid">updatemerchantorderid(merchantId, orderId, body)</a></code></p> 142<p class="firstline">Updates the merchant order ID for a given order.</p> 143<p class="toc_element"> 144 <code><a href="#updateshipment">updateshipment(merchantId, orderId, body)</a></code></p> 145<p class="firstline">Updates a shipment's status, carrier, and/or tracking ID.</p> 146<h3>Method Details</h3> 147<div class="method"> 148 <code class="details" id="acknowledge">acknowledge(merchantId, orderId, body)</code> 149 <pre>Marks an order as acknowledged. 150 151Args: 152 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 153 orderId: string, The ID of the order. (required) 154 body: object, The request body. (required) 155 The object takes the form of: 156 157{ 158 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 159 } 160 161 162Returns: 163 An object of the form: 164 165 { 166 "kind": "content#ordersAcknowledgeResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersAcknowledgeResponse". 167 "executionStatus": "A String", # The status of the execution. 168 }</pre> 169</div> 170 171<div class="method"> 172 <code class="details" id="advancetestorder">advancetestorder(merchantId, orderId)</code> 173 <pre>Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". 174 175Args: 176 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 177 orderId: string, The ID of the test order to modify. (required) 178 179Returns: 180 An object of the form: 181 182 { 183 "kind": "content#ordersAdvanceTestOrderResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersAdvanceTestOrderResponse". 184 }</pre> 185</div> 186 187<div class="method"> 188 <code class="details" id="cancel">cancel(merchantId, orderId, body)</code> 189 <pre>Cancels all line items in an order, making a full refund. 190 191Args: 192 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 193 orderId: string, The ID of the order to cancel. (required) 194 body: object, The request body. (required) 195 The object takes the form of: 196 197{ 198 "reason": "A String", # The reason for the cancellation. 199 "reasonText": "A String", # The explanation of the reason. 200 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 201 } 202 203 204Returns: 205 An object of the form: 206 207 { 208 "kind": "content#ordersCancelResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCancelResponse". 209 "executionStatus": "A String", # The status of the execution. 210 }</pre> 211</div> 212 213<div class="method"> 214 <code class="details" id="cancellineitem">cancellineitem(merchantId, orderId, body)</code> 215 <pre>Cancels a line item, making a full refund. 216 217Args: 218 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 219 orderId: string, The ID of the order. (required) 220 body: object, The request body. (required) 221 The object takes the form of: 222 223{ 224 "quantity": 42, # The quantity to cancel. 225 "amountPretax": { # Amount to refund for the cancelation. Optional. If not set, Google will calculate the default based on the price and tax of the items involved. The amount must not be larger than the net amount left on the order. 226 "currency": "A String", # The currency of the price. 227 "value": "A String", # The price represented as a number. 228 }, 229 "amount": { # Deprecated. Please use amountPretax and amountTax instead. 230 "currency": "A String", # The currency of the price. 231 "value": "A String", # The price represented as a number. 232 }, 233 "reasonText": "A String", # The explanation of the reason. 234 "lineItemId": "A String", # The ID of the line item to cancel. Either lineItemId or productId is required. 235 "reason": "A String", # The reason for the cancellation. 236 "amountTax": { # Tax amount that corresponds to cancellation amount in amountPretax. Optional, but if filled, then amountPretax must be set. Calculated automatically if not provided. 237 "currency": "A String", # The currency of the price. 238 "value": "A String", # The price represented as a number. 239 }, 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 } 243 244 245Returns: 246 An object of the form: 247 248 { 249 "kind": "content#ordersCancelLineItemResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCancelLineItemResponse". 250 "executionStatus": "A String", # The status of the execution. 251 }</pre> 252</div> 253 254<div class="method"> 255 <code class="details" id="canceltestorderbycustomer">canceltestorderbycustomer(merchantId, orderId, body)</code> 256 <pre>Sandbox only. Cancels a test order for customer-initiated cancellation. 257 258Args: 259 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 260 orderId: string, The ID of the test order to cancel. (required) 261 body: object, The request body. (required) 262 The object takes the form of: 263 264{ 265 "reason": "A String", # The reason for the cancellation. 266 } 267 268 269Returns: 270 An object of the form: 271 272 { 273 "kind": "content#ordersCancelTestOrderByCustomerResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCancelTestOrderByCustomerResponse". 274 }</pre> 275</div> 276 277<div class="method"> 278 <code class="details" id="createtestorder">createtestorder(merchantId, body)</code> 279 <pre>Sandbox only. Creates a test order. 280 281Args: 282 merchantId: string, The ID of the account that should manage the order. This cannot be a multi-client account. (required) 283 body: object, The request body. (required) 284 The object takes the form of: 285 286{ 287 "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. 288 # 289 # Acceptable values are: 290 # - "US" 291 # - "FR" Defaults to US. 292 "testOrder": { # The test order to create. 293 "customer": { # The details of the customer who placed the order. 294 "explicitMarketingPreference": True or False, # Deprecated. Please use marketingRightsInfo instead. 295 "fullName": "A String", # Full name of the customer. 296 "email": "A String", # Email address of the customer. 297 "marketingRightsInfo": { # Customer's marketing preferences. 298 "explicitMarketingPreference": "A String", # Last know user use selection regards marketing preferences. In certain cases selection might not be known, so this field would be empty. 299 "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. 300 }, 301 }, 302 "promotions": [ # Deprecated. Ignored if provided. 303 { 304 "benefits": [ 305 { 306 "offerIds": [ # The OfferId(s) that were purchased in this order and map to this specific benefit of the promotion. 307 "A String", 308 ], 309 "discount": { # The discount in the order price when the promotion is applied. 310 "currency": "A String", # The currency of the price. 311 "value": "A String", # The price represented as a number. 312 }, 313 "type": "A String", # Describes whether the promotion applies to products (e.g. 20% off) or to shipping (e.g. Free Shipping). 314 "taxImpact": { # The impact on tax when the promotion is applied. 315 "currency": "A String", # The currency of the price. 316 "value": "A String", # The price represented as a number. 317 }, 318 "subType": "A String", # Further describes the benefit of the promotion. Note that we will expand on this enumeration as we support new promotion sub-types. 319 }, 320 ], 321 "longTitle": "A String", # The full title of the promotion. 322 "genericRedemptionCode": "A String", # Optional. The text code that corresponds to the promotion when applied on the retailer?s website. 323 "redemptionChannel": "A String", # Indicates that the promotion is valid online. 324 "productApplicability": "A String", # Whether the promotion is applicable to all products or only specific products. 325 "effectiveDates": "A String", # The date and time frame when the promotion is active and ready for validation review. Note that the promotion live time may be delayed for a few hours due to the validation review. 326 # Start date and end date are separated by a forward slash (/). The start date is specified by the format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when the sale starts (in Greenwich Mean Time, GMT), followed by an expression of the time zone for the sale. The end date is in the same format. 327 "id": "A String", # The unique ID of the promotion. 328 }, 329 ], 330 "kind": "content#testOrder", # Identifies what kind of resource this is. Value: the fixed string "content#testOrder". 331 "shippingCostTax": { # Deprecated. Ignored if provided. 332 "currency": "A String", # The currency of the price. 333 "value": "A String", # The price represented as a number. 334 }, 335 "notificationMode": "A String", # Determines if test order must be pulled by merchant or pushed to merchant via push integration. 336 "predefinedDeliveryAddress": "A String", # Identifier of one of the predefined delivery addresses for the delivery. 337 "shippingCost": { # The price of shipping for all items. Shipping tax is automatically calculated for MFL orders. For non-MFL orders, tax settings from Merchant Center are applied. Note that shipping is not taxed in certain states. 338 "currency": "A String", # The currency of the price. 339 "value": "A String", # The price represented as a number. 340 }, 341 "shippingOption": "A String", # The requested shipping option. 342 "enableOrderinvoices": True or False, # Whether the orderinvoices service should support this order. 343 "lineItems": [ # Line items that are ordered. At least one line item must be provided. 344 { 345 "returnInfo": { # Details of the return policy for the line item. 346 "policyUrl": "A String", # URL of the item return policy. 347 "isReturnable": True or False, # Whether the item is returnable. 348 "daysToReturn": 42, # How many days later the item can be returned. 349 }, 350 "product": { # Product data from the time of the order placement. 351 "targetCountry": "A String", # The CLDR territory code of the target country of the product. 352 "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. 353 "title": "A String", # The title of the product. 354 "mpn": "A String", # Manufacturer Part Number (MPN) of the item. Optional. 355 "variantAttributes": [ # Variant attributes for the item. Optional. 356 { 357 "dimension": "A String", # The dimension of the variant. 358 "value": "A String", # The value for the dimension. 359 }, 360 ], 361 "brand": "A String", # Brand of the item. 362 "itemGroupId": "A String", # Shared identifier for all variants of the same product. Optional. 363 "offerId": "A String", # An identifier of the item. 364 "imageLink": "A String", # URL of an image of the item. 365 "gtin": "A String", # Global Trade Item Number (GTIN) of the item. Optional. 366 "channel": "A String", # Deprecated. 367 "fees": [ # Fees for the item. Optional. 368 { 369 "amount": { # Amount of the fee. 370 "currency": "A String", # The currency of the price. 371 "value": "A String", # The price represented as a number. 372 }, 373 "name": "A String", # Name of the fee. 374 }, 375 ], 376 "price": { # The price for the product. Tax is automatically calculated for MFL orders. For non-MFL orders, tax settings from Merchant Center are applied. 377 "currency": "A String", # The currency of the price. 378 "value": "A String", # The price represented as a number. 379 }, 380 "condition": "A String", # Condition or state of the item. 381 }, 382 "unitTax": { # Deprecated. Ignored if provided. 383 "currency": "A String", # The currency of the price. 384 "value": "A String", # The price represented as a number. 385 }, 386 "quantityOrdered": 42, # Number of items ordered. 387 "shippingDetails": { # Details of the requested shipping for the line item. 388 "deliverByDate": "A String", # The delivery by date, in ISO 8601 format. 389 "method": { # Details of the shipping method. 390 "minDaysInTransit": 42, # Minimum transit time. 391 "carrier": "A String", # The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values. 392 "methodName": "A String", # The name of the shipping method. 393 "maxDaysInTransit": 42, # Maximum transit time. 394 }, 395 "shipByDate": "A String", # The ship by date, in ISO 8601 format. 396 }, 397 }, 398 ], 399 "paymentMethod": { # The details of the payment method. 400 "expirationMonth": 42, # The card expiration month (January = 1, February = 2 etc.). 401 "type": "A String", # The type of instrument. Note that real orders might have different values than the four values accepted by createTestOrder. 402 "expirationYear": 42, # The card expiration year (4-digit, e.g. 2015). 403 "lastFourDigits": "A String", # The last four digits of the card number. 404 "predefinedBillingAddress": "A String", # The billing address. 405 }, 406 }, 407 "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. 408 } 409 410 411Returns: 412 An object of the form: 413 414 { 415 "orderId": "A String", # The ID of the newly created test order. 416 "kind": "content#ordersCreateTestOrderResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCreateTestOrderResponse". 417 }</pre> 418</div> 419 420<div class="method"> 421 <code class="details" id="createtestreturn">createtestreturn(merchantId, orderId, body)</code> 422 <pre>Sandbox only. Creates a test return. 423 424Args: 425 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 426 orderId: string, The ID of the order. (required) 427 body: object, The request body. (required) 428 The object takes the form of: 429 430{ 431 "items": [ # Returned items. 432 { 433 "lineItemId": "A String", # The ID of the line item to return. 434 "quantity": 42, # Quantity that is returned. 435 }, 436 ], 437 } 438 439 440Returns: 441 An object of the form: 442 443 { 444 "returnId": "A String", # The ID of the newly created test order return. 445 "kind": "content#ordersCreateTestReturnResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCreateTestReturnResponse". 446 }</pre> 447</div> 448 449<div class="method"> 450 <code class="details" id="custombatch">custombatch(body)</code> 451 <pre>Retrieves or modifies multiple orders in a single request. 452 453Args: 454 body: object, The request body. (required) 455 The object takes the form of: 456 457{ 458 "entries": [ # The request entries to be processed in the batch. 459 { 460 "orderId": "A String", # The ID of the order. Required for all methods beside getByMerchantOrderId. 461 "merchantOrderId": "A String", # The merchant order ID. Required for updateMerchantOrderId and getByMerchantOrderId methods. 462 "returnRefundLineItem": { # Required for returnRefundLineItem method. 463 "amountPretax": { # The amount that is refunded. If omitted, refundless return is assumed (same as calling returnLineItem method). 464 "currency": "A String", # The currency of the price. 465 "value": "A String", # The price represented as a number. 466 }, 467 "reason": "A String", # The reason for the return. 468 "reasonText": "A String", # The explanation of the reason. 469 "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. 470 "amountTax": { # Tax amount that corresponds to refund amount in amountPretax. Optional, but if filled, then amountPretax must be set. Calculated automatically if not provided. 471 "currency": "A String", # The currency of the price. 472 "value": "A String", # The price represented as a number. 473 }, 474 "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. 475 "quantity": 42, # The quantity to return and refund. 476 }, 477 "rejectReturnLineItem": { # Required for rejectReturnLineItem method. 478 "reason": "A String", # The reason for the return. 479 "quantity": 42, # The quantity to return and refund. 480 "reasonText": "A String", # The explanation of the reason. 481 "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. 482 "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. 483 }, 484 "updateLineItemShippingDetails": { # Required for updateLineItemShippingDate method. 485 "deliverByDate": "A String", # Updated delivery by date, in ISO 8601 format. If not specified only ship by date is updated. 486 # 487 # Provided date should be within 1 year timeframe and can not be a date in the past. 488 "shipByDate": "A String", # Updated ship by date, in ISO 8601 format. If not specified only deliver by date is updated. 489 # 490 # Provided date should be within 1 year timeframe and can not be a date in the past. 491 "lineItemId": "A String", # The ID of the line item to set metadata. Either lineItemId or productId is required. 492 "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. 493 }, 494 "inStoreRefundLineItem": { # Required for inStoreReturnLineItem method. 495 "amountPretax": { # The amount that is refunded. Required. 496 "currency": "A String", # The currency of the price. 497 "value": "A String", # The price represented as a number. 498 }, 499 "reason": "A String", # The reason for the return. 500 "reasonText": "A String", # The explanation of the reason. 501 "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. 502 "amountTax": { # Tax amount that correspond to refund amount in amountPretax. Required. 503 "currency": "A String", # The currency of the price. 504 "value": "A String", # The price represented as a number. 505 }, 506 "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. 507 "quantity": 42, # The quantity to return and refund. 508 }, 509 "shipLineItems": { # Required for shipLineItems method. 510 "shipmentGroupId": "A String", # ID of the shipment group. Required for orders that use the orderinvoices service. 511 "shipmentInfos": [ # Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs). 512 { 513 "carrier": "A String", # The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values. 514 "trackingId": "A String", # The tracking ID for the shipment. 515 "shipmentId": "A String", # The ID of the shipment. This is assigned by the merchant and is unique to each shipment. 516 }, 517 ], 518 "carrier": "A String", # Deprecated. Please use shipmentInfo instead. The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values. 519 "trackingId": "A String", # Deprecated. Please use shipmentInfo instead. The tracking ID for the shipment. 520 "shipmentId": "A String", # Deprecated. Please use shipmentInfo instead. The ID of the shipment. 521 "lineItems": [ # Line items to ship. 522 { 523 "quantity": 42, # The quantity that is shipped. 524 "lineItemId": "A String", # The ID of the line item that is shipped. Either lineItemId or productId is required. 525 "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. 526 }, 527 ], 528 }, 529 "updateShipment": { # Required for updateShipment method. 530 "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. 531 "status": "A String", # New status for the shipment. Not updated if missing. 532 "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. 533 "trackingId": "A String", # The tracking ID for the shipment. Not updated if missing. 534 "shipmentId": "A String", # The ID of the shipment. 535 }, 536 "setLineItemMetadata": { # Required for setLineItemMetadata method. 537 "annotations": [ 538 { 539 "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. 540 "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. 541 }, 542 ], 543 "lineItemId": "A String", # The ID of the line item to set metadata. Either lineItemId or productId is required. 544 "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. 545 }, 546 "method": "A String", # The method to apply. 547 "batchId": 42, # An entry ID, unique within the batch request. 548 "cancelLineItem": { # Required for cancelLineItem method. 549 "amountPretax": { # Amount to refund for the cancelation. Optional. If not set, Google will calculate the default based on the price and tax of the items involved. The amount must not be larger than the net amount left on the order. 550 "currency": "A String", # The currency of the price. 551 "value": "A String", # The price represented as a number. 552 }, 553 "amount": { # Deprecated. Please use amountPretax and amountTax instead. 554 "currency": "A String", # The currency of the price. 555 "value": "A String", # The price represented as a number. 556 }, 557 "reasonText": "A String", # The explanation of the reason. 558 "lineItemId": "A String", # The ID of the line item to cancel. Either lineItemId or productId is required. 559 "reason": "A String", # The reason for the cancellation. 560 "amountTax": { # Tax amount that corresponds to cancellation amount in amountPretax. Optional, but if filled, then amountPretax must be set. Calculated automatically if not provided. 561 "currency": "A String", # The currency of the price. 562 "value": "A String", # The price represented as a number. 563 }, 564 "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. 565 "quantity": 42, # The quantity to cancel. 566 }, 567 "refund": { # Required for refund method. 568 "reason": "A String", # The reason for the refund. 569 "amount": { # Deprecated. Please use amountPretax and amountTax instead. 570 "currency": "A String", # The currency of the price. 571 "value": "A String", # The price represented as a number. 572 }, 573 "reasonText": "A String", # The explanation of the reason. 574 "amountTax": { # Tax amount that corresponds to refund amount in amountPretax. Optional, but if filled, amountPretax must be set. Calculated automatically if not provided. 575 "currency": "A String", # The currency of the price. 576 "value": "A String", # The price represented as a number. 577 }, 578 "amountPretax": { # The amount that is refunded. Either amount or amountPretax should be filled. 579 "currency": "A String", # The currency of the price. 580 "value": "A String", # The price represented as a number. 581 }, 582 }, 583 "cancel": { # Required for cancel method. 584 "reason": "A String", # The reason for the cancellation. 585 "reasonText": "A String", # The explanation of the reason. 586 }, 587 "returnLineItem": { # Required for returnLineItem method. 588 "reason": "A String", # The reason for the return. 589 "quantity": 42, # The quantity to return. 590 "reasonText": "A String", # The explanation of the reason. 591 "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. 592 "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. 593 }, 594 "merchantId": "A String", # The ID of the managing account. 595 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. Required for all methods beside get and getByMerchantOrderId. 596 }, 597 ], 598 } 599 600 601Returns: 602 An object of the form: 603 604 { 605 "kind": "content#ordersCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCustomBatchResponse". 606 "entries": [ # The result of the execution of the batch requests. 607 { 608 "batchId": 42, # The ID of the request entry this entry responds to. 609 "kind": "content#ordersCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCustomBatchResponseEntry". 610 "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if and only if the request failed. 611 "message": "A String", # The message of the first error in errors. 612 "code": 42, # The HTTP status of the first error in errors. 613 "errors": [ # A list of errors. 614 { # An error returned by the API. 615 "reason": "A String", # The error code. 616 "domain": "A String", # The domain of the error. 617 "message": "A String", # A description of the error. 618 }, 619 ], 620 }, 621 "order": { # Order. All methods require the order manager role. # The retrieved order. Only defined if the method is get and if the request was successful. 622 "customer": { # The details of the customer who placed the order. 623 "explicitMarketingPreference": True or False, # Deprecated. Please use marketingRightsInfo instead. 624 "fullName": "A String", # Full name of the customer. 625 "email": "A String", # Deprecated. 626 "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. 627 "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. 628 "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. 629 "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. 630 }, 631 }, 632 "promotions": [ # The details of the merchant provided promotions applied to the order. More details about the program are here. 633 { 634 "benefits": [ 635 { 636 "offerIds": [ # The OfferId(s) that were purchased in this order and map to this specific benefit of the promotion. 637 "A String", 638 ], 639 "discount": { # The discount in the order price when the promotion is applied. 640 "currency": "A String", # The currency of the price. 641 "value": "A String", # The price represented as a number. 642 }, 643 "type": "A String", # Describes whether the promotion applies to products (e.g. 20% off) or to shipping (e.g. Free Shipping). 644 "taxImpact": { # The impact on tax when the promotion is applied. 645 "currency": "A String", # The currency of the price. 646 "value": "A String", # The price represented as a number. 647 }, 648 "subType": "A String", # Further describes the benefit of the promotion. Note that we will expand on this enumeration as we support new promotion sub-types. 649 }, 650 ], 651 "longTitle": "A String", # The full title of the promotion. 652 "genericRedemptionCode": "A String", # Optional. The text code that corresponds to the promotion when applied on the retailer?s website. 653 "redemptionChannel": "A String", # Indicates that the promotion is valid online. 654 "productApplicability": "A String", # Whether the promotion is applicable to all products or only specific products. 655 "effectiveDates": "A String", # The date and time frame when the promotion is active and ready for validation review. Note that the promotion live time may be delayed for a few hours due to the validation review. 656 # Start date and end date are separated by a forward slash (/). The start date is specified by the format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when the sale starts (in Greenwich Mean Time, GMT), followed by an expression of the time zone for the sale. The end date is in the same format. 657 "id": "A String", # The unique ID of the promotion. 658 }, 659 ], 660 "kind": "content#order", # Identifies what kind of resource this is. Value: the fixed string "content#order". 661 "shippingCostTax": { # The tax for the total shipping cost. 662 "currency": "A String", # The currency of the price. 663 "value": "A String", # The price represented as a number. 664 }, 665 "shipments": [ # Shipments of the order. 666 { 667 "status": "A String", # The status of the shipment. 668 "creationDate": "A String", # Date on which the shipment has been created, in ISO 8601 format. 669 "carrier": "A String", # The carrier handling the shipment. 670 # 671 # Acceptable values for US are: 672 # - "gsx" 673 # - "ups" 674 # - "usps" 675 # - "fedex" 676 # - "dhl" 677 # - "ecourier" 678 # - "cxt" 679 # - "google" 680 # - "ontrac" 681 # - "emsy" 682 # - "ont" 683 # - "deliv" 684 # - "dynamex" 685 # - "lasership" 686 # - "mpx" 687 # - "uds" 688 # - "efw" 689 # 690 # Acceptable values for FR are: 691 # - "colissimo" 692 # - "chronopost" 693 # - "gls" 694 # - "dpd" 695 # - "bpost" 696 "trackingId": "A String", # The tracking ID for the shipment. 697 "deliveryDate": "A String", # Date on which the shipment has been delivered, in ISO 8601 format. Present only if status is delivered 698 "lineItems": [ # The line items that are shipped. 699 { 700 "quantity": 42, # The quantity that is shipped. 701 "lineItemId": "A String", # The ID of the line item that is shipped. Either lineItemId or productId is required. 702 "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. 703 }, 704 ], 705 "id": "A String", # The ID of the shipment. 706 }, 707 ], 708 "refunds": [ # Refunds for the order. 709 { 710 "amount": { # The amount that is refunded. 711 "currency": "A String", # The currency of the price. 712 "value": "A String", # The price represented as a number. 713 }, 714 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 715 "reason": "A String", # The reason for the refund. 716 "actor": "A String", # The actor that created the refund. 717 "reasonText": "A String", # The explanation of the reason. 718 }, 719 ], 720 "paymentMethod": { # The details of the payment method. 721 "expirationMonth": 42, # The card expiration month (January = 1, February = 2 etc.). 722 "lastFourDigits": "A String", # The last four digits of the card number. 723 "expirationYear": 42, # The card expiration year (4-digit, e.g. 2015). 724 "phoneNumber": "A String", # The billing phone number. 725 "billingAddress": { # The billing address. 726 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 727 "country": "A String", # CLDR country code (e.g. "US"). 728 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: 729 # John Smith 730 # 1600 Amphitheatre Parkway 731 # Mountain View, CA, 94043 732 # United States 733 "A String", 734 ], 735 "streetAddress": [ # Street-level part of the address. 736 "A String", 737 ], 738 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 739 "recipientName": "A String", # Name of the recipient. 740 "isPostOfficeBox": True or False, # Whether the address is a post office box. 741 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 742 }, 743 "type": "A String", # The type of instrument. 744 # 745 # Acceptable values are: 746 # - "AMEX" 747 # - "DISCOVER" 748 # - "JCB" 749 # - "MASTERCARD" 750 # - "UNIONPAY" 751 # - "VISA" 752 # - "" 753 }, 754 "shippingCost": { # The total cost of shipping for all items. 755 "currency": "A String", # The currency of the price. 756 "value": "A String", # The price represented as a number. 757 }, 758 "acknowledged": True or False, # Whether the order was acknowledged. 759 "paymentStatus": "A String", # The status of the payment. 760 "merchantId": "A String", 761 "merchantOrderId": "A String", # Merchant-provided ID of the order. 762 "taxCollector": "A String", # The party responsible for collecting and remitting taxes. 763 "shippingOption": "A String", # Deprecated. Shipping details are provided with line items instead. 764 "status": "A String", # The status of the order. 765 "deliveryDetails": { # Delivery details for shipments. 766 "phoneNumber": "A String", # The phone number of the person receiving the delivery. 767 "address": { # The delivery address 768 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 769 "country": "A String", # CLDR country code (e.g. "US"). 770 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: 771 # John Smith 772 # 1600 Amphitheatre Parkway 773 # Mountain View, CA, 94043 774 # United States 775 "A String", 776 ], 777 "streetAddress": [ # Street-level part of the address. 778 "A String", 779 ], 780 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 781 "recipientName": "A String", # Name of the recipient. 782 "isPostOfficeBox": True or False, # Whether the address is a post office box. 783 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 784 }, 785 }, 786 "placedDate": "A String", # The date when the order was placed, in ISO 8601 format. 787 "channelType": "A String", # Deprecated. 788 "lineItems": [ # Line items that are ordered. 789 { 790 "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. 791 "targetCountry": "A String", # The CLDR territory code of the target country of the product. 792 "shownImage": "A String", # URL to the cached image shown to the user when order was placed. 793 "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. 794 "title": "A String", # The title of the product. 795 "mpn": "A String", # Manufacturer Part Number (MPN) of the item. 796 "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. 797 { 798 "dimension": "A String", # The dimension of the variant. 799 "value": "A String", # The value for the dimension. 800 }, 801 ], 802 "brand": "A String", # Brand of the item. 803 "itemGroupId": "A String", # Shared identifier for all variants of the same product. 804 "offerId": "A String", # An identifier of the item. 805 "price": { # Price of the item. 806 "currency": "A String", # The currency of the price. 807 "value": "A String", # The price represented as a number. 808 }, 809 "imageLink": "A String", # URL of an image of the item. 810 "gtin": "A String", # Global Trade Item Number (GTIN) of the item. 811 "channel": "A String", # The item's channel (online or local). 812 "fees": [ # Associated fees at order creation time. 813 { 814 "amount": { # Amount of the fee. 815 "currency": "A String", # The currency of the price. 816 "value": "A String", # The price represented as a number. 817 }, 818 "name": "A String", # Name of the fee. 819 }, 820 ], 821 "id": "A String", # The REST ID of the product. 822 "condition": "A String", # Condition or state of the item. 823 }, 824 "quantityDelivered": 42, # Number of items delivered. 825 "returnInfo": { # Details of the return policy for the line item. 826 "policyUrl": "A String", # URL of the item return policy. 827 "isReturnable": True or False, # Whether the item is returnable. 828 "daysToReturn": 42, # How many days later the item can be returned. 829 }, 830 "quantityOrdered": 42, # Number of items ordered. 831 "price": { # Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. 832 "currency": "A String", # The currency of the price. 833 "value": "A String", # The price represented as a number. 834 }, 835 "quantityPending": 42, # Number of items pending. 836 "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. 837 "currency": "A String", # The currency of the price. 838 "value": "A String", # The price represented as a number. 839 }, 840 "cancellations": [ # Cancellations of the line item. 841 { 842 "reason": "A String", # The reason for the cancellation. Orders that are cancelled with a noInventory reason will lead to the removal of the product from Shopping Actions until you make an update to that product. This will not affect your Shopping ads. 843 "creationDate": "A String", # Date on which the cancellation has been created, in ISO 8601 format. 844 "reasonText": "A String", # The explanation of the reason. 845 "actor": "A String", # The actor that created the cancellation. 846 "quantity": 42, # The quantity that was canceled. 847 }, 848 ], 849 "quantityCanceled": 42, # Number of items canceled. 850 "annotations": [ # Annotations that are attached to the line item. 851 { 852 "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. 853 "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. 854 }, 855 ], 856 "returns": [ # Returns of the line item. 857 { 858 "reason": "A String", # The reason for the return. 859 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 860 "reasonText": "A String", # The explanation of the reason. 861 "actor": "A String", # The actor that created the refund. 862 "quantity": 42, # Quantity that is returned. 863 }, 864 ], 865 "quantityShipped": 42, # Number of items shipped. 866 "quantityReturned": 42, # Number of items returned. 867 "id": "A String", # The ID of the line item. 868 "shippingDetails": { # Details of the requested shipping for the line item. 869 "deliverByDate": "A String", # The delivery by date, in ISO 8601 format. 870 "method": { # Details of the shipping method. 871 "minDaysInTransit": 42, # Minimum transit time. 872 "carrier": "A String", # The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values. 873 "methodName": "A String", # The name of the shipping method. 874 "maxDaysInTransit": 42, # Maximum transit time. 875 }, 876 "shipByDate": "A String", # The ship by date, in ISO 8601 format. 877 }, 878 }, 879 ], 880 "netAmount": { # The net amount for the order. For example, if an order was originally for a grand total of $100 and a refund was issued for $20, the net amount will be $80. 881 "currency": "A String", # The currency of the price. 882 "value": "A String", # The price represented as a number. 883 }, 884 "id": "A String", # The REST ID of the order. Globally unique. 885 }, 886 "executionStatus": "A String", # The status of the execution. Only defined if 887 # - the request was successful; and 888 # - the method is not get, getByMerchantOrderId, or one of the test methods. 889 }, 890 ], 891 }</pre> 892</div> 893 894<div class="method"> 895 <code class="details" id="get">get(merchantId, orderId)</code> 896 <pre>Retrieves an order from your Merchant Center account. 897 898Args: 899 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 900 orderId: string, The ID of the order. (required) 901 902Returns: 903 An object of the form: 904 905 { # Order. All methods require the order manager role. 906 "customer": { # The details of the customer who placed the order. 907 "explicitMarketingPreference": True or False, # Deprecated. Please use marketingRightsInfo instead. 908 "fullName": "A String", # Full name of the customer. 909 "email": "A String", # Deprecated. 910 "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. 911 "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. 912 "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. 913 "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. 914 }, 915 }, 916 "promotions": [ # The details of the merchant provided promotions applied to the order. More details about the program are here. 917 { 918 "benefits": [ 919 { 920 "offerIds": [ # The OfferId(s) that were purchased in this order and map to this specific benefit of the promotion. 921 "A String", 922 ], 923 "discount": { # The discount in the order price when the promotion is applied. 924 "currency": "A String", # The currency of the price. 925 "value": "A String", # The price represented as a number. 926 }, 927 "type": "A String", # Describes whether the promotion applies to products (e.g. 20% off) or to shipping (e.g. Free Shipping). 928 "taxImpact": { # The impact on tax when the promotion is applied. 929 "currency": "A String", # The currency of the price. 930 "value": "A String", # The price represented as a number. 931 }, 932 "subType": "A String", # Further describes the benefit of the promotion. Note that we will expand on this enumeration as we support new promotion sub-types. 933 }, 934 ], 935 "longTitle": "A String", # The full title of the promotion. 936 "genericRedemptionCode": "A String", # Optional. The text code that corresponds to the promotion when applied on the retailer?s website. 937 "redemptionChannel": "A String", # Indicates that the promotion is valid online. 938 "productApplicability": "A String", # Whether the promotion is applicable to all products or only specific products. 939 "effectiveDates": "A String", # The date and time frame when the promotion is active and ready for validation review. Note that the promotion live time may be delayed for a few hours due to the validation review. 940 # Start date and end date are separated by a forward slash (/). The start date is specified by the format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when the sale starts (in Greenwich Mean Time, GMT), followed by an expression of the time zone for the sale. The end date is in the same format. 941 "id": "A String", # The unique ID of the promotion. 942 }, 943 ], 944 "kind": "content#order", # Identifies what kind of resource this is. Value: the fixed string "content#order". 945 "shippingCostTax": { # The tax for the total shipping cost. 946 "currency": "A String", # The currency of the price. 947 "value": "A String", # The price represented as a number. 948 }, 949 "shipments": [ # Shipments of the order. 950 { 951 "status": "A String", # The status of the shipment. 952 "creationDate": "A String", # Date on which the shipment has been created, in ISO 8601 format. 953 "carrier": "A String", # The carrier handling the shipment. 954 # 955 # Acceptable values for US are: 956 # - "gsx" 957 # - "ups" 958 # - "usps" 959 # - "fedex" 960 # - "dhl" 961 # - "ecourier" 962 # - "cxt" 963 # - "google" 964 # - "ontrac" 965 # - "emsy" 966 # - "ont" 967 # - "deliv" 968 # - "dynamex" 969 # - "lasership" 970 # - "mpx" 971 # - "uds" 972 # - "efw" 973 # 974 # Acceptable values for FR are: 975 # - "colissimo" 976 # - "chronopost" 977 # - "gls" 978 # - "dpd" 979 # - "bpost" 980 "trackingId": "A String", # The tracking ID for the shipment. 981 "deliveryDate": "A String", # Date on which the shipment has been delivered, in ISO 8601 format. Present only if status is delivered 982 "lineItems": [ # The line items that are shipped. 983 { 984 "quantity": 42, # The quantity that is shipped. 985 "lineItemId": "A String", # The ID of the line item that is shipped. Either lineItemId or productId is required. 986 "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. 987 }, 988 ], 989 "id": "A String", # The ID of the shipment. 990 }, 991 ], 992 "refunds": [ # Refunds for the order. 993 { 994 "amount": { # The amount that is refunded. 995 "currency": "A String", # The currency of the price. 996 "value": "A String", # The price represented as a number. 997 }, 998 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 999 "reason": "A String", # The reason for the refund. 1000 "actor": "A String", # The actor that created the refund. 1001 "reasonText": "A String", # The explanation of the reason. 1002 }, 1003 ], 1004 "paymentMethod": { # The details of the payment method. 1005 "expirationMonth": 42, # The card expiration month (January = 1, February = 2 etc.). 1006 "lastFourDigits": "A String", # The last four digits of the card number. 1007 "expirationYear": 42, # The card expiration year (4-digit, e.g. 2015). 1008 "phoneNumber": "A String", # The billing phone number. 1009 "billingAddress": { # The billing address. 1010 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1011 "country": "A String", # CLDR country code (e.g. "US"). 1012 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: 1013 # John Smith 1014 # 1600 Amphitheatre Parkway 1015 # Mountain View, CA, 94043 1016 # United States 1017 "A String", 1018 ], 1019 "streetAddress": [ # Street-level part of the address. 1020 "A String", 1021 ], 1022 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1023 "recipientName": "A String", # Name of the recipient. 1024 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1025 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1026 }, 1027 "type": "A String", # The type of instrument. 1028 # 1029 # Acceptable values are: 1030 # - "AMEX" 1031 # - "DISCOVER" 1032 # - "JCB" 1033 # - "MASTERCARD" 1034 # - "UNIONPAY" 1035 # - "VISA" 1036 # - "" 1037 }, 1038 "shippingCost": { # The total cost of shipping for all items. 1039 "currency": "A String", # The currency of the price. 1040 "value": "A String", # The price represented as a number. 1041 }, 1042 "acknowledged": True or False, # Whether the order was acknowledged. 1043 "paymentStatus": "A String", # The status of the payment. 1044 "merchantId": "A String", 1045 "merchantOrderId": "A String", # Merchant-provided ID of the order. 1046 "taxCollector": "A String", # The party responsible for collecting and remitting taxes. 1047 "shippingOption": "A String", # Deprecated. Shipping details are provided with line items instead. 1048 "status": "A String", # The status of the order. 1049 "deliveryDetails": { # Delivery details for shipments. 1050 "phoneNumber": "A String", # The phone number of the person receiving the delivery. 1051 "address": { # The delivery address 1052 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1053 "country": "A String", # CLDR country code (e.g. "US"). 1054 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: 1055 # John Smith 1056 # 1600 Amphitheatre Parkway 1057 # Mountain View, CA, 94043 1058 # United States 1059 "A String", 1060 ], 1061 "streetAddress": [ # Street-level part of the address. 1062 "A String", 1063 ], 1064 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1065 "recipientName": "A String", # Name of the recipient. 1066 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1067 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1068 }, 1069 }, 1070 "placedDate": "A String", # The date when the order was placed, in ISO 8601 format. 1071 "channelType": "A String", # Deprecated. 1072 "lineItems": [ # Line items that are ordered. 1073 { 1074 "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. 1075 "targetCountry": "A String", # The CLDR territory code of the target country of the product. 1076 "shownImage": "A String", # URL to the cached image shown to the user when order was placed. 1077 "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. 1078 "title": "A String", # The title of the product. 1079 "mpn": "A String", # Manufacturer Part Number (MPN) of the item. 1080 "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. 1081 { 1082 "dimension": "A String", # The dimension of the variant. 1083 "value": "A String", # The value for the dimension. 1084 }, 1085 ], 1086 "brand": "A String", # Brand of the item. 1087 "itemGroupId": "A String", # Shared identifier for all variants of the same product. 1088 "offerId": "A String", # An identifier of the item. 1089 "price": { # Price of the item. 1090 "currency": "A String", # The currency of the price. 1091 "value": "A String", # The price represented as a number. 1092 }, 1093 "imageLink": "A String", # URL of an image of the item. 1094 "gtin": "A String", # Global Trade Item Number (GTIN) of the item. 1095 "channel": "A String", # The item's channel (online or local). 1096 "fees": [ # Associated fees at order creation time. 1097 { 1098 "amount": { # Amount of the fee. 1099 "currency": "A String", # The currency of the price. 1100 "value": "A String", # The price represented as a number. 1101 }, 1102 "name": "A String", # Name of the fee. 1103 }, 1104 ], 1105 "id": "A String", # The REST ID of the product. 1106 "condition": "A String", # Condition or state of the item. 1107 }, 1108 "quantityDelivered": 42, # Number of items delivered. 1109 "returnInfo": { # Details of the return policy for the line item. 1110 "policyUrl": "A String", # URL of the item return policy. 1111 "isReturnable": True or False, # Whether the item is returnable. 1112 "daysToReturn": 42, # How many days later the item can be returned. 1113 }, 1114 "quantityOrdered": 42, # Number of items ordered. 1115 "price": { # Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. 1116 "currency": "A String", # The currency of the price. 1117 "value": "A String", # The price represented as a number. 1118 }, 1119 "quantityPending": 42, # Number of items pending. 1120 "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. 1121 "currency": "A String", # The currency of the price. 1122 "value": "A String", # The price represented as a number. 1123 }, 1124 "cancellations": [ # Cancellations of the line item. 1125 { 1126 "reason": "A String", # The reason for the cancellation. Orders that are cancelled with a noInventory reason will lead to the removal of the product from Shopping Actions until you make an update to that product. This will not affect your Shopping ads. 1127 "creationDate": "A String", # Date on which the cancellation has been created, in ISO 8601 format. 1128 "reasonText": "A String", # The explanation of the reason. 1129 "actor": "A String", # The actor that created the cancellation. 1130 "quantity": 42, # The quantity that was canceled. 1131 }, 1132 ], 1133 "quantityCanceled": 42, # Number of items canceled. 1134 "annotations": [ # Annotations that are attached to the line item. 1135 { 1136 "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. 1137 "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. 1138 }, 1139 ], 1140 "returns": [ # Returns of the line item. 1141 { 1142 "reason": "A String", # The reason for the return. 1143 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 1144 "reasonText": "A String", # The explanation of the reason. 1145 "actor": "A String", # The actor that created the refund. 1146 "quantity": 42, # Quantity that is returned. 1147 }, 1148 ], 1149 "quantityShipped": 42, # Number of items shipped. 1150 "quantityReturned": 42, # Number of items returned. 1151 "id": "A String", # The ID of the line item. 1152 "shippingDetails": { # Details of the requested shipping for the line item. 1153 "deliverByDate": "A String", # The delivery by date, in ISO 8601 format. 1154 "method": { # Details of the shipping method. 1155 "minDaysInTransit": 42, # Minimum transit time. 1156 "carrier": "A String", # The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values. 1157 "methodName": "A String", # The name of the shipping method. 1158 "maxDaysInTransit": 42, # Maximum transit time. 1159 }, 1160 "shipByDate": "A String", # The ship by date, in ISO 8601 format. 1161 }, 1162 }, 1163 ], 1164 "netAmount": { # The net amount for the order. For example, if an order was originally for a grand total of $100 and a refund was issued for $20, the net amount will be $80. 1165 "currency": "A String", # The currency of the price. 1166 "value": "A String", # The price represented as a number. 1167 }, 1168 "id": "A String", # The REST ID of the order. Globally unique. 1169 }</pre> 1170</div> 1171 1172<div class="method"> 1173 <code class="details" id="getbymerchantorderid">getbymerchantorderid(merchantId, merchantOrderId)</code> 1174 <pre>Retrieves an order using merchant order ID. 1175 1176Args: 1177 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1178 merchantOrderId: string, The merchant order ID to be looked for. (required) 1179 1180Returns: 1181 An object of the form: 1182 1183 { 1184 "kind": "content#ordersGetByMerchantOrderIdResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersGetByMerchantOrderIdResponse". 1185 "order": { # Order. All methods require the order manager role. # The requested order. 1186 "customer": { # The details of the customer who placed the order. 1187 "explicitMarketingPreference": True or False, # Deprecated. Please use marketingRightsInfo instead. 1188 "fullName": "A String", # Full name of the customer. 1189 "email": "A String", # Deprecated. 1190 "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. 1191 "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. 1192 "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. 1193 "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. 1194 }, 1195 }, 1196 "promotions": [ # The details of the merchant provided promotions applied to the order. More details about the program are here. 1197 { 1198 "benefits": [ 1199 { 1200 "offerIds": [ # The OfferId(s) that were purchased in this order and map to this specific benefit of the promotion. 1201 "A String", 1202 ], 1203 "discount": { # The discount in the order price when the promotion is applied. 1204 "currency": "A String", # The currency of the price. 1205 "value": "A String", # The price represented as a number. 1206 }, 1207 "type": "A String", # Describes whether the promotion applies to products (e.g. 20% off) or to shipping (e.g. Free Shipping). 1208 "taxImpact": { # The impact on tax when the promotion is applied. 1209 "currency": "A String", # The currency of the price. 1210 "value": "A String", # The price represented as a number. 1211 }, 1212 "subType": "A String", # Further describes the benefit of the promotion. Note that we will expand on this enumeration as we support new promotion sub-types. 1213 }, 1214 ], 1215 "longTitle": "A String", # The full title of the promotion. 1216 "genericRedemptionCode": "A String", # Optional. The text code that corresponds to the promotion when applied on the retailer?s website. 1217 "redemptionChannel": "A String", # Indicates that the promotion is valid online. 1218 "productApplicability": "A String", # Whether the promotion is applicable to all products or only specific products. 1219 "effectiveDates": "A String", # The date and time frame when the promotion is active and ready for validation review. Note that the promotion live time may be delayed for a few hours due to the validation review. 1220 # Start date and end date are separated by a forward slash (/). The start date is specified by the format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when the sale starts (in Greenwich Mean Time, GMT), followed by an expression of the time zone for the sale. The end date is in the same format. 1221 "id": "A String", # The unique ID of the promotion. 1222 }, 1223 ], 1224 "kind": "content#order", # Identifies what kind of resource this is. Value: the fixed string "content#order". 1225 "shippingCostTax": { # The tax for the total shipping cost. 1226 "currency": "A String", # The currency of the price. 1227 "value": "A String", # The price represented as a number. 1228 }, 1229 "shipments": [ # Shipments of the order. 1230 { 1231 "status": "A String", # The status of the shipment. 1232 "creationDate": "A String", # Date on which the shipment has been created, in ISO 8601 format. 1233 "carrier": "A String", # The carrier handling the shipment. 1234 # 1235 # Acceptable values for US are: 1236 # - "gsx" 1237 # - "ups" 1238 # - "usps" 1239 # - "fedex" 1240 # - "dhl" 1241 # - "ecourier" 1242 # - "cxt" 1243 # - "google" 1244 # - "ontrac" 1245 # - "emsy" 1246 # - "ont" 1247 # - "deliv" 1248 # - "dynamex" 1249 # - "lasership" 1250 # - "mpx" 1251 # - "uds" 1252 # - "efw" 1253 # 1254 # Acceptable values for FR are: 1255 # - "colissimo" 1256 # - "chronopost" 1257 # - "gls" 1258 # - "dpd" 1259 # - "bpost" 1260 "trackingId": "A String", # The tracking ID for the shipment. 1261 "deliveryDate": "A String", # Date on which the shipment has been delivered, in ISO 8601 format. Present only if status is delivered 1262 "lineItems": [ # The line items that are shipped. 1263 { 1264 "quantity": 42, # The quantity that is shipped. 1265 "lineItemId": "A String", # The ID of the line item that is shipped. Either lineItemId or productId is required. 1266 "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. 1267 }, 1268 ], 1269 "id": "A String", # The ID of the shipment. 1270 }, 1271 ], 1272 "refunds": [ # Refunds for the order. 1273 { 1274 "amount": { # The amount that is refunded. 1275 "currency": "A String", # The currency of the price. 1276 "value": "A String", # The price represented as a number. 1277 }, 1278 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 1279 "reason": "A String", # The reason for the refund. 1280 "actor": "A String", # The actor that created the refund. 1281 "reasonText": "A String", # The explanation of the reason. 1282 }, 1283 ], 1284 "paymentMethod": { # The details of the payment method. 1285 "expirationMonth": 42, # The card expiration month (January = 1, February = 2 etc.). 1286 "lastFourDigits": "A String", # The last four digits of the card number. 1287 "expirationYear": 42, # The card expiration year (4-digit, e.g. 2015). 1288 "phoneNumber": "A String", # The billing phone number. 1289 "billingAddress": { # The billing address. 1290 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1291 "country": "A String", # CLDR country code (e.g. "US"). 1292 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: 1293 # John Smith 1294 # 1600 Amphitheatre Parkway 1295 # Mountain View, CA, 94043 1296 # United States 1297 "A String", 1298 ], 1299 "streetAddress": [ # Street-level part of the address. 1300 "A String", 1301 ], 1302 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1303 "recipientName": "A String", # Name of the recipient. 1304 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1305 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1306 }, 1307 "type": "A String", # The type of instrument. 1308 # 1309 # Acceptable values are: 1310 # - "AMEX" 1311 # - "DISCOVER" 1312 # - "JCB" 1313 # - "MASTERCARD" 1314 # - "UNIONPAY" 1315 # - "VISA" 1316 # - "" 1317 }, 1318 "shippingCost": { # The total cost of shipping for all items. 1319 "currency": "A String", # The currency of the price. 1320 "value": "A String", # The price represented as a number. 1321 }, 1322 "acknowledged": True or False, # Whether the order was acknowledged. 1323 "paymentStatus": "A String", # The status of the payment. 1324 "merchantId": "A String", 1325 "merchantOrderId": "A String", # Merchant-provided ID of the order. 1326 "taxCollector": "A String", # The party responsible for collecting and remitting taxes. 1327 "shippingOption": "A String", # Deprecated. Shipping details are provided with line items instead. 1328 "status": "A String", # The status of the order. 1329 "deliveryDetails": { # Delivery details for shipments. 1330 "phoneNumber": "A String", # The phone number of the person receiving the delivery. 1331 "address": { # The delivery address 1332 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1333 "country": "A String", # CLDR country code (e.g. "US"). 1334 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: 1335 # John Smith 1336 # 1600 Amphitheatre Parkway 1337 # Mountain View, CA, 94043 1338 # United States 1339 "A String", 1340 ], 1341 "streetAddress": [ # Street-level part of the address. 1342 "A String", 1343 ], 1344 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1345 "recipientName": "A String", # Name of the recipient. 1346 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1347 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1348 }, 1349 }, 1350 "placedDate": "A String", # The date when the order was placed, in ISO 8601 format. 1351 "channelType": "A String", # Deprecated. 1352 "lineItems": [ # Line items that are ordered. 1353 { 1354 "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. 1355 "targetCountry": "A String", # The CLDR territory code of the target country of the product. 1356 "shownImage": "A String", # URL to the cached image shown to the user when order was placed. 1357 "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. 1358 "title": "A String", # The title of the product. 1359 "mpn": "A String", # Manufacturer Part Number (MPN) of the item. 1360 "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. 1361 { 1362 "dimension": "A String", # The dimension of the variant. 1363 "value": "A String", # The value for the dimension. 1364 }, 1365 ], 1366 "brand": "A String", # Brand of the item. 1367 "itemGroupId": "A String", # Shared identifier for all variants of the same product. 1368 "offerId": "A String", # An identifier of the item. 1369 "price": { # Price of the item. 1370 "currency": "A String", # The currency of the price. 1371 "value": "A String", # The price represented as a number. 1372 }, 1373 "imageLink": "A String", # URL of an image of the item. 1374 "gtin": "A String", # Global Trade Item Number (GTIN) of the item. 1375 "channel": "A String", # The item's channel (online or local). 1376 "fees": [ # Associated fees at order creation time. 1377 { 1378 "amount": { # Amount of the fee. 1379 "currency": "A String", # The currency of the price. 1380 "value": "A String", # The price represented as a number. 1381 }, 1382 "name": "A String", # Name of the fee. 1383 }, 1384 ], 1385 "id": "A String", # The REST ID of the product. 1386 "condition": "A String", # Condition or state of the item. 1387 }, 1388 "quantityDelivered": 42, # Number of items delivered. 1389 "returnInfo": { # Details of the return policy for the line item. 1390 "policyUrl": "A String", # URL of the item return policy. 1391 "isReturnable": True or False, # Whether the item is returnable. 1392 "daysToReturn": 42, # How many days later the item can be returned. 1393 }, 1394 "quantityOrdered": 42, # Number of items ordered. 1395 "price": { # Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. 1396 "currency": "A String", # The currency of the price. 1397 "value": "A String", # The price represented as a number. 1398 }, 1399 "quantityPending": 42, # Number of items pending. 1400 "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. 1401 "currency": "A String", # The currency of the price. 1402 "value": "A String", # The price represented as a number. 1403 }, 1404 "cancellations": [ # Cancellations of the line item. 1405 { 1406 "reason": "A String", # The reason for the cancellation. Orders that are cancelled with a noInventory reason will lead to the removal of the product from Shopping Actions until you make an update to that product. This will not affect your Shopping ads. 1407 "creationDate": "A String", # Date on which the cancellation has been created, in ISO 8601 format. 1408 "reasonText": "A String", # The explanation of the reason. 1409 "actor": "A String", # The actor that created the cancellation. 1410 "quantity": 42, # The quantity that was canceled. 1411 }, 1412 ], 1413 "quantityCanceled": 42, # Number of items canceled. 1414 "annotations": [ # Annotations that are attached to the line item. 1415 { 1416 "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. 1417 "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. 1418 }, 1419 ], 1420 "returns": [ # Returns of the line item. 1421 { 1422 "reason": "A String", # The reason for the return. 1423 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 1424 "reasonText": "A String", # The explanation of the reason. 1425 "actor": "A String", # The actor that created the refund. 1426 "quantity": 42, # Quantity that is returned. 1427 }, 1428 ], 1429 "quantityShipped": 42, # Number of items shipped. 1430 "quantityReturned": 42, # Number of items returned. 1431 "id": "A String", # The ID of the line item. 1432 "shippingDetails": { # Details of the requested shipping for the line item. 1433 "deliverByDate": "A String", # The delivery by date, in ISO 8601 format. 1434 "method": { # Details of the shipping method. 1435 "minDaysInTransit": 42, # Minimum transit time. 1436 "carrier": "A String", # The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values. 1437 "methodName": "A String", # The name of the shipping method. 1438 "maxDaysInTransit": 42, # Maximum transit time. 1439 }, 1440 "shipByDate": "A String", # The ship by date, in ISO 8601 format. 1441 }, 1442 }, 1443 ], 1444 "netAmount": { # The net amount for the order. For example, if an order was originally for a grand total of $100 and a refund was issued for $20, the net amount will be $80. 1445 "currency": "A String", # The currency of the price. 1446 "value": "A String", # The price represented as a number. 1447 }, 1448 "id": "A String", # The REST ID of the order. Globally unique. 1449 }, 1450 }</pre> 1451</div> 1452 1453<div class="method"> 1454 <code class="details" id="gettestordertemplate">gettestordertemplate(merchantId, templateName, country=None)</code> 1455 <pre>Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. 1456 1457Args: 1458 merchantId: string, The ID of the account that should manage the order. This cannot be a multi-client account. (required) 1459 templateName: string, The name of the template to retrieve. (required) 1460 Allowed values 1461 template1 - 1462 template1a - 1463 template1b - 1464 template2 - 1465 country: string, The country of the template to retrieve. Defaults to US. 1466 1467Returns: 1468 An object of the form: 1469 1470 { 1471 "kind": "content#ordersGetTestOrderTemplateResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersGetTestOrderTemplateResponse". 1472 "template": { # The requested test order template. 1473 "customer": { # The details of the customer who placed the order. 1474 "explicitMarketingPreference": True or False, # Deprecated. Please use marketingRightsInfo instead. 1475 "fullName": "A String", # Full name of the customer. 1476 "email": "A String", # Email address of the customer. 1477 "marketingRightsInfo": { # Customer's marketing preferences. 1478 "explicitMarketingPreference": "A String", # Last know user use selection regards marketing preferences. In certain cases selection might not be known, so this field would be empty. 1479 "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. 1480 }, 1481 }, 1482 "promotions": [ # Deprecated. Ignored if provided. 1483 { 1484 "benefits": [ 1485 { 1486 "offerIds": [ # The OfferId(s) that were purchased in this order and map to this specific benefit of the promotion. 1487 "A String", 1488 ], 1489 "discount": { # The discount in the order price when the promotion is applied. 1490 "currency": "A String", # The currency of the price. 1491 "value": "A String", # The price represented as a number. 1492 }, 1493 "type": "A String", # Describes whether the promotion applies to products (e.g. 20% off) or to shipping (e.g. Free Shipping). 1494 "taxImpact": { # The impact on tax when the promotion is applied. 1495 "currency": "A String", # The currency of the price. 1496 "value": "A String", # The price represented as a number. 1497 }, 1498 "subType": "A String", # Further describes the benefit of the promotion. Note that we will expand on this enumeration as we support new promotion sub-types. 1499 }, 1500 ], 1501 "longTitle": "A String", # The full title of the promotion. 1502 "genericRedemptionCode": "A String", # Optional. The text code that corresponds to the promotion when applied on the retailer?s website. 1503 "redemptionChannel": "A String", # Indicates that the promotion is valid online. 1504 "productApplicability": "A String", # Whether the promotion is applicable to all products or only specific products. 1505 "effectiveDates": "A String", # The date and time frame when the promotion is active and ready for validation review. Note that the promotion live time may be delayed for a few hours due to the validation review. 1506 # Start date and end date are separated by a forward slash (/). The start date is specified by the format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when the sale starts (in Greenwich Mean Time, GMT), followed by an expression of the time zone for the sale. The end date is in the same format. 1507 "id": "A String", # The unique ID of the promotion. 1508 }, 1509 ], 1510 "kind": "content#testOrder", # Identifies what kind of resource this is. Value: the fixed string "content#testOrder". 1511 "shippingCostTax": { # Deprecated. Ignored if provided. 1512 "currency": "A String", # The currency of the price. 1513 "value": "A String", # The price represented as a number. 1514 }, 1515 "notificationMode": "A String", # Determines if test order must be pulled by merchant or pushed to merchant via push integration. 1516 "predefinedDeliveryAddress": "A String", # Identifier of one of the predefined delivery addresses for the delivery. 1517 "shippingCost": { # The price of shipping for all items. Shipping tax is automatically calculated for MFL orders. For non-MFL orders, tax settings from Merchant Center are applied. Note that shipping is not taxed in certain states. 1518 "currency": "A String", # The currency of the price. 1519 "value": "A String", # The price represented as a number. 1520 }, 1521 "shippingOption": "A String", # The requested shipping option. 1522 "enableOrderinvoices": True or False, # Whether the orderinvoices service should support this order. 1523 "lineItems": [ # Line items that are ordered. At least one line item must be provided. 1524 { 1525 "returnInfo": { # Details of the return policy for the line item. 1526 "policyUrl": "A String", # URL of the item return policy. 1527 "isReturnable": True or False, # Whether the item is returnable. 1528 "daysToReturn": 42, # How many days later the item can be returned. 1529 }, 1530 "product": { # Product data from the time of the order placement. 1531 "targetCountry": "A String", # The CLDR territory code of the target country of the product. 1532 "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. 1533 "title": "A String", # The title of the product. 1534 "mpn": "A String", # Manufacturer Part Number (MPN) of the item. Optional. 1535 "variantAttributes": [ # Variant attributes for the item. Optional. 1536 { 1537 "dimension": "A String", # The dimension of the variant. 1538 "value": "A String", # The value for the dimension. 1539 }, 1540 ], 1541 "brand": "A String", # Brand of the item. 1542 "itemGroupId": "A String", # Shared identifier for all variants of the same product. Optional. 1543 "offerId": "A String", # An identifier of the item. 1544 "imageLink": "A String", # URL of an image of the item. 1545 "gtin": "A String", # Global Trade Item Number (GTIN) of the item. Optional. 1546 "channel": "A String", # Deprecated. 1547 "fees": [ # Fees for the item. Optional. 1548 { 1549 "amount": { # Amount of the fee. 1550 "currency": "A String", # The currency of the price. 1551 "value": "A String", # The price represented as a number. 1552 }, 1553 "name": "A String", # Name of the fee. 1554 }, 1555 ], 1556 "price": { # The price for the product. Tax is automatically calculated for MFL orders. For non-MFL orders, tax settings from Merchant Center are applied. 1557 "currency": "A String", # The currency of the price. 1558 "value": "A String", # The price represented as a number. 1559 }, 1560 "condition": "A String", # Condition or state of the item. 1561 }, 1562 "unitTax": { # Deprecated. Ignored if provided. 1563 "currency": "A String", # The currency of the price. 1564 "value": "A String", # The price represented as a number. 1565 }, 1566 "quantityOrdered": 42, # Number of items ordered. 1567 "shippingDetails": { # Details of the requested shipping for the line item. 1568 "deliverByDate": "A String", # The delivery by date, in ISO 8601 format. 1569 "method": { # Details of the shipping method. 1570 "minDaysInTransit": 42, # Minimum transit time. 1571 "carrier": "A String", # The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values. 1572 "methodName": "A String", # The name of the shipping method. 1573 "maxDaysInTransit": 42, # Maximum transit time. 1574 }, 1575 "shipByDate": "A String", # The ship by date, in ISO 8601 format. 1576 }, 1577 }, 1578 ], 1579 "paymentMethod": { # The details of the payment method. 1580 "expirationMonth": 42, # The card expiration month (January = 1, February = 2 etc.). 1581 "type": "A String", # The type of instrument. Note that real orders might have different values than the four values accepted by createTestOrder. 1582 "expirationYear": 42, # The card expiration year (4-digit, e.g. 2015). 1583 "lastFourDigits": "A String", # The last four digits of the card number. 1584 "predefinedBillingAddress": "A String", # The billing address. 1585 }, 1586 }, 1587 }</pre> 1588</div> 1589 1590<div class="method"> 1591 <code class="details" id="instorerefundlineitem">instorerefundlineitem(merchantId, orderId, body)</code> 1592 <pre>Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). 1593Note: 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. 1594 1595Args: 1596 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1597 orderId: string, The ID of the order. (required) 1598 body: object, The request body. (required) 1599 The object takes the form of: 1600 1601{ 1602 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1603 "reason": "A String", # The reason for the return. 1604 "amountPretax": { # The amount that is refunded. Required. 1605 "currency": "A String", # The currency of the price. 1606 "value": "A String", # The price represented as a number. 1607 }, 1608 "reasonText": "A String", # The explanation of the reason. 1609 "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. 1610 "amountTax": { # Tax amount that correspond to refund amount in amountPretax. Required. 1611 "currency": "A String", # The currency of the price. 1612 "value": "A String", # The price represented as a number. 1613 }, 1614 "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. 1615 "quantity": 42, # The quantity to return and refund. 1616 } 1617 1618 1619Returns: 1620 An object of the form: 1621 1622 { 1623 "kind": "content#ordersInStoreRefundLineItemResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersInStoreRefundLineItemResponse". 1624 "executionStatus": "A String", # The status of the execution. 1625 }</pre> 1626</div> 1627 1628<div class="method"> 1629 <code class="details" id="list">list(merchantId, orderBy=None, pageToken=None, placedDateEnd=None, acknowledged=None, maxResults=None, placedDateStart=None, statuses=None)</code> 1630 <pre>Lists the orders in your Merchant Center account. 1631 1632Args: 1633 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1634 orderBy: string, Order results by placement date in descending or ascending order. 1635 1636Acceptable values are: 1637- placedDateAsc 1638- placedDateDesc 1639 pageToken: string, The token returned by the previous request. 1640 placedDateEnd: string, Obtains orders placed before this date (exclusively), in ISO 8601 format. 1641 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. 1642We recommend using this filter set to false, in conjunction with the acknowledge call, such that only un-acknowledged orders are returned. 1643 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. 1644 placedDateStart: string, Obtains orders placed after this date (inclusively), in ISO 8601 format. 1645 statuses: string, Obtains orders that match any of the specified statuses. Multiple values can be specified with comma separation. Additionally, 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) 1646 Allowed values 1647 active - 1648 canceled - 1649 completed - 1650 delivered - 1651 inProgress - 1652 partiallyDelivered - 1653 partiallyReturned - 1654 partiallyShipped - 1655 pendingShipment - 1656 returned - 1657 shipped - 1658 1659Returns: 1660 An object of the form: 1661 1662 { 1663 "nextPageToken": "A String", # The token for the retrieval of the next page of orders. 1664 "kind": "content#ordersListResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersListResponse". 1665 "resources": [ 1666 { # Order. All methods require the order manager role. 1667 "customer": { # The details of the customer who placed the order. 1668 "explicitMarketingPreference": True or False, # Deprecated. Please use marketingRightsInfo instead. 1669 "fullName": "A String", # Full name of the customer. 1670 "email": "A String", # Deprecated. 1671 "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. 1672 "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. 1673 "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. 1674 "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. 1675 }, 1676 }, 1677 "promotions": [ # The details of the merchant provided promotions applied to the order. More details about the program are here. 1678 { 1679 "benefits": [ 1680 { 1681 "offerIds": [ # The OfferId(s) that were purchased in this order and map to this specific benefit of the promotion. 1682 "A String", 1683 ], 1684 "discount": { # The discount in the order price when the promotion is applied. 1685 "currency": "A String", # The currency of the price. 1686 "value": "A String", # The price represented as a number. 1687 }, 1688 "type": "A String", # Describes whether the promotion applies to products (e.g. 20% off) or to shipping (e.g. Free Shipping). 1689 "taxImpact": { # The impact on tax when the promotion is applied. 1690 "currency": "A String", # The currency of the price. 1691 "value": "A String", # The price represented as a number. 1692 }, 1693 "subType": "A String", # Further describes the benefit of the promotion. Note that we will expand on this enumeration as we support new promotion sub-types. 1694 }, 1695 ], 1696 "longTitle": "A String", # The full title of the promotion. 1697 "genericRedemptionCode": "A String", # Optional. The text code that corresponds to the promotion when applied on the retailer?s website. 1698 "redemptionChannel": "A String", # Indicates that the promotion is valid online. 1699 "productApplicability": "A String", # Whether the promotion is applicable to all products or only specific products. 1700 "effectiveDates": "A String", # The date and time frame when the promotion is active and ready for validation review. Note that the promotion live time may be delayed for a few hours due to the validation review. 1701 # Start date and end date are separated by a forward slash (/). The start date is specified by the format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when the sale starts (in Greenwich Mean Time, GMT), followed by an expression of the time zone for the sale. The end date is in the same format. 1702 "id": "A String", # The unique ID of the promotion. 1703 }, 1704 ], 1705 "kind": "content#order", # Identifies what kind of resource this is. Value: the fixed string "content#order". 1706 "shippingCostTax": { # The tax for the total shipping cost. 1707 "currency": "A String", # The currency of the price. 1708 "value": "A String", # The price represented as a number. 1709 }, 1710 "shipments": [ # Shipments of the order. 1711 { 1712 "status": "A String", # The status of the shipment. 1713 "creationDate": "A String", # Date on which the shipment has been created, in ISO 8601 format. 1714 "carrier": "A String", # The carrier handling the shipment. 1715 # 1716 # Acceptable values for US are: 1717 # - "gsx" 1718 # - "ups" 1719 # - "usps" 1720 # - "fedex" 1721 # - "dhl" 1722 # - "ecourier" 1723 # - "cxt" 1724 # - "google" 1725 # - "ontrac" 1726 # - "emsy" 1727 # - "ont" 1728 # - "deliv" 1729 # - "dynamex" 1730 # - "lasership" 1731 # - "mpx" 1732 # - "uds" 1733 # - "efw" 1734 # 1735 # Acceptable values for FR are: 1736 # - "colissimo" 1737 # - "chronopost" 1738 # - "gls" 1739 # - "dpd" 1740 # - "bpost" 1741 "trackingId": "A String", # The tracking ID for the shipment. 1742 "deliveryDate": "A String", # Date on which the shipment has been delivered, in ISO 8601 format. Present only if status is delivered 1743 "lineItems": [ # The line items that are shipped. 1744 { 1745 "quantity": 42, # The quantity that is shipped. 1746 "lineItemId": "A String", # The ID of the line item that is shipped. Either lineItemId or productId is required. 1747 "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. 1748 }, 1749 ], 1750 "id": "A String", # The ID of the shipment. 1751 }, 1752 ], 1753 "refunds": [ # Refunds for the order. 1754 { 1755 "amount": { # The amount that is refunded. 1756 "currency": "A String", # The currency of the price. 1757 "value": "A String", # The price represented as a number. 1758 }, 1759 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 1760 "reason": "A String", # The reason for the refund. 1761 "actor": "A String", # The actor that created the refund. 1762 "reasonText": "A String", # The explanation of the reason. 1763 }, 1764 ], 1765 "paymentMethod": { # The details of the payment method. 1766 "expirationMonth": 42, # The card expiration month (January = 1, February = 2 etc.). 1767 "lastFourDigits": "A String", # The last four digits of the card number. 1768 "expirationYear": 42, # The card expiration year (4-digit, e.g. 2015). 1769 "phoneNumber": "A String", # The billing phone number. 1770 "billingAddress": { # The billing address. 1771 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1772 "country": "A String", # CLDR country code (e.g. "US"). 1773 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: 1774 # John Smith 1775 # 1600 Amphitheatre Parkway 1776 # Mountain View, CA, 94043 1777 # United States 1778 "A String", 1779 ], 1780 "streetAddress": [ # Street-level part of the address. 1781 "A String", 1782 ], 1783 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1784 "recipientName": "A String", # Name of the recipient. 1785 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1786 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1787 }, 1788 "type": "A String", # The type of instrument. 1789 # 1790 # Acceptable values are: 1791 # - "AMEX" 1792 # - "DISCOVER" 1793 # - "JCB" 1794 # - "MASTERCARD" 1795 # - "UNIONPAY" 1796 # - "VISA" 1797 # - "" 1798 }, 1799 "shippingCost": { # The total cost of shipping for all items. 1800 "currency": "A String", # The currency of the price. 1801 "value": "A String", # The price represented as a number. 1802 }, 1803 "acknowledged": True or False, # Whether the order was acknowledged. 1804 "paymentStatus": "A String", # The status of the payment. 1805 "merchantId": "A String", 1806 "merchantOrderId": "A String", # Merchant-provided ID of the order. 1807 "taxCollector": "A String", # The party responsible for collecting and remitting taxes. 1808 "shippingOption": "A String", # Deprecated. Shipping details are provided with line items instead. 1809 "status": "A String", # The status of the order. 1810 "deliveryDetails": { # Delivery details for shipments. 1811 "phoneNumber": "A String", # The phone number of the person receiving the delivery. 1812 "address": { # The delivery address 1813 "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). 1814 "country": "A String", # CLDR country code (e.g. "US"). 1815 "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: 1816 # John Smith 1817 # 1600 Amphitheatre Parkway 1818 # Mountain View, CA, 94043 1819 # United States 1820 "A String", 1821 ], 1822 "streetAddress": [ # Street-level part of the address. 1823 "A String", 1824 ], 1825 "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). 1826 "recipientName": "A String", # Name of the recipient. 1827 "isPostOfficeBox": True or False, # Whether the address is a post office box. 1828 "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). 1829 }, 1830 }, 1831 "placedDate": "A String", # The date when the order was placed, in ISO 8601 format. 1832 "channelType": "A String", # Deprecated. 1833 "lineItems": [ # Line items that are ordered. 1834 { 1835 "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. 1836 "targetCountry": "A String", # The CLDR territory code of the target country of the product. 1837 "shownImage": "A String", # URL to the cached image shown to the user when order was placed. 1838 "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. 1839 "title": "A String", # The title of the product. 1840 "mpn": "A String", # Manufacturer Part Number (MPN) of the item. 1841 "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. 1842 { 1843 "dimension": "A String", # The dimension of the variant. 1844 "value": "A String", # The value for the dimension. 1845 }, 1846 ], 1847 "brand": "A String", # Brand of the item. 1848 "itemGroupId": "A String", # Shared identifier for all variants of the same product. 1849 "offerId": "A String", # An identifier of the item. 1850 "price": { # Price of the item. 1851 "currency": "A String", # The currency of the price. 1852 "value": "A String", # The price represented as a number. 1853 }, 1854 "imageLink": "A String", # URL of an image of the item. 1855 "gtin": "A String", # Global Trade Item Number (GTIN) of the item. 1856 "channel": "A String", # The item's channel (online or local). 1857 "fees": [ # Associated fees at order creation time. 1858 { 1859 "amount": { # Amount of the fee. 1860 "currency": "A String", # The currency of the price. 1861 "value": "A String", # The price represented as a number. 1862 }, 1863 "name": "A String", # Name of the fee. 1864 }, 1865 ], 1866 "id": "A String", # The REST ID of the product. 1867 "condition": "A String", # Condition or state of the item. 1868 }, 1869 "quantityDelivered": 42, # Number of items delivered. 1870 "returnInfo": { # Details of the return policy for the line item. 1871 "policyUrl": "A String", # URL of the item return policy. 1872 "isReturnable": True or False, # Whether the item is returnable. 1873 "daysToReturn": 42, # How many days later the item can be returned. 1874 }, 1875 "quantityOrdered": 42, # Number of items ordered. 1876 "price": { # Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. 1877 "currency": "A String", # The currency of the price. 1878 "value": "A String", # The price represented as a number. 1879 }, 1880 "quantityPending": 42, # Number of items pending. 1881 "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. 1882 "currency": "A String", # The currency of the price. 1883 "value": "A String", # The price represented as a number. 1884 }, 1885 "cancellations": [ # Cancellations of the line item. 1886 { 1887 "reason": "A String", # The reason for the cancellation. Orders that are cancelled with a noInventory reason will lead to the removal of the product from Shopping Actions until you make an update to that product. This will not affect your Shopping ads. 1888 "creationDate": "A String", # Date on which the cancellation has been created, in ISO 8601 format. 1889 "reasonText": "A String", # The explanation of the reason. 1890 "actor": "A String", # The actor that created the cancellation. 1891 "quantity": 42, # The quantity that was canceled. 1892 }, 1893 ], 1894 "quantityCanceled": 42, # Number of items canceled. 1895 "annotations": [ # Annotations that are attached to the line item. 1896 { 1897 "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. 1898 "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. 1899 }, 1900 ], 1901 "returns": [ # Returns of the line item. 1902 { 1903 "reason": "A String", # The reason for the return. 1904 "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. 1905 "reasonText": "A String", # The explanation of the reason. 1906 "actor": "A String", # The actor that created the refund. 1907 "quantity": 42, # Quantity that is returned. 1908 }, 1909 ], 1910 "quantityShipped": 42, # Number of items shipped. 1911 "quantityReturned": 42, # Number of items returned. 1912 "id": "A String", # The ID of the line item. 1913 "shippingDetails": { # Details of the requested shipping for the line item. 1914 "deliverByDate": "A String", # The delivery by date, in ISO 8601 format. 1915 "method": { # Details of the shipping method. 1916 "minDaysInTransit": 42, # Minimum transit time. 1917 "carrier": "A String", # The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values. 1918 "methodName": "A String", # The name of the shipping method. 1919 "maxDaysInTransit": 42, # Maximum transit time. 1920 }, 1921 "shipByDate": "A String", # The ship by date, in ISO 8601 format. 1922 }, 1923 }, 1924 ], 1925 "netAmount": { # The net amount for the order. For example, if an order was originally for a grand total of $100 and a refund was issued for $20, the net amount will be $80. 1926 "currency": "A String", # The currency of the price. 1927 "value": "A String", # The price represented as a number. 1928 }, 1929 "id": "A String", # The REST ID of the order. Globally unique. 1930 }, 1931 ], 1932 }</pre> 1933</div> 1934 1935<div class="method"> 1936 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 1937 <pre>Retrieves the next page of results. 1938 1939Args: 1940 previous_request: The request for the previous page. (required) 1941 previous_response: The response from the request for the previous page. (required) 1942 1943Returns: 1944 A request object that you can call 'execute()' on to request the next 1945 page. Returns None if there are no more items in the collection. 1946 </pre> 1947</div> 1948 1949<div class="method"> 1950 <code class="details" id="refund">refund(merchantId, orderId, body)</code> 1951 <pre>Deprecated, please use returnRefundLineItem instead. 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 to refund. (required) 1956 body: object, The request body. (required) 1957 The object takes the form of: 1958 1959{ 1960 "amountPretax": { # The amount that is refunded. Either amount or amountPretax should be filled. 1961 "currency": "A String", # The currency of the price. 1962 "value": "A String", # The price represented as a number. 1963 }, 1964 "amount": { # Deprecated. Please use amountPretax and amountTax instead. 1965 "currency": "A String", # The currency of the price. 1966 "value": "A String", # The price represented as a number. 1967 }, 1968 "reason": "A String", # The reason for the refund. 1969 "reasonText": "A String", # The explanation of the reason. 1970 "amountTax": { # Tax amount that corresponds to refund amount in amountPretax. Optional, but if filled, amountPretax must be set. Calculated automatically if not provided. 1971 "currency": "A String", # The currency of the price. 1972 "value": "A String", # The price represented as a number. 1973 }, 1974 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1975 } 1976 1977 1978Returns: 1979 An object of the form: 1980 1981 { 1982 "kind": "content#ordersRefundResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersRefundResponse". 1983 "executionStatus": "A String", # The status of the execution. 1984 }</pre> 1985</div> 1986 1987<div class="method"> 1988 <code class="details" id="rejectreturnlineitem">rejectreturnlineitem(merchantId, orderId, body)</code> 1989 <pre>Rejects return on an line item. 1990 1991Args: 1992 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 1993 orderId: string, The ID of the order. (required) 1994 body: object, The request body. (required) 1995 The object takes the form of: 1996 1997{ 1998 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 1999 "reason": "A String", # The reason for the return. 2000 "reasonText": "A String", # The explanation of the reason. 2001 "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. 2002 "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. 2003 "quantity": 42, # The quantity to return and refund. 2004 } 2005 2006 2007Returns: 2008 An object of the form: 2009 2010 { 2011 "kind": "content#ordersRejectReturnLineItemResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersRejectReturnLineItemResponse". 2012 "executionStatus": "A String", # The status of the execution. 2013 }</pre> 2014</div> 2015 2016<div class="method"> 2017 <code class="details" id="returnlineitem">returnlineitem(merchantId, orderId, body)</code> 2018 <pre>Returns a line item. 2019 2020Args: 2021 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 2022 orderId: string, The ID of the order. (required) 2023 body: object, The request body. (required) 2024 The object takes the form of: 2025 2026{ 2027 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 2028 "reason": "A String", # The reason for the return. 2029 "reasonText": "A String", # The explanation of the reason. 2030 "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. 2031 "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. 2032 "quantity": 42, # The quantity to return. 2033 } 2034 2035 2036Returns: 2037 An object of the form: 2038 2039 { 2040 "kind": "content#ordersReturnLineItemResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersReturnLineItemResponse". 2041 "executionStatus": "A String", # The status of the execution. 2042 }</pre> 2043</div> 2044 2045<div class="method"> 2046 <code class="details" id="returnrefundlineitem">returnrefundlineitem(merchantId, orderId, body)</code> 2047 <pre>Returns and refunds a line item. Note that this method can only be called on fully shipped orders. 2048 2049Args: 2050 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 2051 orderId: string, The ID of the order. (required) 2052 body: object, The request body. (required) 2053 The object takes the form of: 2054 2055{ 2056 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 2057 "reason": "A String", # The reason for the return. 2058 "amountPretax": { # The amount that is refunded. If omitted, refundless return is assumed (same as calling returnLineItem method). 2059 "currency": "A String", # The currency of the price. 2060 "value": "A String", # The price represented as a number. 2061 }, 2062 "reasonText": "A String", # The explanation of the reason. 2063 "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. 2064 "amountTax": { # Tax amount that corresponds to refund amount in amountPretax. Optional, but if filled, then amountPretax must be set. Calculated automatically if not provided. 2065 "currency": "A String", # The currency of the price. 2066 "value": "A String", # The price represented as a number. 2067 }, 2068 "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. 2069 "quantity": 42, # The quantity to return and refund. 2070 } 2071 2072 2073Returns: 2074 An object of the form: 2075 2076 { 2077 "kind": "content#ordersReturnRefundLineItemResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersReturnRefundLineItemResponse". 2078 "executionStatus": "A String", # The status of the execution. 2079 }</pre> 2080</div> 2081 2082<div class="method"> 2083 <code class="details" id="setlineitemmetadata">setlineitemmetadata(merchantId, orderId, body)</code> 2084 <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. 2085 2086Args: 2087 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 2088 orderId: string, The ID of the order. (required) 2089 body: object, The request body. (required) 2090 The object takes the form of: 2091 2092{ 2093 "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. 2094 "annotations": [ 2095 { 2096 "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. 2097 "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. 2098 }, 2099 ], 2100 "lineItemId": "A String", # The ID of the line item to set metadata. Either lineItemId or productId is required. 2101 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 2102 } 2103 2104 2105Returns: 2106 An object of the form: 2107 2108 { 2109 "kind": "content#ordersSetLineItemMetadataResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersSetLineItemMetadataResponse". 2110 "executionStatus": "A String", # The status of the execution. 2111 }</pre> 2112</div> 2113 2114<div class="method"> 2115 <code class="details" id="shiplineitems">shiplineitems(merchantId, orderId, body)</code> 2116 <pre>Marks line item(s) as shipped. 2117 2118Args: 2119 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 2120 orderId: string, The ID of the order. (required) 2121 body: object, The request body. (required) 2122 The object takes the form of: 2123 2124{ 2125 "shipmentGroupId": "A String", # ID of the shipment group. Required for orders that use the orderinvoices service. 2126 "shipmentInfos": [ # Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs). 2127 { 2128 "carrier": "A String", # The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values. 2129 "trackingId": "A String", # The tracking ID for the shipment. 2130 "shipmentId": "A String", # The ID of the shipment. This is assigned by the merchant and is unique to each shipment. 2131 }, 2132 ], 2133 "carrier": "A String", # Deprecated. Please use shipmentInfo instead. The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values. 2134 "trackingId": "A String", # Deprecated. Please use shipmentInfo instead. The tracking ID for the shipment. 2135 "shipmentId": "A String", # Deprecated. Please use shipmentInfo instead. The ID of the shipment. 2136 "lineItems": [ # Line items to ship. 2137 { 2138 "quantity": 42, # The quantity that is shipped. 2139 "lineItemId": "A String", # The ID of the line item that is shipped. Either lineItemId or productId is required. 2140 "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. 2141 }, 2142 ], 2143 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 2144 } 2145 2146 2147Returns: 2148 An object of the form: 2149 2150 { 2151 "kind": "content#ordersShipLineItemsResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersShipLineItemsResponse". 2152 "executionStatus": "A String", # The status of the execution. 2153 }</pre> 2154</div> 2155 2156<div class="method"> 2157 <code class="details" id="updatelineitemshippingdetails">updatelineitemshippingdetails(merchantId, orderId, body)</code> 2158 <pre>Updates ship by and delivery by dates for a line item. 2159 2160Args: 2161 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 2162 orderId: string, The ID of the order. (required) 2163 body: object, The request body. (required) 2164 The object takes the form of: 2165 2166{ 2167 "deliverByDate": "A String", # Updated delivery by date, in ISO 8601 format. If not specified only ship by date is updated. 2168 # 2169 # Provided date should be within 1 year timeframe and can not be a date in the past. 2170 "shipByDate": "A String", # Updated ship by date, in ISO 8601 format. If not specified only deliver by date is updated. 2171 # 2172 # Provided date should be within 1 year timeframe and can not be a date in the past. 2173 "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. 2174 "lineItemId": "A String", # The ID of the line item to set metadata. Either lineItemId or productId is required. 2175 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 2176 } 2177 2178 2179Returns: 2180 An object of the form: 2181 2182 { 2183 "kind": "content#ordersUpdateLineItemShippingDetailsResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersUpdateLineItemShippingDetailsResponse". 2184 "executionStatus": "A String", # The status of the execution. 2185 }</pre> 2186</div> 2187 2188<div class="method"> 2189 <code class="details" id="updatemerchantorderid">updatemerchantorderid(merchantId, orderId, body)</code> 2190 <pre>Updates the merchant order ID for a given order. 2191 2192Args: 2193 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 2194 orderId: string, The ID of the order. (required) 2195 body: object, The request body. (required) 2196 The object takes the form of: 2197 2198{ 2199 "merchantOrderId": "A String", # The merchant order id to be assigned to the order. Must be unique per merchant. 2200 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 2201 } 2202 2203 2204Returns: 2205 An object of the form: 2206 2207 { 2208 "kind": "content#ordersUpdateMerchantOrderIdResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersUpdateMerchantOrderIdResponse". 2209 "executionStatus": "A String", # The status of the execution. 2210 }</pre> 2211</div> 2212 2213<div class="method"> 2214 <code class="details" id="updateshipment">updateshipment(merchantId, orderId, body)</code> 2215 <pre>Updates a shipment's status, carrier, and/or tracking ID. 2216 2217Args: 2218 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 2219 orderId: string, The ID of the order. (required) 2220 body: object, The request body. (required) 2221 The object takes the form of: 2222 2223{ 2224 "status": "A String", # New status for the shipment. Not updated if missing. 2225 "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. 2226 "trackingId": "A String", # The tracking ID for the shipment. Not updated if missing. 2227 "shipmentId": "A String", # The ID of the shipment. 2228 "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. 2229 "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. 2230 } 2231 2232 2233Returns: 2234 An object of the form: 2235 2236 { 2237 "kind": "content#ordersUpdateShipmentResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersUpdateShipmentResponse". 2238 "executionStatus": "A String", # The status of the execution. 2239 }</pre> 2240</div> 2241 2242</body></html>