blob: f1975d7ff1354d7e2fa6e3a747feb8ea7f7d4950 [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="content_v2.html">Content API for Shopping</a> . <a href="content_v2.orderreturns.html">orderreturns</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#get">get(merchantId, returnId)</a></code></p>
<p class="firstline">Retrieves an order return from your Merchant Center account.</p>
<p class="toc_element">
<code><a href="#list">list(merchantId, createdEndDate=None, createdStartDate=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
<p class="firstline">Lists order returns in your Merchant Center account.</p>
<p class="toc_element">
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="get">get(merchantId, returnId)</code>
<pre>Retrieves an order return from your Merchant Center account.
Args:
merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required)
returnId: string, Merchant order return ID generated by Google. (required)
Returns:
An object of the form:
{ # Order return. Production access (all methods) requires the order manager role. Sandbox access does not.
&quot;creationDate&quot;: &quot;A String&quot;, # The date of creation of the return, in ISO 8601 format.
&quot;merchantOrderId&quot;: &quot;A String&quot;, # Merchant defined order ID.
&quot;orderId&quot;: &quot;A String&quot;, # Google order ID.
&quot;orderReturnId&quot;: &quot;A String&quot;, # Order return ID generated by Google.
&quot;returnItems&quot;: [ # Items of the return.
{
&quot;customerReturnReason&quot;: { # The reason that the customer chooses to return an item.
&quot;description&quot;: &quot;A String&quot;, # Description of the reason.
&quot;reasonCode&quot;: &quot;A String&quot;, # Code of the return reason.
#
# Acceptable values are:
# - &quot;`betterPriceFound`&quot;
# - &quot;`changedMind`&quot;
# - &quot;`damagedOrDefectiveItem`&quot;
# - &quot;`didNotMatchDescription`&quot;
# - &quot;`doesNotFit`&quot;
# - &quot;`expiredItem`&quot;
# - &quot;`incorrectItemReceived`&quot;
# - &quot;`noLongerNeeded`&quot;
# - &quot;`notSpecified`&quot;
# - &quot;`orderedWrongItem`&quot;
# - &quot;`other`&quot;
# - &quot;`qualityNotExpected`&quot;
# - &quot;`receivedTooLate`&quot;
# - &quot;`undeliverable`&quot;
},
&quot;itemId&quot;: &quot;A String&quot;, # Product level item ID. If the returned items are of the same product, they will have the same ID.
&quot;merchantReturnReason&quot;: { # The reason that merchant chooses to accept a return item.
&quot;description&quot;: &quot;A String&quot;, # Description of the reason.
&quot;reasonCode&quot;: &quot;A String&quot;, # Code of the refund reason.
#
# Acceptable values are:
# - &quot;`adjustment`&quot;
# - &quot;`autoPostInternal`&quot;
# - &quot;`autoPostInvalidBillingAddress`&quot;
# - &quot;`autoPostNoInventory`&quot;
# - &quot;`autoPostPriceError`&quot;
# - &quot;`autoPostUndeliverableShippingAddress`&quot;
# - &quot;`couponAbuse`&quot;
# - &quot;`courtesyAdjustment`&quot;
# - &quot;`customerCanceled`&quot;
# - &quot;`customerDiscretionaryReturn`&quot;
# - &quot;`customerInitiatedMerchantCancel`&quot;
# - &quot;`customerSupportRequested`&quot;
# - &quot;`deliveredLateByCarrier`&quot;
# - &quot;`deliveredTooLate`&quot;
# - &quot;`expiredItem`&quot;
# - &quot;`failToPushOrderGoogleError`&quot;
# - &quot;`failToPushOrderMerchantError`&quot;
# - &quot;`failToPushOrderMerchantFulfillmentError`&quot;
# - &quot;`failToPushOrderToMerchant`&quot;
# - &quot;`failToPushOrderToMerchantOutOfStock`&quot;
# - &quot;`feeAdjustment`&quot;
# - &quot;`invalidCoupon`&quot;
# - &quot;`lateShipmentCredit`&quot;
# - &quot;`malformedShippingAddress`&quot;
# - &quot;`merchantDidNotShipOnTime`&quot;
# - &quot;`noInventory`&quot;
# - &quot;`orderTimeout`&quot;
# - &quot;`other`&quot;
# - &quot;`paymentAbuse`&quot;
# - &quot;`paymentDeclined`&quot;
# - &quot;`priceAdjustment`&quot;
# - &quot;`priceError`&quot;
# - &quot;`productArrivedDamaged`&quot;
# - &quot;`productNotAsDescribed`&quot;
# - &quot;`promoReallocation`&quot;
# - &quot;`qualityNotAsExpected`&quot;
# - &quot;`returnRefundAbuse`&quot;
# - &quot;`shippingCostAdjustment`&quot;
# - &quot;`shippingPriceError`&quot;
# - &quot;`taxAdjustment`&quot;
# - &quot;`taxError`&quot;
# - &quot;`undeliverableShippingAddress`&quot;
# - &quot;`unsupportedPoBoxAddress`&quot;
# - &quot;`wrongProductShipped`&quot;
},
&quot;product&quot;: { # Product data from the time of the order placement.
&quot;brand&quot;: &quot;A String&quot;, # Brand of the item.
&quot;channel&quot;: &quot;A String&quot;, # The item&#x27;s channel (online or local).
#
# Acceptable values are:
# - &quot;`local`&quot;
# - &quot;`online`&quot;
&quot;condition&quot;: &quot;A String&quot;, # Condition or state of the item.
#
# Acceptable values are:
# - &quot;`new`&quot;
# - &quot;`refurbished`&quot;
# - &quot;`used`&quot;
&quot;contentLanguage&quot;: &quot;A String&quot;, # The two-letter ISO 639-1 language code for the item.
&quot;fees&quot;: [ # Associated fees at order creation time.
{
&quot;amount&quot;: { # Amount of the fee.
&quot;currency&quot;: &quot;A String&quot;, # The currency of the price.
&quot;value&quot;: &quot;A String&quot;, # The price represented as a number.
},
&quot;name&quot;: &quot;A String&quot;, # Name of the fee.
},
],
&quot;gtin&quot;: &quot;A String&quot;, # Global Trade Item Number (GTIN) of the item.
&quot;id&quot;: &quot;A String&quot;, # The REST ID of the product.
&quot;imageLink&quot;: &quot;A String&quot;, # URL of an image of the item.
&quot;itemGroupId&quot;: &quot;A String&quot;, # Shared identifier for all variants of the same product.
&quot;mpn&quot;: &quot;A String&quot;, # Manufacturer Part Number (MPN) of the item.
&quot;offerId&quot;: &quot;A String&quot;, # An identifier of the item.
&quot;price&quot;: { # Price of the item.
&quot;currency&quot;: &quot;A String&quot;, # The currency of the price.
&quot;value&quot;: &quot;A String&quot;, # The price represented as a number.
},
&quot;shownImage&quot;: &quot;A String&quot;, # URL to the cached image shown to the user when order was placed.
&quot;targetCountry&quot;: &quot;A String&quot;, # The CLDR territory code of the target country of the product.
&quot;title&quot;: &quot;A String&quot;, # The title of the product.
&quot;variantAttributes&quot;: [ # 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.
{
&quot;dimension&quot;: &quot;A String&quot;, # The dimension of the variant.
&quot;value&quot;: &quot;A String&quot;, # The value for the dimension.
},
],
},
&quot;returnShipmentIds&quot;: [ # IDs of the return shipments that this return item belongs to.
&quot;A String&quot;,
],
&quot;state&quot;: &quot;A String&quot;, # State of the item.
#
# Acceptable values are:
# - &quot;`canceled`&quot;
# - &quot;`new`&quot;
# - &quot;`received`&quot;
# - &quot;`refunded`&quot;
# - &quot;`rejected`&quot;
},
],
&quot;returnShipments&quot;: [ # Shipments of the return.
{
&quot;creationDate&quot;: &quot;A String&quot;, # The date of creation of the shipment, in ISO 8601 format.
&quot;deliveryDate&quot;: &quot;A String&quot;, # The date of delivery of the shipment, in ISO 8601 format.
&quot;returnMethodType&quot;: &quot;A String&quot;, # Type of the return method.
#
# Acceptable values are:
# - &quot;`byMail`&quot;
# - &quot;`contactCustomerSupport`&quot;
# - &quot;`returnless`&quot;
&quot;shipmentId&quot;: &quot;A String&quot;, # Shipment ID generated by Google.
&quot;shipmentTrackingInfos&quot;: [ # Tracking information of the shipment. One return shipment might be handled by several shipping carriers sequentially.
{
&quot;carrier&quot;: &quot;A String&quot;, # The shipping carrier that handles the package.
#
# Acceptable values are:
# - &quot;`boxtal`&quot;
# - &quot;`bpost`&quot;
# - &quot;`chronopost`&quot;
# - &quot;`colisPrive`&quot;
# - &quot;`colissimo`&quot;
# - &quot;`cxt`&quot;
# - &quot;`deliv`&quot;
# - &quot;`dhl`&quot;
# - &quot;`dpd`&quot;
# - &quot;`dynamex`&quot;
# - &quot;`eCourier`&quot;
# - &quot;`easypost`&quot;
# - &quot;`efw`&quot;
# - &quot;`fedex`&quot;
# - &quot;`fedexSmartpost`&quot;
# - &quot;`geodis`&quot;
# - &quot;`gls`&quot;
# - &quot;`googleCourier`&quot;
# - &quot;`gsx`&quot;
# - &quot;`jdLogistics`&quot;
# - &quot;`laPoste`&quot;
# - &quot;`lasership`&quot;
# - &quot;`manual`&quot;
# - &quot;`mpx`&quot;
# - &quot;`onTrac`&quot;
# - &quot;`other`&quot;
# - &quot;`tnt`&quot;
# - &quot;`uds`&quot;
# - &quot;`ups`&quot;
# - &quot;`usps`&quot;
&quot;trackingNumber&quot;: &quot;A String&quot;, # The tracking number for the package.
},
],
&quot;shippingDate&quot;: &quot;A String&quot;, # The date of shipping of the shipment, in ISO 8601 format.
&quot;state&quot;: &quot;A String&quot;, # State of the shipment.
#
# Acceptable values are:
# - &quot;`completed`&quot;
# - &quot;`new`&quot;
# - &quot;`shipped`&quot;
# - &quot;`undeliverable`&quot;
# - &quot;`pending`&quot;
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(merchantId, createdEndDate=None, createdStartDate=None, maxResults=None, orderBy=None, pageToken=None)</code>
<pre>Lists order returns in your Merchant Center account.
Args:
merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required)
createdEndDate: string, Obtains order returns created before this date (inclusively), in ISO 8601 format.
createdStartDate: string, Obtains order returns created after this date (inclusively), in ISO 8601 format.
maxResults: integer, The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page.
orderBy: string, Return the results in the specified order.
Allowed values
returnCreationTimeAsc -
returnCreationTimeDesc -
pageToken: string, The token returned by the previous request.
Returns:
An object of the form:
{
&quot;kind&quot;: &quot;content#orderreturnsListResponse&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;content#orderreturnsListResponse&quot;.
&quot;nextPageToken&quot;: &quot;A String&quot;, # The token for the retrieval of the next page of returns.
&quot;resources&quot;: [
{ # Order return. Production access (all methods) requires the order manager role. Sandbox access does not.
&quot;creationDate&quot;: &quot;A String&quot;, # The date of creation of the return, in ISO 8601 format.
&quot;merchantOrderId&quot;: &quot;A String&quot;, # Merchant defined order ID.
&quot;orderId&quot;: &quot;A String&quot;, # Google order ID.
&quot;orderReturnId&quot;: &quot;A String&quot;, # Order return ID generated by Google.
&quot;returnItems&quot;: [ # Items of the return.
{
&quot;customerReturnReason&quot;: { # The reason that the customer chooses to return an item.
&quot;description&quot;: &quot;A String&quot;, # Description of the reason.
&quot;reasonCode&quot;: &quot;A String&quot;, # Code of the return reason.
#
# Acceptable values are:
# - &quot;`betterPriceFound`&quot;
# - &quot;`changedMind`&quot;
# - &quot;`damagedOrDefectiveItem`&quot;
# - &quot;`didNotMatchDescription`&quot;
# - &quot;`doesNotFit`&quot;
# - &quot;`expiredItem`&quot;
# - &quot;`incorrectItemReceived`&quot;
# - &quot;`noLongerNeeded`&quot;
# - &quot;`notSpecified`&quot;
# - &quot;`orderedWrongItem`&quot;
# - &quot;`other`&quot;
# - &quot;`qualityNotExpected`&quot;
# - &quot;`receivedTooLate`&quot;
# - &quot;`undeliverable`&quot;
},
&quot;itemId&quot;: &quot;A String&quot;, # Product level item ID. If the returned items are of the same product, they will have the same ID.
&quot;merchantReturnReason&quot;: { # The reason that merchant chooses to accept a return item.
&quot;description&quot;: &quot;A String&quot;, # Description of the reason.
&quot;reasonCode&quot;: &quot;A String&quot;, # Code of the refund reason.
#
# Acceptable values are:
# - &quot;`adjustment`&quot;
# - &quot;`autoPostInternal`&quot;
# - &quot;`autoPostInvalidBillingAddress`&quot;
# - &quot;`autoPostNoInventory`&quot;
# - &quot;`autoPostPriceError`&quot;
# - &quot;`autoPostUndeliverableShippingAddress`&quot;
# - &quot;`couponAbuse`&quot;
# - &quot;`courtesyAdjustment`&quot;
# - &quot;`customerCanceled`&quot;
# - &quot;`customerDiscretionaryReturn`&quot;
# - &quot;`customerInitiatedMerchantCancel`&quot;
# - &quot;`customerSupportRequested`&quot;
# - &quot;`deliveredLateByCarrier`&quot;
# - &quot;`deliveredTooLate`&quot;
# - &quot;`expiredItem`&quot;
# - &quot;`failToPushOrderGoogleError`&quot;
# - &quot;`failToPushOrderMerchantError`&quot;
# - &quot;`failToPushOrderMerchantFulfillmentError`&quot;
# - &quot;`failToPushOrderToMerchant`&quot;
# - &quot;`failToPushOrderToMerchantOutOfStock`&quot;
# - &quot;`feeAdjustment`&quot;
# - &quot;`invalidCoupon`&quot;
# - &quot;`lateShipmentCredit`&quot;
# - &quot;`malformedShippingAddress`&quot;
# - &quot;`merchantDidNotShipOnTime`&quot;
# - &quot;`noInventory`&quot;
# - &quot;`orderTimeout`&quot;
# - &quot;`other`&quot;
# - &quot;`paymentAbuse`&quot;
# - &quot;`paymentDeclined`&quot;
# - &quot;`priceAdjustment`&quot;
# - &quot;`priceError`&quot;
# - &quot;`productArrivedDamaged`&quot;
# - &quot;`productNotAsDescribed`&quot;
# - &quot;`promoReallocation`&quot;
# - &quot;`qualityNotAsExpected`&quot;
# - &quot;`returnRefundAbuse`&quot;
# - &quot;`shippingCostAdjustment`&quot;
# - &quot;`shippingPriceError`&quot;
# - &quot;`taxAdjustment`&quot;
# - &quot;`taxError`&quot;
# - &quot;`undeliverableShippingAddress`&quot;
# - &quot;`unsupportedPoBoxAddress`&quot;
# - &quot;`wrongProductShipped`&quot;
},
&quot;product&quot;: { # Product data from the time of the order placement.
&quot;brand&quot;: &quot;A String&quot;, # Brand of the item.
&quot;channel&quot;: &quot;A String&quot;, # The item&#x27;s channel (online or local).
#
# Acceptable values are:
# - &quot;`local`&quot;
# - &quot;`online`&quot;
&quot;condition&quot;: &quot;A String&quot;, # Condition or state of the item.
#
# Acceptable values are:
# - &quot;`new`&quot;
# - &quot;`refurbished`&quot;
# - &quot;`used`&quot;
&quot;contentLanguage&quot;: &quot;A String&quot;, # The two-letter ISO 639-1 language code for the item.
&quot;fees&quot;: [ # Associated fees at order creation time.
{
&quot;amount&quot;: { # Amount of the fee.
&quot;currency&quot;: &quot;A String&quot;, # The currency of the price.
&quot;value&quot;: &quot;A String&quot;, # The price represented as a number.
},
&quot;name&quot;: &quot;A String&quot;, # Name of the fee.
},
],
&quot;gtin&quot;: &quot;A String&quot;, # Global Trade Item Number (GTIN) of the item.
&quot;id&quot;: &quot;A String&quot;, # The REST ID of the product.
&quot;imageLink&quot;: &quot;A String&quot;, # URL of an image of the item.
&quot;itemGroupId&quot;: &quot;A String&quot;, # Shared identifier for all variants of the same product.
&quot;mpn&quot;: &quot;A String&quot;, # Manufacturer Part Number (MPN) of the item.
&quot;offerId&quot;: &quot;A String&quot;, # An identifier of the item.
&quot;price&quot;: { # Price of the item.
&quot;currency&quot;: &quot;A String&quot;, # The currency of the price.
&quot;value&quot;: &quot;A String&quot;, # The price represented as a number.
},
&quot;shownImage&quot;: &quot;A String&quot;, # URL to the cached image shown to the user when order was placed.
&quot;targetCountry&quot;: &quot;A String&quot;, # The CLDR territory code of the target country of the product.
&quot;title&quot;: &quot;A String&quot;, # The title of the product.
&quot;variantAttributes&quot;: [ # 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.
{
&quot;dimension&quot;: &quot;A String&quot;, # The dimension of the variant.
&quot;value&quot;: &quot;A String&quot;, # The value for the dimension.
},
],
},
&quot;returnShipmentIds&quot;: [ # IDs of the return shipments that this return item belongs to.
&quot;A String&quot;,
],
&quot;state&quot;: &quot;A String&quot;, # State of the item.
#
# Acceptable values are:
# - &quot;`canceled`&quot;
# - &quot;`new`&quot;
# - &quot;`received`&quot;
# - &quot;`refunded`&quot;
# - &quot;`rejected`&quot;
},
],
&quot;returnShipments&quot;: [ # Shipments of the return.
{
&quot;creationDate&quot;: &quot;A String&quot;, # The date of creation of the shipment, in ISO 8601 format.
&quot;deliveryDate&quot;: &quot;A String&quot;, # The date of delivery of the shipment, in ISO 8601 format.
&quot;returnMethodType&quot;: &quot;A String&quot;, # Type of the return method.
#
# Acceptable values are:
# - &quot;`byMail`&quot;
# - &quot;`contactCustomerSupport`&quot;
# - &quot;`returnless`&quot;
&quot;shipmentId&quot;: &quot;A String&quot;, # Shipment ID generated by Google.
&quot;shipmentTrackingInfos&quot;: [ # Tracking information of the shipment. One return shipment might be handled by several shipping carriers sequentially.
{
&quot;carrier&quot;: &quot;A String&quot;, # The shipping carrier that handles the package.
#
# Acceptable values are:
# - &quot;`boxtal`&quot;
# - &quot;`bpost`&quot;
# - &quot;`chronopost`&quot;
# - &quot;`colisPrive`&quot;
# - &quot;`colissimo`&quot;
# - &quot;`cxt`&quot;
# - &quot;`deliv`&quot;
# - &quot;`dhl`&quot;
# - &quot;`dpd`&quot;
# - &quot;`dynamex`&quot;
# - &quot;`eCourier`&quot;
# - &quot;`easypost`&quot;
# - &quot;`efw`&quot;
# - &quot;`fedex`&quot;
# - &quot;`fedexSmartpost`&quot;
# - &quot;`geodis`&quot;
# - &quot;`gls`&quot;
# - &quot;`googleCourier`&quot;
# - &quot;`gsx`&quot;
# - &quot;`jdLogistics`&quot;
# - &quot;`laPoste`&quot;
# - &quot;`lasership`&quot;
# - &quot;`manual`&quot;
# - &quot;`mpx`&quot;
# - &quot;`onTrac`&quot;
# - &quot;`other`&quot;
# - &quot;`tnt`&quot;
# - &quot;`uds`&quot;
# - &quot;`ups`&quot;
# - &quot;`usps`&quot;
&quot;trackingNumber&quot;: &quot;A String&quot;, # The tracking number for the package.
},
],
&quot;shippingDate&quot;: &quot;A String&quot;, # The date of shipping of the shipment, in ISO 8601 format.
&quot;state&quot;: &quot;A String&quot;, # State of the shipment.
#
# Acceptable values are:
# - &quot;`completed`&quot;
# - &quot;`new`&quot;
# - &quot;`shipped`&quot;
# - &quot;`undeliverable`&quot;
# - &quot;`pending`&quot;
},
],
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next(previous_request, previous_response)</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
</body></html>