Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="content_v2_1.html">Content API for Shopping</a> . <a href="content_v2_1.orders.html">orders</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <code><a href="#acknowledge">acknowledge(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 82 | <p class="firstline">Sandbox only. Moves a test order from state "`inProgress`" to state "`pendingShipment`".</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 83 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 84 | <code><a href="#cancel">cancel(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 85 | <p class="firstline">Cancels all line items in an order, making a full refund.</p> |
| 86 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 87 | <code><a href="#cancellineitem">cancellineitem(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 88 | <p class="firstline">Cancels a line item, making a full refund.</p> |
| 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code><a href="#canceltestorderbycustomer">canceltestorderbycustomer(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 91 | <p class="firstline">Sandbox only. Cancels a test order for customer-initiated cancellation.</p> |
| 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#createtestorder">createtestorder(merchantId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <p class="firstline">Sandbox only. Creates a test order.</p> |
| 95 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 96 | <code><a href="#createtestreturn">createtestreturn(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <p class="firstline">Sandbox only. Creates a test return.</p> |
| 98 | <p class="toc_element"> |
| 99 | <code><a href="#get">get(merchantId, orderId)</a></code></p> |
| 100 | <p class="firstline">Retrieves an order from your Merchant Center account.</p> |
| 101 | <p class="toc_element"> |
| 102 | <code><a href="#getbymerchantorderid">getbymerchantorderid(merchantId, merchantOrderId)</a></code></p> |
| 103 | <p class="firstline">Retrieves an order using merchant order ID.</p> |
| 104 | <p class="toc_element"> |
| 105 | <code><a href="#gettestordertemplate">gettestordertemplate(merchantId, templateName, country=None)</a></code></p> |
| 106 | <p class="firstline">Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.</p> |
| 107 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 108 | <code><a href="#instorerefundlineitem">instorerefundlineitem(merchantId, orderId, body=None)</a></code></p> |
| 109 | <p class="firstline">Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store).</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 110 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 111 | <code><a href="#list">list(merchantId, acknowledged=None, maxResults=None, orderBy=None, pageToken=None, placedDateEnd=None, placedDateStart=None, statuses=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 112 | <p class="firstline">Lists the orders in your Merchant Center account.</p> |
| 113 | <p class="toc_element"> |
| 114 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 115 | <p class="firstline">Retrieves the next page of results.</p> |
| 116 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 117 | <code><a href="#rejectreturnlineitem">rejectreturnlineitem(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 118 | <p class="firstline">Rejects return on an line item.</p> |
| 119 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 120 | <code><a href="#returnrefundlineitem">returnrefundlineitem(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 121 | <p class="firstline">Returns and refunds a line item. Note that this method can only be called on fully shipped orders.</p> |
| 122 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 123 | <code><a href="#setlineitemmetadata">setlineitemmetadata(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 124 | <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> |
| 125 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 126 | <code><a href="#shiplineitems">shiplineitems(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 127 | <p class="firstline">Marks line item(s) as shipped.</p> |
| 128 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 129 | <code><a href="#updatelineitemshippingdetails">updatelineitemshippingdetails(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 130 | <p class="firstline">Updates ship by and delivery by dates for a line item.</p> |
| 131 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 132 | <code><a href="#updatemerchantorderid">updatemerchantorderid(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 133 | <p class="firstline">Updates the merchant order ID for a given order.</p> |
| 134 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 135 | <code><a href="#updateshipment">updateshipment(merchantId, orderId, body=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 136 | <p class="firstline">Updates a shipment's status, carrier, and/or tracking ID.</p> |
| 137 | <h3>Method Details</h3> |
| 138 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 139 | <code class="details" id="acknowledge">acknowledge(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 140 | <pre>Marks an order as acknowledged. |
| 141 | |
| 142 | Args: |
| 143 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 144 | orderId: string, The ID of the order. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 145 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 146 | The object takes the form of: |
| 147 | |
| 148 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 149 | "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | |
| 153 | Returns: |
| 154 | An object of the form: |
| 155 | |
| 156 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 157 | "executionStatus": "A String", # The status of the execution. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 158 | # |
| 159 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 160 | # - "`duplicate`" |
| 161 | # - "`executed`" |
| 162 | "kind": "content#ordersAcknowledgeResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersAcknowledgeResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 163 | }</pre> |
| 164 | </div> |
| 165 | |
| 166 | <div class="method"> |
| 167 | <code class="details" id="advancetestorder">advancetestorder(merchantId, orderId)</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 168 | <pre>Sandbox only. Moves a test order from state "`inProgress`" to state "`pendingShipment`". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 169 | |
| 170 | Args: |
| 171 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 172 | orderId: string, The ID of the test order to modify. (required) |
| 173 | |
| 174 | Returns: |
| 175 | An object of the form: |
| 176 | |
| 177 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 178 | "kind": "content#ordersAdvanceTestOrderResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersAdvanceTestOrderResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 179 | }</pre> |
| 180 | </div> |
| 181 | |
| 182 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 183 | <code class="details" id="cancel">cancel(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 184 | <pre>Cancels all line items in an order, making a full refund. |
| 185 | |
| 186 | Args: |
| 187 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 188 | orderId: string, The ID of the order to cancel. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 189 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 190 | The object takes the form of: |
| 191 | |
| 192 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 193 | "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. |
| 194 | "reason": "A String", # The reason for the cancellation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 195 | # |
| 196 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 197 | # - "`customerInitiatedCancel`" |
| 198 | # - "`invalidCoupon`" |
| 199 | # - "`malformedShippingAddress`" |
| 200 | # - "`noInventory`" |
| 201 | # - "`other`" |
| 202 | # - "`priceError`" |
| 203 | # - "`shippingPriceError`" |
| 204 | # - "`taxError`" |
| 205 | # - "`undeliverableShippingAddress`" |
| 206 | # - "`unsupportedPoBoxAddress`" |
| 207 | "reasonText": "A String", # The explanation of the reason. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | |
| 211 | Returns: |
| 212 | An object of the form: |
| 213 | |
| 214 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 215 | "executionStatus": "A String", # The status of the execution. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 216 | # |
| 217 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 218 | # - "`duplicate`" |
| 219 | # - "`executed`" |
| 220 | "kind": "content#ordersCancelResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCancelResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 221 | }</pre> |
| 222 | </div> |
| 223 | |
| 224 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 225 | <code class="details" id="cancellineitem">cancellineitem(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 226 | <pre>Cancels a line item, making a full refund. |
| 227 | |
| 228 | Args: |
| 229 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 230 | orderId: string, The ID of the order. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 231 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 232 | The object takes the form of: |
| 233 | |
| 234 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 235 | "lineItemId": "A String", # The ID of the line item to cancel. Either lineItemId or productId is required. |
| 236 | "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. |
| 237 | "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. |
| 238 | "quantity": 42, # The quantity to cancel. |
| 239 | "reason": "A String", # The reason for the cancellation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 240 | # |
| 241 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 242 | # - "`customerInitiatedCancel`" |
| 243 | # - "`invalidCoupon`" |
| 244 | # - "`malformedShippingAddress`" |
| 245 | # - "`noInventory`" |
| 246 | # - "`other`" |
| 247 | # - "`priceError`" |
| 248 | # - "`shippingPriceError`" |
| 249 | # - "`taxError`" |
| 250 | # - "`undeliverableShippingAddress`" |
| 251 | # - "`unsupportedPoBoxAddress`" |
| 252 | "reasonText": "A String", # The explanation of the reason. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 253 | } |
| 254 | |
| 255 | |
| 256 | Returns: |
| 257 | An object of the form: |
| 258 | |
| 259 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 260 | "executionStatus": "A String", # The status of the execution. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 261 | # |
| 262 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 263 | # - "`duplicate`" |
| 264 | # - "`executed`" |
| 265 | "kind": "content#ordersCancelLineItemResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCancelLineItemResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 266 | }</pre> |
| 267 | </div> |
| 268 | |
| 269 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 270 | <code class="details" id="canceltestorderbycustomer">canceltestorderbycustomer(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 271 | <pre>Sandbox only. Cancels a test order for customer-initiated cancellation. |
| 272 | |
| 273 | Args: |
| 274 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 275 | orderId: string, The ID of the test order to cancel. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 276 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 277 | The object takes the form of: |
| 278 | |
| 279 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 280 | "reason": "A String", # The reason for the cancellation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 281 | # |
| 282 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 283 | # - "`changedMind`" |
| 284 | # - "`orderedWrongItem`" |
| 285 | # - "`other`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 286 | } |
| 287 | |
| 288 | |
| 289 | Returns: |
| 290 | An object of the form: |
| 291 | |
| 292 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 293 | "kind": "content#ordersCancelTestOrderByCustomerResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCancelTestOrderByCustomerResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 294 | }</pre> |
| 295 | </div> |
| 296 | |
| 297 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 298 | <code class="details" id="createtestorder">createtestorder(merchantId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 299 | <pre>Sandbox only. Creates a test order. |
| 300 | |
| 301 | Args: |
| 302 | merchantId: string, The ID of the account that should manage the order. This cannot be a multi-client account. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 303 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 304 | The object takes the form of: |
| 305 | |
| 306 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 307 | "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`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 308 | # |
| 309 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 310 | # - "`US`" |
| 311 | # - "`FR`" Defaults to `US`. |
| 312 | "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. |
| 313 | # |
| 314 | # Acceptable values are: |
| 315 | # - "`template1`" |
| 316 | # - "`template1a`" |
| 317 | # - "`template1b`" |
| 318 | # - "`template2`" |
| 319 | # - "`template3`" |
| 320 | "testOrder": { # The test order to create. |
| 321 | "enableOrderinvoices": True or False, # Whether the orderinvoices service should support this order. |
| 322 | "kind": "content#testOrder", # Identifies what kind of resource this is. Value: the fixed string "`content#testOrder`" |
| 323 | "lineItems": [ # Required. Line items that are ordered. At least one line item must be provided. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 324 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 325 | "product": { # Required. Product data from the time of the order placement. |
| 326 | "brand": "A String", # Required. Brand of the item. |
| 327 | "condition": "A String", # Required. Condition or state of the item. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 328 | # |
| 329 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 330 | # - "`new`" |
| 331 | "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. |
| 332 | # |
| 333 | # Acceptable values are: |
| 334 | # - "`en`" |
| 335 | # - "`fr`" |
| 336 | "fees": [ # Fees for the item. Optional. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 337 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 338 | "amount": { # Amount of the fee. |
| 339 | "currency": "A String", # The currency of the price. |
| 340 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 341 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 342 | "name": "A String", # Name of the fee. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 343 | }, |
| 344 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 345 | "gtin": "A String", # Global Trade Item Number (GTIN) of the item. Optional. |
| 346 | "imageLink": "A String", # Required. URL of an image of the item. |
| 347 | "itemGroupId": "A String", # Shared identifier for all variants of the same product. Optional. |
| 348 | "mpn": "A String", # Manufacturer Part Number (MPN) of the item. Optional. |
| 349 | "offerId": "A String", # Required. An identifier of the item. |
| 350 | "price": { # Required. The price for the product. Tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied. |
| 351 | "currency": "A String", # The currency of the price. |
| 352 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 353 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 354 | "targetCountry": "A String", # Required. The CLDR territory code of the target country of the product. |
| 355 | "title": "A String", # Required. The title of the product. |
| 356 | "variantAttributes": [ # Variant attributes for the item. Optional. |
| 357 | { |
| 358 | "dimension": "A String", # The dimension of the variant. |
| 359 | "value": "A String", # The value for the dimension. |
| 360 | }, |
| 361 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 362 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 363 | "quantityOrdered": 42, # Required. Number of items ordered. |
| 364 | "returnInfo": { # Required. Details of the return policy for the line item. |
| 365 | "daysToReturn": 42, # Required. How many days later the item can be returned. |
| 366 | "isReturnable": True or False, # Required. Whether the item is returnable. |
| 367 | "policyUrl": "A String", # Required. URL of the item return policy. |
| 368 | }, |
| 369 | "shippingDetails": { # Required. Details of the requested shipping for the line item. |
| 370 | "deliverByDate": "A String", # Required. The delivery by date, in ISO 8601 format. |
| 371 | "method": { # Required. Details of the shipping method. |
| 372 | "carrier": "A String", # The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values. |
| 373 | "maxDaysInTransit": 42, # Required. Maximum transit time. |
| 374 | "methodName": "A String", # Required. The name of the shipping method. |
| 375 | "minDaysInTransit": 42, # Required. Minimum transit time. |
| 376 | }, |
| 377 | "shipByDate": "A String", # Required. The ship by date, in ISO 8601 format. |
| 378 | "type": "A String", # Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 379 | # |
| 380 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 381 | # - "`delivery`" |
| 382 | # - "`pickup`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 383 | }, |
| 384 | }, |
| 385 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 386 | "notificationMode": "A String", # Restricted. Do not use. |
| 387 | "predefinedBillingAddress": "A String", # Required. The billing address. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 388 | # |
| 389 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 390 | # - "`dwight`" |
| 391 | # - "`jim`" |
| 392 | # - "`pam`" |
| 393 | "predefinedDeliveryAddress": "A String", # Required. Identifier of one of the predefined delivery addresses for the delivery. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 394 | # |
| 395 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 396 | # - "`dwight`" |
| 397 | # - "`jim`" |
| 398 | # - "`pam`" |
| 399 | "predefinedEmail": "A String", # Required. Email address of the customer. |
| 400 | # |
| 401 | # Acceptable values are: |
| 402 | # - "`pog.dwight.schrute@gmail.com`" |
| 403 | # - "`pog.jim.halpert@gmail.com`" |
| 404 | # - "`penpog.pam.beesly@gmail.comding`" |
| 405 | "predefinedPickupDetails": "A String", # Identifier of one of the predefined pickup details. Required for orders containing line items with shipping type `pickup`. |
| 406 | # |
| 407 | # Acceptable values are: |
| 408 | # - "`dwight`" |
| 409 | # - "`jim`" |
| 410 | # - "`pam`" |
| 411 | "promotions": [ # Promotions associated with the order. |
| 412 | { |
| 413 | "applicableItems": [ # Items which this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. |
| 414 | { |
| 415 | "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. |
| 416 | "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. |
| 417 | "productId": "A String", # `orders.createtestorder`. |
| 418 | "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. |
| 419 | }, |
| 420 | ], |
| 421 | "appliedItems": [ # Items which this promotion have been applied to. Do not provide for `orders.createtestorder`. |
| 422 | { |
| 423 | "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. |
| 424 | "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. |
| 425 | "productId": "A String", # `orders.createtestorder`. |
| 426 | "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. |
| 427 | }, |
| 428 | ], |
| 429 | "endTime": "A String", # Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". |
| 430 | "funder": "A String", # Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. |
| 431 | # |
| 432 | # Acceptable values are: |
| 433 | # - "`google`" |
| 434 | # - "`merchant`" |
| 435 | "merchantPromotionId": "A String", # Required. This field is used to identify promotions within merchants' own systems. |
| 436 | "priceValue": { # Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. |
| 437 | "currency": "A String", # The currency of the price. |
| 438 | "value": "A String", # The price represented as a number. |
| 439 | }, |
| 440 | "shortTitle": "A String", # A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`. |
| 441 | "startTime": "A String", # Promotion start time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". |
| 442 | "subtype": "A String", # Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. |
| 443 | # |
| 444 | # Acceptable values are: |
| 445 | # - "`buyMGetMoneyOff`" |
| 446 | # - "`buyMGetNMoneyOff`" |
| 447 | # - "`buyMGetNPercentOff`" |
| 448 | # - "`buyMGetPercentOff`" |
| 449 | # - "`freeGift`" |
| 450 | # - "`freeGiftWithItemId`" |
| 451 | # - "`freeGiftWithValue`" |
| 452 | # - "`freeShippingOvernight`" |
| 453 | # - "`freeShippingStandard`" |
| 454 | # - "`freeShippingTwoDay`" |
| 455 | # - "`moneyOff`" |
| 456 | # - "`percentOff`" |
| 457 | # - "`rewardPoints`" |
| 458 | # - "`salePrice`" |
| 459 | "taxValue": { # Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`. |
| 460 | "currency": "A String", # The currency of the price. |
| 461 | "value": "A String", # The price represented as a number. |
| 462 | }, |
| 463 | "title": "A String", # Required. The title of the promotion. |
| 464 | "type": "A String", # Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. |
| 465 | # |
| 466 | # Acceptable values are: |
| 467 | # - "`product`" |
| 468 | # - "`shipping`" |
| 469 | }, |
| 470 | ], |
| 471 | "shippingCost": { # Required. The price of shipping for all items. Shipping tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied. Note that shipping is not taxed in certain states. |
| 472 | "currency": "A String", # The currency of the price. |
| 473 | "value": "A String", # The price represented as a number. |
| 474 | }, |
| 475 | "shippingOption": "A String", # Required. The requested shipping option. |
| 476 | # |
| 477 | # Acceptable values are: |
| 478 | # - "`economy`" |
| 479 | # - "`expedited`" |
| 480 | # - "`oneDay`" |
| 481 | # - "`sameDay`" |
| 482 | # - "`standard`" |
| 483 | # - "`twoDay`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 484 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 485 | } |
| 486 | |
| 487 | |
| 488 | Returns: |
| 489 | An object of the form: |
| 490 | |
| 491 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 492 | "kind": "content#ordersCreateTestOrderResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCreateTestOrderResponse". |
| 493 | "orderId": "A String", # The ID of the newly created test order. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 494 | }</pre> |
| 495 | </div> |
| 496 | |
| 497 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 498 | <code class="details" id="createtestreturn">createtestreturn(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 499 | <pre>Sandbox only. Creates a test return. |
| 500 | |
| 501 | Args: |
| 502 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 503 | orderId: string, The ID of the order. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 504 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 505 | The object takes the form of: |
| 506 | |
| 507 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 508 | "items": [ # Returned items. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 509 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 510 | "lineItemId": "A String", # The ID of the line item to return. |
| 511 | "quantity": 42, # Quantity that is returned. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 512 | }, |
| 513 | ], |
| 514 | } |
| 515 | |
| 516 | |
| 517 | Returns: |
| 518 | An object of the form: |
| 519 | |
| 520 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 521 | "kind": "content#ordersCreateTestReturnResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersCreateTestReturnResponse". |
| 522 | "returnId": "A String", # The ID of the newly created test order return. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 523 | }</pre> |
| 524 | </div> |
| 525 | |
| 526 | <div class="method"> |
| 527 | <code class="details" id="get">get(merchantId, orderId)</code> |
| 528 | <pre>Retrieves an order from your Merchant Center account. |
| 529 | |
| 530 | Args: |
| 531 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 532 | orderId: string, The ID of the order. (required) |
| 533 | |
| 534 | Returns: |
| 535 | An object of the form: |
| 536 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 537 | { # Order. Production access (all methods) requires the order manager role. Sandbox access does not. (== resource_for v2.orders ==) (== resource_for v2.1.orders ==) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 538 | "acknowledged": True or False, # Whether the order was acknowledged. |
| 539 | "billingAddress": { # The billing address. |
| 540 | "country": "A String", # CLDR country code (e.g. "US"). |
| 541 | "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: |
| 542 | # John Smith |
| 543 | # 1600 Amphitheatre Parkway |
| 544 | # Mountain View, CA, 94043 |
| 545 | # United States |
| 546 | "A String", |
| 547 | ], |
| 548 | "isPostOfficeBox": True or False, # Whether the address is a post office box. |
| 549 | "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). |
| 550 | "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). |
| 551 | "recipientName": "A String", # Name of the recipient. |
| 552 | "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). |
| 553 | "streetAddress": [ # Street-level part of the address. |
| 554 | "A String", |
| 555 | ], |
| 556 | }, |
| 557 | "customer": { # The details of the customer who placed the order. |
| 558 | "fullName": "A String", # Full name of the customer. |
| 559 | "invoiceReceivingEmail": "A String", # Email address for the merchant to send value-added tax or invoice documentation of the order. Only the last document sent is made available to the customer. For more information, see About automated VAT invoicing for Shopping Actions. |
| 560 | "loyaltyInfo": { # Loyalty program information. |
| 561 | "loyaltyNumber": "A String", # The loyalty card/membership number. |
| 562 | "name": "A String", # Name of card/membership holder, this field will be populated when |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 563 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 564 | "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. |
| 565 | "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. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 566 | # |
| 567 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 568 | # - "`denied`" |
| 569 | # - "`granted`" |
| 570 | "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. |
| 571 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 572 | }, |
| 573 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 574 | "deliveryDetails": { # Delivery details for shipments of type `delivery`. |
| 575 | "address": { # The delivery address |
| 576 | "country": "A String", # CLDR country code (e.g. "US"). |
| 577 | "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: |
| 578 | # John Smith |
| 579 | # 1600 Amphitheatre Parkway |
| 580 | # Mountain View, CA, 94043 |
| 581 | # United States |
| 582 | "A String", |
| 583 | ], |
| 584 | "isPostOfficeBox": True or False, # Whether the address is a post office box. |
| 585 | "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). |
| 586 | "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). |
| 587 | "recipientName": "A String", # Name of the recipient. |
| 588 | "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). |
| 589 | "streetAddress": [ # Street-level part of the address. |
| 590 | "A String", |
| 591 | ], |
| 592 | }, |
| 593 | "phoneNumber": "A String", # The phone number of the person receiving the delivery. |
| 594 | }, |
| 595 | "id": "A String", # The REST ID of the order. Globally unique. |
| 596 | "kind": "content#order", # Identifies what kind of resource this is. Value: the fixed string "`content#order`" |
| 597 | "lineItems": [ # Line items that are ordered. |
| 598 | { |
| 599 | "adjustments": [ # Price and tax adjustments applied on the line item. |
| 600 | { |
| 601 | "priceAdjustment": { # Adjustment for total price of the line item. |
| 602 | "currency": "A String", # The currency of the price. |
| 603 | "value": "A String", # The price represented as a number. |
| 604 | }, |
| 605 | "taxAdjustment": { # Adjustment for total tax of the line item. |
| 606 | "currency": "A String", # The currency of the price. |
| 607 | "value": "A String", # The price represented as a number. |
| 608 | }, |
| 609 | "type": "A String", # Type of this adjustment. |
| 610 | # |
| 611 | # Acceptable values are: |
| 612 | # - "`promotion`" |
| 613 | }, |
| 614 | ], |
| 615 | "annotations": [ # Annotations that are attached to the line item. |
| 616 | { |
| 617 | "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. |
| 618 | "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. |
| 619 | }, |
| 620 | ], |
| 621 | "cancellations": [ # Cancellations of the line item. |
| 622 | { |
| 623 | "actor": "A String", # The actor that created the cancellation. |
| 624 | # |
| 625 | # Acceptable values are: |
| 626 | # - "`customer`" |
| 627 | # - "`googleBot`" |
| 628 | # - "`googleCustomerService`" |
| 629 | # - "`googlePayments`" |
| 630 | # - "`googleSabre`" |
| 631 | # - "`merchant`" |
| 632 | "creationDate": "A String", # Date on which the cancellation has been created, in ISO 8601 format. |
| 633 | "quantity": 42, # The quantity that was canceled. |
| 634 | "reason": "A String", # The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Shopping Actions until you make an update to that product. This will not affect your Shopping ads. |
| 635 | # |
| 636 | # Acceptable values are: |
| 637 | # - "`autoPostInternal`" |
| 638 | # - "`autoPostInvalidBillingAddress`" |
| 639 | # - "`autoPostNoInventory`" |
| 640 | # - "`autoPostPriceError`" |
| 641 | # - "`autoPostUndeliverableShippingAddress`" |
| 642 | # - "`couponAbuse`" |
| 643 | # - "`customerCanceled`" |
| 644 | # - "`customerInitiatedCancel`" |
| 645 | # - "`customerSupportRequested`" |
| 646 | # - "`failToPushOrderGoogleError`" |
| 647 | # - "`failToPushOrderMerchantError`" |
| 648 | # - "`failToPushOrderMerchantFulfillmentError`" |
| 649 | # - "`failToPushOrderToMerchant`" |
| 650 | # - "`failToPushOrderToMerchantOutOfStock`" |
| 651 | # - "`invalidCoupon`" |
| 652 | # - "`malformedShippingAddress`" |
| 653 | # - "`merchantDidNotShipOnTime`" |
| 654 | # - "`noInventory`" |
| 655 | # - "`orderTimeout`" |
| 656 | # - "`other`" |
| 657 | # - "`paymentAbuse`" |
| 658 | # - "`paymentDeclined`" |
| 659 | # - "`priceError`" |
| 660 | # - "`returnRefundAbuse`" |
| 661 | # - "`shippingPriceError`" |
| 662 | # - "`taxError`" |
| 663 | # - "`undeliverableShippingAddress`" |
| 664 | # - "`unsupportedPoBoxAddress`" |
| 665 | "reasonText": "A String", # The explanation of the reason. |
| 666 | }, |
| 667 | ], |
| 668 | "id": "A String", # The ID of the line item. |
| 669 | "price": { # Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. |
| 670 | "currency": "A String", # The currency of the price. |
| 671 | "value": "A String", # The price represented as a number. |
| 672 | }, |
| 673 | "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. |
| 674 | "brand": "A String", # Brand of the item. |
| 675 | "condition": "A String", # Condition or state of the item. |
| 676 | # |
| 677 | # Acceptable values are: |
| 678 | # - "`new`" |
| 679 | # - "`refurbished`" |
| 680 | # - "`used`" |
| 681 | "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. |
| 682 | "fees": [ # Associated fees at order creation time. |
| 683 | { |
| 684 | "amount": { # Amount of the fee. |
| 685 | "currency": "A String", # The currency of the price. |
| 686 | "value": "A String", # The price represented as a number. |
| 687 | }, |
| 688 | "name": "A String", # Name of the fee. |
| 689 | }, |
| 690 | ], |
| 691 | "gtin": "A String", # Global Trade Item Number (GTIN) of the item. |
| 692 | "id": "A String", # The REST ID of the product. |
| 693 | "imageLink": "A String", # URL of an image of the item. |
| 694 | "itemGroupId": "A String", # Shared identifier for all variants of the same product. |
| 695 | "mpn": "A String", # Manufacturer Part Number (MPN) of the item. |
| 696 | "offerId": "A String", # An identifier of the item. |
| 697 | "price": { # Price of the item. |
| 698 | "currency": "A String", # The currency of the price. |
| 699 | "value": "A String", # The price represented as a number. |
| 700 | }, |
| 701 | "shownImage": "A String", # URL to the cached image shown to the user when order was placed. |
| 702 | "targetCountry": "A String", # The CLDR territory code of the target country of the product. |
| 703 | "title": "A String", # The title of the product. |
| 704 | "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. |
| 705 | { |
| 706 | "dimension": "A String", # The dimension of the variant. |
| 707 | "value": "A String", # The value for the dimension. |
| 708 | }, |
| 709 | ], |
| 710 | }, |
| 711 | "quantityCanceled": 42, # Number of items canceled. |
| 712 | "quantityDelivered": 42, # Number of items delivered. |
| 713 | "quantityOrdered": 42, # Number of items ordered. |
| 714 | "quantityPending": 42, # Number of items pending. |
| 715 | "quantityReadyForPickup": 42, # Number of items ready for pickup. |
| 716 | "quantityReturned": 42, # Number of items returned. |
| 717 | "quantityShipped": 42, # Number of items shipped. |
| 718 | "quantityUndeliverable": 42, # Number of items undeliverable. |
| 719 | "returnInfo": { # Details of the return policy for the line item. |
| 720 | "daysToReturn": 42, # Required. How many days later the item can be returned. |
| 721 | "isReturnable": True or False, # Required. Whether the item is returnable. |
| 722 | "policyUrl": "A String", # Required. URL of the item return policy. |
| 723 | }, |
| 724 | "returns": [ # Returns of the line item. |
| 725 | { |
| 726 | "actor": "A String", # The actor that created the refund. |
| 727 | # |
| 728 | # Acceptable values are: |
| 729 | # - "`customer`" |
| 730 | # - "`googleBot`" |
| 731 | # - "`googleCustomerService`" |
| 732 | # - "`googlePayments`" |
| 733 | # - "`googleSabre`" |
| 734 | # - "`merchant`" |
| 735 | "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. |
| 736 | "quantity": 42, # Quantity that is returned. |
| 737 | "reason": "A String", # The reason for the return. |
| 738 | # |
| 739 | # Acceptable values are: |
| 740 | # - "`customerDiscretionaryReturn`" |
| 741 | # - "`customerInitiatedMerchantCancel`" |
| 742 | # - "`deliveredTooLate`" |
| 743 | # - "`expiredItem`" |
| 744 | # - "`invalidCoupon`" |
| 745 | # - "`malformedShippingAddress`" |
| 746 | # - "`other`" |
| 747 | # - "`productArrivedDamaged`" |
| 748 | # - "`productNotAsDescribed`" |
| 749 | # - "`qualityNotAsExpected`" |
| 750 | # - "`undeliverableShippingAddress`" |
| 751 | # - "`unsupportedPoBoxAddress`" |
| 752 | # - "`wrongProductShipped`" |
| 753 | "reasonText": "A String", # The explanation of the reason. |
| 754 | }, |
| 755 | ], |
| 756 | "shippingDetails": { # Details of the requested shipping for the line item. |
| 757 | "deliverByDate": "A String", # Required. The delivery by date, in ISO 8601 format. |
| 758 | "method": { # Required. Details of the shipping method. |
| 759 | "carrier": "A String", # The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values. |
| 760 | "maxDaysInTransit": 42, # Required. Maximum transit time. |
| 761 | "methodName": "A String", # Required. The name of the shipping method. |
| 762 | "minDaysInTransit": 42, # Required. Minimum transit time. |
| 763 | }, |
| 764 | "shipByDate": "A String", # Required. The ship by date, in ISO 8601 format. |
| 765 | "type": "A String", # Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. |
| 766 | # |
| 767 | # Acceptable values are: |
| 768 | # - "`delivery`" |
| 769 | # - "`pickup`" |
| 770 | }, |
| 771 | "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. |
| 772 | "currency": "A String", # The currency of the price. |
| 773 | "value": "A String", # The price represented as a number. |
| 774 | }, |
| 775 | }, |
| 776 | ], |
| 777 | "merchantId": "A String", |
| 778 | "merchantOrderId": "A String", # Merchant-provided ID of the order. |
| 779 | "netPriceAmount": { # The net amount for the order (price part). For example, if an order was originally for $100 and a refund was issued for $20, the net amount will be $80. |
| 780 | "currency": "A String", # The currency of the price. |
| 781 | "value": "A String", # The price represented as a number. |
| 782 | }, |
| 783 | "netTaxAmount": { # The net amount for the order (tax part). Note that in certain cases due to taxable base adjustment `netTaxAmount` might not match to a sum of tax field across all lineItems and refunds. |
| 784 | "currency": "A String", # The currency of the price. |
| 785 | "value": "A String", # The price represented as a number. |
| 786 | }, |
| 787 | "paymentStatus": "A String", # The status of the payment. |
| 788 | # |
| 789 | # Acceptable values are: |
| 790 | # - "`paymentCaptured`" |
| 791 | # - "`paymentRejected`" |
| 792 | # - "`paymentSecured`" |
| 793 | # - "`pendingAuthorization`" |
| 794 | "pickupDetails": { # Pickup details for shipments of type `pickup`. |
| 795 | "address": { # Address of the pickup location where the shipment should be sent. Note that `recipientName` in the address is the name of the business at the pickup location. |
| 796 | "country": "A String", # CLDR country code (e.g. "US"). |
| 797 | "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: |
| 798 | # John Smith |
| 799 | # 1600 Amphitheatre Parkway |
| 800 | # Mountain View, CA, 94043 |
| 801 | # United States |
| 802 | "A String", |
| 803 | ], |
| 804 | "isPostOfficeBox": True or False, # Whether the address is a post office box. |
| 805 | "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). |
| 806 | "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). |
| 807 | "recipientName": "A String", # Name of the recipient. |
| 808 | "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). |
| 809 | "streetAddress": [ # Street-level part of the address. |
| 810 | "A String", |
| 811 | ], |
| 812 | }, |
| 813 | "collectors": [ # Collectors authorized to pick up shipment from the pickup location. |
| 814 | { |
| 815 | "name": "A String", # Name of the person picking up the shipment. |
| 816 | "phoneNumber": "A String", # Phone number of the person picking up the shipment. |
| 817 | }, |
| 818 | ], |
| 819 | "locationId": "A String", # ID of the pickup location. |
| 820 | }, |
| 821 | "placedDate": "A String", # The date when the order was placed, in ISO 8601 format. |
| 822 | "promotions": [ # Promotions associated with the order. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 823 | # |
| 824 | # To determine which promotions apply to which products, check the `Promotions[].appliedItems[].lineItemId` field against the `LineItems[].id` field for each promotion. If a promotion is applied to more than 1 offerId, divide the discount value by the number of affected offers to determine how much discount to apply to each offerId. |
| 825 | # |
| 826 | # Examples: |
| 827 | # - To calculate price paid by the customer for a single line item including the discount: For each promotion, subtract the `LineItems[].adjustments[].priceAdjustment.value` amount from the `LineItems[].Price.value`. |
| 828 | # - To calculate price paid by the customer for a single line item including the discount in case of multiple quantity: For each promotion, divide the `LineItems[].adjustments[].priceAdjustment.value` by the quantity of products then subtract the resulting value from the `LineItems[].Product.Price.value` for each quantity item. |
| 829 | # |
| 830 | # Only 1 promotion can be applied to an offerId in a given order. To refund an item which had a promotion applied to it, make sure to refund the amount after first subtracting the promotion discount from the item price. |
| 831 | # |
| 832 | # More details about the program are here. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 833 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 834 | "applicableItems": [ # Items which this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 835 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 836 | "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. |
| 837 | "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. |
| 838 | "productId": "A String", # `orders.createtestorder`. |
| 839 | "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 840 | }, |
| 841 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 842 | "appliedItems": [ # Items which this promotion have been applied to. Do not provide for `orders.createtestorder`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 843 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 844 | "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. |
| 845 | "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. |
| 846 | "productId": "A String", # `orders.createtestorder`. |
| 847 | "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 848 | }, |
| 849 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 850 | "endTime": "A String", # Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". |
| 851 | "funder": "A String", # Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 852 | # |
| 853 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 854 | # - "`google`" |
| 855 | # - "`merchant`" |
| 856 | "merchantPromotionId": "A String", # Required. This field is used to identify promotions within merchants' own systems. |
| 857 | "priceValue": { # Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. |
| 858 | "currency": "A String", # The currency of the price. |
| 859 | "value": "A String", # The price represented as a number. |
| 860 | }, |
| 861 | "shortTitle": "A String", # A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`. |
| 862 | "startTime": "A String", # Promotion start time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". |
| 863 | "subtype": "A String", # Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 864 | # |
| 865 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 866 | # - "`buyMGetMoneyOff`" |
| 867 | # - "`buyMGetNMoneyOff`" |
| 868 | # - "`buyMGetNPercentOff`" |
| 869 | # - "`buyMGetPercentOff`" |
| 870 | # - "`freeGift`" |
| 871 | # - "`freeGiftWithItemId`" |
| 872 | # - "`freeGiftWithValue`" |
| 873 | # - "`freeShippingOvernight`" |
| 874 | # - "`freeShippingStandard`" |
| 875 | # - "`freeShippingTwoDay`" |
| 876 | # - "`moneyOff`" |
| 877 | # - "`percentOff`" |
| 878 | # - "`rewardPoints`" |
| 879 | # - "`salePrice`" |
| 880 | "taxValue": { # Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`. |
| 881 | "currency": "A String", # The currency of the price. |
| 882 | "value": "A String", # The price represented as a number. |
| 883 | }, |
| 884 | "title": "A String", # Required. The title of the promotion. |
| 885 | "type": "A String", # Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. |
| 886 | # |
| 887 | # Acceptable values are: |
| 888 | # - "`product`" |
| 889 | # - "`shipping`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 890 | }, |
| 891 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 892 | "refunds": [ # Refunds for the order. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 893 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 894 | "actor": "A String", # The actor that created the refund. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 895 | # |
| 896 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 897 | # - "`customer`" |
| 898 | # - "`googleBot`" |
| 899 | # - "`googleCustomerService`" |
| 900 | # - "`googlePayments`" |
| 901 | # - "`googleSabre`" |
| 902 | # - "`merchant`" |
| 903 | "amount": { # The amount that is refunded. |
| 904 | "currency": "A String", # The currency of the price. |
| 905 | "value": "A String", # The price represented as a number. |
| 906 | }, |
| 907 | "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. |
| 908 | "reason": "A String", # The reason for the refund. |
| 909 | # |
| 910 | # Acceptable values are: |
| 911 | # - "`adjustment`" |
| 912 | # - "`autoPostInternal`" |
| 913 | # - "`autoPostInvalidBillingAddress`" |
| 914 | # - "`autoPostNoInventory`" |
| 915 | # - "`autoPostPriceError`" |
| 916 | # - "`autoPostUndeliverableShippingAddress`" |
| 917 | # - "`couponAbuse`" |
| 918 | # - "`courtesyAdjustment`" |
| 919 | # - "`customerCanceled`" |
| 920 | # - "`customerDiscretionaryReturn`" |
| 921 | # - "`customerInitiatedMerchantCancel`" |
| 922 | # - "`customerSupportRequested`" |
| 923 | # - "`deliveredLateByCarrier`" |
| 924 | # - "`deliveredTooLate`" |
| 925 | # - "`expiredItem`" |
| 926 | # - "`failToPushOrderGoogleError`" |
| 927 | # - "`failToPushOrderMerchantError`" |
| 928 | # - "`failToPushOrderMerchantFulfillmentError`" |
| 929 | # - "`failToPushOrderToMerchant`" |
| 930 | # - "`failToPushOrderToMerchantOutOfStock`" |
| 931 | # - "`feeAdjustment`" |
| 932 | # - "`invalidCoupon`" |
| 933 | # - "`lateShipmentCredit`" |
| 934 | # - "`malformedShippingAddress`" |
| 935 | # - "`merchantDidNotShipOnTime`" |
| 936 | # - "`noInventory`" |
| 937 | # - "`orderTimeout`" |
| 938 | # - "`other`" |
| 939 | # - "`paymentAbuse`" |
| 940 | # - "`paymentDeclined`" |
| 941 | # - "`priceAdjustment`" |
| 942 | # - "`priceError`" |
| 943 | # - "`productArrivedDamaged`" |
| 944 | # - "`productNotAsDescribed`" |
| 945 | # - "`promoReallocation`" |
| 946 | # - "`qualityNotAsExpected`" |
| 947 | # - "`returnRefundAbuse`" |
| 948 | # - "`shippingCostAdjustment`" |
| 949 | # - "`shippingPriceError`" |
| 950 | # - "`taxAdjustment`" |
| 951 | # - "`taxError`" |
| 952 | # - "`undeliverableShippingAddress`" |
| 953 | # - "`unsupportedPoBoxAddress`" |
| 954 | # - "`wrongProductShipped`" |
| 955 | "reasonText": "A String", # The explanation of the reason. |
| 956 | }, |
| 957 | ], |
| 958 | "shipments": [ # Shipments of the order. |
| 959 | { |
| 960 | "carrier": "A String", # The carrier handling the shipment. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 961 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 962 | # For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. Note: You can also use unsupported carriers, but emails to customers will not include the carrier name or tracking URL, and there will be no automatic order status updates. |
| 963 | # Supported carriers for US are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 964 | # - "`ups`" (United Parcel Service) automatic status updates |
| 965 | # - "`usps`" (United States Postal Service) automatic status updates |
| 966 | # - "`fedex`" (FedEx) automatic status updates |
| 967 | # - "`dhl`" (DHL eCommerce) automatic status updates (US only) |
| 968 | # - "`ontrac`" (OnTrac) automatic status updates |
| 969 | # - "`dhl express`" (DHL Express) |
| 970 | # - "`deliv`" (Deliv) |
| 971 | # - "`dynamex`" (TForce) |
| 972 | # - "`lasership`" (LaserShip) |
| 973 | # - "`mpx`" (Military Parcel Xpress) |
| 974 | # - "`uds`" (United Delivery Service) |
| 975 | # - "`efw`" (Estes Forwarding Worldwide) |
| 976 | # - "`jd logistics`" (JD Logistics) |
| 977 | # - "`yunexpress`" (YunExpress) |
| 978 | # - "`china post`" (China Post) |
| 979 | # - "`china ems`" (China Post Express Mail Service) |
| 980 | # - "`singapore post`" (Singapore Post) |
| 981 | # - "`pos malaysia`" (Pos Malaysia) |
| 982 | # - "`postnl`" (PostNL) |
| 983 | # - "`ptt`" (PTT Turkish Post) |
| 984 | # - "`eub`" (ePacket) |
| 985 | # - "`chukou1`" (Chukou1 Logistics) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 986 | # Supported carriers for FR are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 987 | # - "`la poste`" (La Poste) automatic status updates |
| 988 | # - "`colissimo`" (Colissimo by La Poste) automatic status updates |
| 989 | # - "`ups`" (United Parcel Service) automatic status updates |
| 990 | # - "`chronopost`" (Chronopost by La Poste) |
| 991 | # - "`gls`" (General Logistics Systems France) |
| 992 | # - "`dpd`" (DPD Group by GeoPost) |
| 993 | # - "`bpost`" (Belgian Post Group) |
| 994 | # - "`colis prive`" (Colis Privé) |
| 995 | # - "`boxtal`" (Boxtal) |
| 996 | # - "`geodis`" (GEODIS) |
| 997 | # - "`tnt`" (TNT) |
| 998 | # - "`db schenker`" (DB Schenker) |
| 999 | # - "`aramex`" (Aramex) |
| 1000 | "creationDate": "A String", # Date on which the shipment has been created, in ISO 8601 format. |
| 1001 | "deliveryDate": "A String", # Date on which the shipment has been delivered, in ISO 8601 format. Present only if `status` is `delivered` |
| 1002 | "id": "A String", # The ID of the shipment. |
| 1003 | "lineItems": [ # The line items that are shipped. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1004 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1005 | "lineItemId": "A String", # The ID of the line item that is shipped. This value is assigned by Google when an order is created. Either lineItemId or productId is required. |
| 1006 | "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. |
| 1007 | "quantity": 42, # The quantity that is shipped. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1008 | }, |
| 1009 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1010 | "shipmentGroupId": "A String", # The shipment group ID of the shipment. This is set in shiplineitems request. |
| 1011 | "status": "A String", # The status of the shipment. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1012 | # |
| 1013 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1014 | # - "`delivered`" |
| 1015 | # - "`readyForPickup`" |
| 1016 | # - "`shipped`" |
| 1017 | # - "`undeliverable`" |
| 1018 | "trackingId": "A String", # The tracking ID for the shipment. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1019 | }, |
| 1020 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1021 | "shippingCost": { # The total cost of shipping for all items. |
| 1022 | "currency": "A String", # The currency of the price. |
| 1023 | "value": "A String", # The price represented as a number. |
| 1024 | }, |
| 1025 | "shippingCostTax": { # The tax for the total shipping cost. |
| 1026 | "currency": "A String", # The currency of the price. |
| 1027 | "value": "A String", # The price represented as a number. |
| 1028 | }, |
| 1029 | "status": "A String", # The status of the order. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1030 | # |
| 1031 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1032 | # - "`canceled`" |
| 1033 | # - "`delivered`" |
| 1034 | # - "`inProgress`" |
| 1035 | # - "`partiallyDelivered`" |
| 1036 | # - "`partiallyReturned`" |
| 1037 | # - "`partiallyShipped`" |
| 1038 | # - "`pendingShipment`" |
| 1039 | # - "`returned`" |
| 1040 | # - "`shipped`" |
| 1041 | "taxCollector": "A String", # The party responsible for collecting and remitting taxes. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1042 | # |
| 1043 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1044 | # - "`marketplaceFacilitator`" |
| 1045 | # - "`merchant`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1046 | }</pre> |
| 1047 | </div> |
| 1048 | |
| 1049 | <div class="method"> |
| 1050 | <code class="details" id="getbymerchantorderid">getbymerchantorderid(merchantId, merchantOrderId)</code> |
| 1051 | <pre>Retrieves an order using merchant order ID. |
| 1052 | |
| 1053 | Args: |
| 1054 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 1055 | merchantOrderId: string, The merchant order ID to be looked for. (required) |
| 1056 | |
| 1057 | Returns: |
| 1058 | An object of the form: |
| 1059 | |
| 1060 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1061 | "kind": "content#ordersGetByMerchantOrderIdResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersGetByMerchantOrderIdResponse". |
| 1062 | "order": { # Order. Production access (all methods) requires the order manager role. Sandbox access does not. (== resource_for v2.orders ==) (== resource_for v2.1.orders ==) # The requested order. |
| 1063 | "acknowledged": True or False, # Whether the order was acknowledged. |
| 1064 | "billingAddress": { # The billing address. |
| 1065 | "country": "A String", # CLDR country code (e.g. "US"). |
| 1066 | "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: |
| 1067 | # John Smith |
| 1068 | # 1600 Amphitheatre Parkway |
| 1069 | # Mountain View, CA, 94043 |
| 1070 | # United States |
| 1071 | "A String", |
| 1072 | ], |
| 1073 | "isPostOfficeBox": True or False, # Whether the address is a post office box. |
| 1074 | "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). |
| 1075 | "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). |
| 1076 | "recipientName": "A String", # Name of the recipient. |
| 1077 | "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). |
| 1078 | "streetAddress": [ # Street-level part of the address. |
| 1079 | "A String", |
| 1080 | ], |
| 1081 | }, |
| 1082 | "customer": { # The details of the customer who placed the order. |
| 1083 | "fullName": "A String", # Full name of the customer. |
| 1084 | "invoiceReceivingEmail": "A String", # Email address for the merchant to send value-added tax or invoice documentation of the order. Only the last document sent is made available to the customer. For more information, see About automated VAT invoicing for Shopping Actions. |
| 1085 | "loyaltyInfo": { # Loyalty program information. |
| 1086 | "loyaltyNumber": "A String", # The loyalty card/membership number. |
| 1087 | "name": "A String", # Name of card/membership holder, this field will be populated when |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1088 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1089 | "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. |
| 1090 | "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. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1091 | # |
| 1092 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1093 | # - "`denied`" |
| 1094 | # - "`granted`" |
| 1095 | "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. |
| 1096 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1097 | }, |
| 1098 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1099 | "deliveryDetails": { # Delivery details for shipments of type `delivery`. |
| 1100 | "address": { # The delivery address |
| 1101 | "country": "A String", # CLDR country code (e.g. "US"). |
| 1102 | "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: |
| 1103 | # John Smith |
| 1104 | # 1600 Amphitheatre Parkway |
| 1105 | # Mountain View, CA, 94043 |
| 1106 | # United States |
| 1107 | "A String", |
| 1108 | ], |
| 1109 | "isPostOfficeBox": True or False, # Whether the address is a post office box. |
| 1110 | "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). |
| 1111 | "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). |
| 1112 | "recipientName": "A String", # Name of the recipient. |
| 1113 | "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). |
| 1114 | "streetAddress": [ # Street-level part of the address. |
| 1115 | "A String", |
| 1116 | ], |
| 1117 | }, |
| 1118 | "phoneNumber": "A String", # The phone number of the person receiving the delivery. |
| 1119 | }, |
| 1120 | "id": "A String", # The REST ID of the order. Globally unique. |
| 1121 | "kind": "content#order", # Identifies what kind of resource this is. Value: the fixed string "`content#order`" |
| 1122 | "lineItems": [ # Line items that are ordered. |
| 1123 | { |
| 1124 | "adjustments": [ # Price and tax adjustments applied on the line item. |
| 1125 | { |
| 1126 | "priceAdjustment": { # Adjustment for total price of the line item. |
| 1127 | "currency": "A String", # The currency of the price. |
| 1128 | "value": "A String", # The price represented as a number. |
| 1129 | }, |
| 1130 | "taxAdjustment": { # Adjustment for total tax of the line item. |
| 1131 | "currency": "A String", # The currency of the price. |
| 1132 | "value": "A String", # The price represented as a number. |
| 1133 | }, |
| 1134 | "type": "A String", # Type of this adjustment. |
| 1135 | # |
| 1136 | # Acceptable values are: |
| 1137 | # - "`promotion`" |
| 1138 | }, |
| 1139 | ], |
| 1140 | "annotations": [ # Annotations that are attached to the line item. |
| 1141 | { |
| 1142 | "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. |
| 1143 | "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. |
| 1144 | }, |
| 1145 | ], |
| 1146 | "cancellations": [ # Cancellations of the line item. |
| 1147 | { |
| 1148 | "actor": "A String", # The actor that created the cancellation. |
| 1149 | # |
| 1150 | # Acceptable values are: |
| 1151 | # - "`customer`" |
| 1152 | # - "`googleBot`" |
| 1153 | # - "`googleCustomerService`" |
| 1154 | # - "`googlePayments`" |
| 1155 | # - "`googleSabre`" |
| 1156 | # - "`merchant`" |
| 1157 | "creationDate": "A String", # Date on which the cancellation has been created, in ISO 8601 format. |
| 1158 | "quantity": 42, # The quantity that was canceled. |
| 1159 | "reason": "A String", # The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Shopping Actions until you make an update to that product. This will not affect your Shopping ads. |
| 1160 | # |
| 1161 | # Acceptable values are: |
| 1162 | # - "`autoPostInternal`" |
| 1163 | # - "`autoPostInvalidBillingAddress`" |
| 1164 | # - "`autoPostNoInventory`" |
| 1165 | # - "`autoPostPriceError`" |
| 1166 | # - "`autoPostUndeliverableShippingAddress`" |
| 1167 | # - "`couponAbuse`" |
| 1168 | # - "`customerCanceled`" |
| 1169 | # - "`customerInitiatedCancel`" |
| 1170 | # - "`customerSupportRequested`" |
| 1171 | # - "`failToPushOrderGoogleError`" |
| 1172 | # - "`failToPushOrderMerchantError`" |
| 1173 | # - "`failToPushOrderMerchantFulfillmentError`" |
| 1174 | # - "`failToPushOrderToMerchant`" |
| 1175 | # - "`failToPushOrderToMerchantOutOfStock`" |
| 1176 | # - "`invalidCoupon`" |
| 1177 | # - "`malformedShippingAddress`" |
| 1178 | # - "`merchantDidNotShipOnTime`" |
| 1179 | # - "`noInventory`" |
| 1180 | # - "`orderTimeout`" |
| 1181 | # - "`other`" |
| 1182 | # - "`paymentAbuse`" |
| 1183 | # - "`paymentDeclined`" |
| 1184 | # - "`priceError`" |
| 1185 | # - "`returnRefundAbuse`" |
| 1186 | # - "`shippingPriceError`" |
| 1187 | # - "`taxError`" |
| 1188 | # - "`undeliverableShippingAddress`" |
| 1189 | # - "`unsupportedPoBoxAddress`" |
| 1190 | "reasonText": "A String", # The explanation of the reason. |
| 1191 | }, |
| 1192 | ], |
| 1193 | "id": "A String", # The ID of the line item. |
| 1194 | "price": { # Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. |
| 1195 | "currency": "A String", # The currency of the price. |
| 1196 | "value": "A String", # The price represented as a number. |
| 1197 | }, |
| 1198 | "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. |
| 1199 | "brand": "A String", # Brand of the item. |
| 1200 | "condition": "A String", # Condition or state of the item. |
| 1201 | # |
| 1202 | # Acceptable values are: |
| 1203 | # - "`new`" |
| 1204 | # - "`refurbished`" |
| 1205 | # - "`used`" |
| 1206 | "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. |
| 1207 | "fees": [ # Associated fees at order creation time. |
| 1208 | { |
| 1209 | "amount": { # Amount of the fee. |
| 1210 | "currency": "A String", # The currency of the price. |
| 1211 | "value": "A String", # The price represented as a number. |
| 1212 | }, |
| 1213 | "name": "A String", # Name of the fee. |
| 1214 | }, |
| 1215 | ], |
| 1216 | "gtin": "A String", # Global Trade Item Number (GTIN) of the item. |
| 1217 | "id": "A String", # The REST ID of the product. |
| 1218 | "imageLink": "A String", # URL of an image of the item. |
| 1219 | "itemGroupId": "A String", # Shared identifier for all variants of the same product. |
| 1220 | "mpn": "A String", # Manufacturer Part Number (MPN) of the item. |
| 1221 | "offerId": "A String", # An identifier of the item. |
| 1222 | "price": { # Price of the item. |
| 1223 | "currency": "A String", # The currency of the price. |
| 1224 | "value": "A String", # The price represented as a number. |
| 1225 | }, |
| 1226 | "shownImage": "A String", # URL to the cached image shown to the user when order was placed. |
| 1227 | "targetCountry": "A String", # The CLDR territory code of the target country of the product. |
| 1228 | "title": "A String", # The title of the product. |
| 1229 | "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. |
| 1230 | { |
| 1231 | "dimension": "A String", # The dimension of the variant. |
| 1232 | "value": "A String", # The value for the dimension. |
| 1233 | }, |
| 1234 | ], |
| 1235 | }, |
| 1236 | "quantityCanceled": 42, # Number of items canceled. |
| 1237 | "quantityDelivered": 42, # Number of items delivered. |
| 1238 | "quantityOrdered": 42, # Number of items ordered. |
| 1239 | "quantityPending": 42, # Number of items pending. |
| 1240 | "quantityReadyForPickup": 42, # Number of items ready for pickup. |
| 1241 | "quantityReturned": 42, # Number of items returned. |
| 1242 | "quantityShipped": 42, # Number of items shipped. |
| 1243 | "quantityUndeliverable": 42, # Number of items undeliverable. |
| 1244 | "returnInfo": { # Details of the return policy for the line item. |
| 1245 | "daysToReturn": 42, # Required. How many days later the item can be returned. |
| 1246 | "isReturnable": True or False, # Required. Whether the item is returnable. |
| 1247 | "policyUrl": "A String", # Required. URL of the item return policy. |
| 1248 | }, |
| 1249 | "returns": [ # Returns of the line item. |
| 1250 | { |
| 1251 | "actor": "A String", # The actor that created the refund. |
| 1252 | # |
| 1253 | # Acceptable values are: |
| 1254 | # - "`customer`" |
| 1255 | # - "`googleBot`" |
| 1256 | # - "`googleCustomerService`" |
| 1257 | # - "`googlePayments`" |
| 1258 | # - "`googleSabre`" |
| 1259 | # - "`merchant`" |
| 1260 | "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. |
| 1261 | "quantity": 42, # Quantity that is returned. |
| 1262 | "reason": "A String", # The reason for the return. |
| 1263 | # |
| 1264 | # Acceptable values are: |
| 1265 | # - "`customerDiscretionaryReturn`" |
| 1266 | # - "`customerInitiatedMerchantCancel`" |
| 1267 | # - "`deliveredTooLate`" |
| 1268 | # - "`expiredItem`" |
| 1269 | # - "`invalidCoupon`" |
| 1270 | # - "`malformedShippingAddress`" |
| 1271 | # - "`other`" |
| 1272 | # - "`productArrivedDamaged`" |
| 1273 | # - "`productNotAsDescribed`" |
| 1274 | # - "`qualityNotAsExpected`" |
| 1275 | # - "`undeliverableShippingAddress`" |
| 1276 | # - "`unsupportedPoBoxAddress`" |
| 1277 | # - "`wrongProductShipped`" |
| 1278 | "reasonText": "A String", # The explanation of the reason. |
| 1279 | }, |
| 1280 | ], |
| 1281 | "shippingDetails": { # Details of the requested shipping for the line item. |
| 1282 | "deliverByDate": "A String", # Required. The delivery by date, in ISO 8601 format. |
| 1283 | "method": { # Required. Details of the shipping method. |
| 1284 | "carrier": "A String", # The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values. |
| 1285 | "maxDaysInTransit": 42, # Required. Maximum transit time. |
| 1286 | "methodName": "A String", # Required. The name of the shipping method. |
| 1287 | "minDaysInTransit": 42, # Required. Minimum transit time. |
| 1288 | }, |
| 1289 | "shipByDate": "A String", # Required. The ship by date, in ISO 8601 format. |
| 1290 | "type": "A String", # Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. |
| 1291 | # |
| 1292 | # Acceptable values are: |
| 1293 | # - "`delivery`" |
| 1294 | # - "`pickup`" |
| 1295 | }, |
| 1296 | "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. |
| 1297 | "currency": "A String", # The currency of the price. |
| 1298 | "value": "A String", # The price represented as a number. |
| 1299 | }, |
| 1300 | }, |
| 1301 | ], |
| 1302 | "merchantId": "A String", |
| 1303 | "merchantOrderId": "A String", # Merchant-provided ID of the order. |
| 1304 | "netPriceAmount": { # The net amount for the order (price part). For example, if an order was originally for $100 and a refund was issued for $20, the net amount will be $80. |
| 1305 | "currency": "A String", # The currency of the price. |
| 1306 | "value": "A String", # The price represented as a number. |
| 1307 | }, |
| 1308 | "netTaxAmount": { # The net amount for the order (tax part). Note that in certain cases due to taxable base adjustment `netTaxAmount` might not match to a sum of tax field across all lineItems and refunds. |
| 1309 | "currency": "A String", # The currency of the price. |
| 1310 | "value": "A String", # The price represented as a number. |
| 1311 | }, |
| 1312 | "paymentStatus": "A String", # The status of the payment. |
| 1313 | # |
| 1314 | # Acceptable values are: |
| 1315 | # - "`paymentCaptured`" |
| 1316 | # - "`paymentRejected`" |
| 1317 | # - "`paymentSecured`" |
| 1318 | # - "`pendingAuthorization`" |
| 1319 | "pickupDetails": { # Pickup details for shipments of type `pickup`. |
| 1320 | "address": { # Address of the pickup location where the shipment should be sent. Note that `recipientName` in the address is the name of the business at the pickup location. |
| 1321 | "country": "A String", # CLDR country code (e.g. "US"). |
| 1322 | "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: |
| 1323 | # John Smith |
| 1324 | # 1600 Amphitheatre Parkway |
| 1325 | # Mountain View, CA, 94043 |
| 1326 | # United States |
| 1327 | "A String", |
| 1328 | ], |
| 1329 | "isPostOfficeBox": True or False, # Whether the address is a post office box. |
| 1330 | "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). |
| 1331 | "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). |
| 1332 | "recipientName": "A String", # Name of the recipient. |
| 1333 | "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). |
| 1334 | "streetAddress": [ # Street-level part of the address. |
| 1335 | "A String", |
| 1336 | ], |
| 1337 | }, |
| 1338 | "collectors": [ # Collectors authorized to pick up shipment from the pickup location. |
| 1339 | { |
| 1340 | "name": "A String", # Name of the person picking up the shipment. |
| 1341 | "phoneNumber": "A String", # Phone number of the person picking up the shipment. |
| 1342 | }, |
| 1343 | ], |
| 1344 | "locationId": "A String", # ID of the pickup location. |
| 1345 | }, |
| 1346 | "placedDate": "A String", # The date when the order was placed, in ISO 8601 format. |
| 1347 | "promotions": [ # Promotions associated with the order. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1348 | # |
| 1349 | # To determine which promotions apply to which products, check the `Promotions[].appliedItems[].lineItemId` field against the `LineItems[].id` field for each promotion. If a promotion is applied to more than 1 offerId, divide the discount value by the number of affected offers to determine how much discount to apply to each offerId. |
| 1350 | # |
| 1351 | # Examples: |
| 1352 | # - To calculate price paid by the customer for a single line item including the discount: For each promotion, subtract the `LineItems[].adjustments[].priceAdjustment.value` amount from the `LineItems[].Price.value`. |
| 1353 | # - To calculate price paid by the customer for a single line item including the discount in case of multiple quantity: For each promotion, divide the `LineItems[].adjustments[].priceAdjustment.value` by the quantity of products then subtract the resulting value from the `LineItems[].Product.Price.value` for each quantity item. |
| 1354 | # |
| 1355 | # Only 1 promotion can be applied to an offerId in a given order. To refund an item which had a promotion applied to it, make sure to refund the amount after first subtracting the promotion discount from the item price. |
| 1356 | # |
| 1357 | # More details about the program are here. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1358 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1359 | "applicableItems": [ # Items which this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1360 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1361 | "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. |
| 1362 | "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. |
| 1363 | "productId": "A String", # `orders.createtestorder`. |
| 1364 | "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1365 | }, |
| 1366 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1367 | "appliedItems": [ # Items which this promotion have been applied to. Do not provide for `orders.createtestorder`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1368 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1369 | "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. |
| 1370 | "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. |
| 1371 | "productId": "A String", # `orders.createtestorder`. |
| 1372 | "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1373 | }, |
| 1374 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1375 | "endTime": "A String", # Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". |
| 1376 | "funder": "A String", # Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1377 | # |
| 1378 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1379 | # - "`google`" |
| 1380 | # - "`merchant`" |
| 1381 | "merchantPromotionId": "A String", # Required. This field is used to identify promotions within merchants' own systems. |
| 1382 | "priceValue": { # Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. |
| 1383 | "currency": "A String", # The currency of the price. |
| 1384 | "value": "A String", # The price represented as a number. |
| 1385 | }, |
| 1386 | "shortTitle": "A String", # A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`. |
| 1387 | "startTime": "A String", # Promotion start time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". |
| 1388 | "subtype": "A String", # Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1389 | # |
| 1390 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1391 | # - "`buyMGetMoneyOff`" |
| 1392 | # - "`buyMGetNMoneyOff`" |
| 1393 | # - "`buyMGetNPercentOff`" |
| 1394 | # - "`buyMGetPercentOff`" |
| 1395 | # - "`freeGift`" |
| 1396 | # - "`freeGiftWithItemId`" |
| 1397 | # - "`freeGiftWithValue`" |
| 1398 | # - "`freeShippingOvernight`" |
| 1399 | # - "`freeShippingStandard`" |
| 1400 | # - "`freeShippingTwoDay`" |
| 1401 | # - "`moneyOff`" |
| 1402 | # - "`percentOff`" |
| 1403 | # - "`rewardPoints`" |
| 1404 | # - "`salePrice`" |
| 1405 | "taxValue": { # Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`. |
| 1406 | "currency": "A String", # The currency of the price. |
| 1407 | "value": "A String", # The price represented as a number. |
| 1408 | }, |
| 1409 | "title": "A String", # Required. The title of the promotion. |
| 1410 | "type": "A String", # Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. |
| 1411 | # |
| 1412 | # Acceptable values are: |
| 1413 | # - "`product`" |
| 1414 | # - "`shipping`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1415 | }, |
| 1416 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1417 | "refunds": [ # Refunds for the order. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1418 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1419 | "actor": "A String", # The actor that created the refund. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1420 | # |
| 1421 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1422 | # - "`customer`" |
| 1423 | # - "`googleBot`" |
| 1424 | # - "`googleCustomerService`" |
| 1425 | # - "`googlePayments`" |
| 1426 | # - "`googleSabre`" |
| 1427 | # - "`merchant`" |
| 1428 | "amount": { # The amount that is refunded. |
| 1429 | "currency": "A String", # The currency of the price. |
| 1430 | "value": "A String", # The price represented as a number. |
| 1431 | }, |
| 1432 | "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. |
| 1433 | "reason": "A String", # The reason for the refund. |
| 1434 | # |
| 1435 | # Acceptable values are: |
| 1436 | # - "`adjustment`" |
| 1437 | # - "`autoPostInternal`" |
| 1438 | # - "`autoPostInvalidBillingAddress`" |
| 1439 | # - "`autoPostNoInventory`" |
| 1440 | # - "`autoPostPriceError`" |
| 1441 | # - "`autoPostUndeliverableShippingAddress`" |
| 1442 | # - "`couponAbuse`" |
| 1443 | # - "`courtesyAdjustment`" |
| 1444 | # - "`customerCanceled`" |
| 1445 | # - "`customerDiscretionaryReturn`" |
| 1446 | # - "`customerInitiatedMerchantCancel`" |
| 1447 | # - "`customerSupportRequested`" |
| 1448 | # - "`deliveredLateByCarrier`" |
| 1449 | # - "`deliveredTooLate`" |
| 1450 | # - "`expiredItem`" |
| 1451 | # - "`failToPushOrderGoogleError`" |
| 1452 | # - "`failToPushOrderMerchantError`" |
| 1453 | # - "`failToPushOrderMerchantFulfillmentError`" |
| 1454 | # - "`failToPushOrderToMerchant`" |
| 1455 | # - "`failToPushOrderToMerchantOutOfStock`" |
| 1456 | # - "`feeAdjustment`" |
| 1457 | # - "`invalidCoupon`" |
| 1458 | # - "`lateShipmentCredit`" |
| 1459 | # - "`malformedShippingAddress`" |
| 1460 | # - "`merchantDidNotShipOnTime`" |
| 1461 | # - "`noInventory`" |
| 1462 | # - "`orderTimeout`" |
| 1463 | # - "`other`" |
| 1464 | # - "`paymentAbuse`" |
| 1465 | # - "`paymentDeclined`" |
| 1466 | # - "`priceAdjustment`" |
| 1467 | # - "`priceError`" |
| 1468 | # - "`productArrivedDamaged`" |
| 1469 | # - "`productNotAsDescribed`" |
| 1470 | # - "`promoReallocation`" |
| 1471 | # - "`qualityNotAsExpected`" |
| 1472 | # - "`returnRefundAbuse`" |
| 1473 | # - "`shippingCostAdjustment`" |
| 1474 | # - "`shippingPriceError`" |
| 1475 | # - "`taxAdjustment`" |
| 1476 | # - "`taxError`" |
| 1477 | # - "`undeliverableShippingAddress`" |
| 1478 | # - "`unsupportedPoBoxAddress`" |
| 1479 | # - "`wrongProductShipped`" |
| 1480 | "reasonText": "A String", # The explanation of the reason. |
| 1481 | }, |
| 1482 | ], |
| 1483 | "shipments": [ # Shipments of the order. |
| 1484 | { |
| 1485 | "carrier": "A String", # The carrier handling the shipment. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1486 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1487 | # For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. Note: You can also use unsupported carriers, but emails to customers will not include the carrier name or tracking URL, and there will be no automatic order status updates. |
| 1488 | # Supported carriers for US are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1489 | # - "`ups`" (United Parcel Service) automatic status updates |
| 1490 | # - "`usps`" (United States Postal Service) automatic status updates |
| 1491 | # - "`fedex`" (FedEx) automatic status updates |
| 1492 | # - "`dhl`" (DHL eCommerce) automatic status updates (US only) |
| 1493 | # - "`ontrac`" (OnTrac) automatic status updates |
| 1494 | # - "`dhl express`" (DHL Express) |
| 1495 | # - "`deliv`" (Deliv) |
| 1496 | # - "`dynamex`" (TForce) |
| 1497 | # - "`lasership`" (LaserShip) |
| 1498 | # - "`mpx`" (Military Parcel Xpress) |
| 1499 | # - "`uds`" (United Delivery Service) |
| 1500 | # - "`efw`" (Estes Forwarding Worldwide) |
| 1501 | # - "`jd logistics`" (JD Logistics) |
| 1502 | # - "`yunexpress`" (YunExpress) |
| 1503 | # - "`china post`" (China Post) |
| 1504 | # - "`china ems`" (China Post Express Mail Service) |
| 1505 | # - "`singapore post`" (Singapore Post) |
| 1506 | # - "`pos malaysia`" (Pos Malaysia) |
| 1507 | # - "`postnl`" (PostNL) |
| 1508 | # - "`ptt`" (PTT Turkish Post) |
| 1509 | # - "`eub`" (ePacket) |
| 1510 | # - "`chukou1`" (Chukou1 Logistics) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1511 | # Supported carriers for FR are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1512 | # - "`la poste`" (La Poste) automatic status updates |
| 1513 | # - "`colissimo`" (Colissimo by La Poste) automatic status updates |
| 1514 | # - "`ups`" (United Parcel Service) automatic status updates |
| 1515 | # - "`chronopost`" (Chronopost by La Poste) |
| 1516 | # - "`gls`" (General Logistics Systems France) |
| 1517 | # - "`dpd`" (DPD Group by GeoPost) |
| 1518 | # - "`bpost`" (Belgian Post Group) |
| 1519 | # - "`colis prive`" (Colis Privé) |
| 1520 | # - "`boxtal`" (Boxtal) |
| 1521 | # - "`geodis`" (GEODIS) |
| 1522 | # - "`tnt`" (TNT) |
| 1523 | # - "`db schenker`" (DB Schenker) |
| 1524 | # - "`aramex`" (Aramex) |
| 1525 | "creationDate": "A String", # Date on which the shipment has been created, in ISO 8601 format. |
| 1526 | "deliveryDate": "A String", # Date on which the shipment has been delivered, in ISO 8601 format. Present only if `status` is `delivered` |
| 1527 | "id": "A String", # The ID of the shipment. |
| 1528 | "lineItems": [ # The line items that are shipped. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1529 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1530 | "lineItemId": "A String", # The ID of the line item that is shipped. This value is assigned by Google when an order is created. Either lineItemId or productId is required. |
| 1531 | "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. |
| 1532 | "quantity": 42, # The quantity that is shipped. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1533 | }, |
| 1534 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1535 | "shipmentGroupId": "A String", # The shipment group ID of the shipment. This is set in shiplineitems request. |
| 1536 | "status": "A String", # The status of the shipment. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1537 | # |
| 1538 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1539 | # - "`delivered`" |
| 1540 | # - "`readyForPickup`" |
| 1541 | # - "`shipped`" |
| 1542 | # - "`undeliverable`" |
| 1543 | "trackingId": "A String", # The tracking ID for the shipment. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1544 | }, |
| 1545 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1546 | "shippingCost": { # The total cost of shipping for all items. |
| 1547 | "currency": "A String", # The currency of the price. |
| 1548 | "value": "A String", # The price represented as a number. |
| 1549 | }, |
| 1550 | "shippingCostTax": { # The tax for the total shipping cost. |
| 1551 | "currency": "A String", # The currency of the price. |
| 1552 | "value": "A String", # The price represented as a number. |
| 1553 | }, |
| 1554 | "status": "A String", # The status of the order. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1555 | # |
| 1556 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1557 | # - "`canceled`" |
| 1558 | # - "`delivered`" |
| 1559 | # - "`inProgress`" |
| 1560 | # - "`partiallyDelivered`" |
| 1561 | # - "`partiallyReturned`" |
| 1562 | # - "`partiallyShipped`" |
| 1563 | # - "`pendingShipment`" |
| 1564 | # - "`returned`" |
| 1565 | # - "`shipped`" |
| 1566 | "taxCollector": "A String", # The party responsible for collecting and remitting taxes. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1567 | # |
| 1568 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1569 | # - "`marketplaceFacilitator`" |
| 1570 | # - "`merchant`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1571 | }, |
| 1572 | }</pre> |
| 1573 | </div> |
| 1574 | |
| 1575 | <div class="method"> |
| 1576 | <code class="details" id="gettestordertemplate">gettestordertemplate(merchantId, templateName, country=None)</code> |
| 1577 | <pre>Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. |
| 1578 | |
| 1579 | Args: |
| 1580 | merchantId: string, The ID of the account that should manage the order. This cannot be a multi-client account. (required) |
| 1581 | templateName: string, The name of the template to retrieve. (required) |
| 1582 | Allowed values |
| 1583 | template1 - |
| 1584 | template1a - |
| 1585 | template1b - |
| 1586 | template2 - |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1587 | template3 - |
| 1588 | country: string, The country of the template to retrieve. Defaults to `US`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1589 | |
| 1590 | Returns: |
| 1591 | An object of the form: |
| 1592 | |
| 1593 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1594 | "kind": "content#ordersGetTestOrderTemplateResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersGetTestOrderTemplateResponse". |
| 1595 | "template": { # The requested test order template. |
| 1596 | "enableOrderinvoices": True or False, # Whether the orderinvoices service should support this order. |
| 1597 | "kind": "content#testOrder", # Identifies what kind of resource this is. Value: the fixed string "`content#testOrder`" |
| 1598 | "lineItems": [ # Required. Line items that are ordered. At least one line item must be provided. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1599 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1600 | "product": { # Required. Product data from the time of the order placement. |
| 1601 | "brand": "A String", # Required. Brand of the item. |
| 1602 | "condition": "A String", # Required. Condition or state of the item. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1603 | # |
| 1604 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1605 | # - "`new`" |
| 1606 | "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. |
| 1607 | # |
| 1608 | # Acceptable values are: |
| 1609 | # - "`en`" |
| 1610 | # - "`fr`" |
| 1611 | "fees": [ # Fees for the item. Optional. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1612 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1613 | "amount": { # Amount of the fee. |
| 1614 | "currency": "A String", # The currency of the price. |
| 1615 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1616 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1617 | "name": "A String", # Name of the fee. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1618 | }, |
| 1619 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1620 | "gtin": "A String", # Global Trade Item Number (GTIN) of the item. Optional. |
| 1621 | "imageLink": "A String", # Required. URL of an image of the item. |
| 1622 | "itemGroupId": "A String", # Shared identifier for all variants of the same product. Optional. |
| 1623 | "mpn": "A String", # Manufacturer Part Number (MPN) of the item. Optional. |
| 1624 | "offerId": "A String", # Required. An identifier of the item. |
| 1625 | "price": { # Required. The price for the product. Tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied. |
| 1626 | "currency": "A String", # The currency of the price. |
| 1627 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1628 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1629 | "targetCountry": "A String", # Required. The CLDR territory code of the target country of the product. |
| 1630 | "title": "A String", # Required. The title of the product. |
| 1631 | "variantAttributes": [ # Variant attributes for the item. Optional. |
| 1632 | { |
| 1633 | "dimension": "A String", # The dimension of the variant. |
| 1634 | "value": "A String", # The value for the dimension. |
| 1635 | }, |
| 1636 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1637 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1638 | "quantityOrdered": 42, # Required. Number of items ordered. |
| 1639 | "returnInfo": { # Required. Details of the return policy for the line item. |
| 1640 | "daysToReturn": 42, # Required. How many days later the item can be returned. |
| 1641 | "isReturnable": True or False, # Required. Whether the item is returnable. |
| 1642 | "policyUrl": "A String", # Required. URL of the item return policy. |
| 1643 | }, |
| 1644 | "shippingDetails": { # Required. Details of the requested shipping for the line item. |
| 1645 | "deliverByDate": "A String", # Required. The delivery by date, in ISO 8601 format. |
| 1646 | "method": { # Required. Details of the shipping method. |
| 1647 | "carrier": "A String", # The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values. |
| 1648 | "maxDaysInTransit": 42, # Required. Maximum transit time. |
| 1649 | "methodName": "A String", # Required. The name of the shipping method. |
| 1650 | "minDaysInTransit": 42, # Required. Minimum transit time. |
| 1651 | }, |
| 1652 | "shipByDate": "A String", # Required. The ship by date, in ISO 8601 format. |
| 1653 | "type": "A String", # Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1654 | # |
| 1655 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1656 | # - "`delivery`" |
| 1657 | # - "`pickup`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1658 | }, |
| 1659 | }, |
| 1660 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1661 | "notificationMode": "A String", # Restricted. Do not use. |
| 1662 | "predefinedBillingAddress": "A String", # Required. The billing address. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1663 | # |
| 1664 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1665 | # - "`dwight`" |
| 1666 | # - "`jim`" |
| 1667 | # - "`pam`" |
| 1668 | "predefinedDeliveryAddress": "A String", # Required. Identifier of one of the predefined delivery addresses for the delivery. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1669 | # |
| 1670 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1671 | # - "`dwight`" |
| 1672 | # - "`jim`" |
| 1673 | # - "`pam`" |
| 1674 | "predefinedEmail": "A String", # Required. Email address of the customer. |
| 1675 | # |
| 1676 | # Acceptable values are: |
| 1677 | # - "`pog.dwight.schrute@gmail.com`" |
| 1678 | # - "`pog.jim.halpert@gmail.com`" |
| 1679 | # - "`penpog.pam.beesly@gmail.comding`" |
| 1680 | "predefinedPickupDetails": "A String", # Identifier of one of the predefined pickup details. Required for orders containing line items with shipping type `pickup`. |
| 1681 | # |
| 1682 | # Acceptable values are: |
| 1683 | # - "`dwight`" |
| 1684 | # - "`jim`" |
| 1685 | # - "`pam`" |
| 1686 | "promotions": [ # Promotions associated with the order. |
| 1687 | { |
| 1688 | "applicableItems": [ # Items which this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. |
| 1689 | { |
| 1690 | "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. |
| 1691 | "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. |
| 1692 | "productId": "A String", # `orders.createtestorder`. |
| 1693 | "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. |
| 1694 | }, |
| 1695 | ], |
| 1696 | "appliedItems": [ # Items which this promotion have been applied to. Do not provide for `orders.createtestorder`. |
| 1697 | { |
| 1698 | "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. |
| 1699 | "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. |
| 1700 | "productId": "A String", # `orders.createtestorder`. |
| 1701 | "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. |
| 1702 | }, |
| 1703 | ], |
| 1704 | "endTime": "A String", # Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". |
| 1705 | "funder": "A String", # Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. |
| 1706 | # |
| 1707 | # Acceptable values are: |
| 1708 | # - "`google`" |
| 1709 | # - "`merchant`" |
| 1710 | "merchantPromotionId": "A String", # Required. This field is used to identify promotions within merchants' own systems. |
| 1711 | "priceValue": { # Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. |
| 1712 | "currency": "A String", # The currency of the price. |
| 1713 | "value": "A String", # The price represented as a number. |
| 1714 | }, |
| 1715 | "shortTitle": "A String", # A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`. |
| 1716 | "startTime": "A String", # Promotion start time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". |
| 1717 | "subtype": "A String", # Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. |
| 1718 | # |
| 1719 | # Acceptable values are: |
| 1720 | # - "`buyMGetMoneyOff`" |
| 1721 | # - "`buyMGetNMoneyOff`" |
| 1722 | # - "`buyMGetNPercentOff`" |
| 1723 | # - "`buyMGetPercentOff`" |
| 1724 | # - "`freeGift`" |
| 1725 | # - "`freeGiftWithItemId`" |
| 1726 | # - "`freeGiftWithValue`" |
| 1727 | # - "`freeShippingOvernight`" |
| 1728 | # - "`freeShippingStandard`" |
| 1729 | # - "`freeShippingTwoDay`" |
| 1730 | # - "`moneyOff`" |
| 1731 | # - "`percentOff`" |
| 1732 | # - "`rewardPoints`" |
| 1733 | # - "`salePrice`" |
| 1734 | "taxValue": { # Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`. |
| 1735 | "currency": "A String", # The currency of the price. |
| 1736 | "value": "A String", # The price represented as a number. |
| 1737 | }, |
| 1738 | "title": "A String", # Required. The title of the promotion. |
| 1739 | "type": "A String", # Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. |
| 1740 | # |
| 1741 | # Acceptable values are: |
| 1742 | # - "`product`" |
| 1743 | # - "`shipping`" |
| 1744 | }, |
| 1745 | ], |
| 1746 | "shippingCost": { # Required. The price of shipping for all items. Shipping tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied. Note that shipping is not taxed in certain states. |
| 1747 | "currency": "A String", # The currency of the price. |
| 1748 | "value": "A String", # The price represented as a number. |
| 1749 | }, |
| 1750 | "shippingOption": "A String", # Required. The requested shipping option. |
| 1751 | # |
| 1752 | # Acceptable values are: |
| 1753 | # - "`economy`" |
| 1754 | # - "`expedited`" |
| 1755 | # - "`oneDay`" |
| 1756 | # - "`sameDay`" |
| 1757 | # - "`standard`" |
| 1758 | # - "`twoDay`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1759 | }, |
| 1760 | }</pre> |
| 1761 | </div> |
| 1762 | |
| 1763 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1764 | <code class="details" id="instorerefundlineitem">instorerefundlineitem(merchantId, orderId, body=None)</code> |
| 1765 | <pre>Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1766 | Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return. |
| 1767 | |
| 1768 | Args: |
| 1769 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 1770 | orderId: string, The ID of the order. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1771 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1772 | The object takes the form of: |
| 1773 | |
| 1774 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1775 | "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. |
| 1776 | "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. |
| 1777 | "priceAmount": { # The amount to be refunded. This may be pre-tax or post-tax depending on the location of the order. Required. |
| 1778 | "currency": "A String", # The currency of the price. |
| 1779 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1780 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1781 | "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. |
| 1782 | "quantity": 42, # The quantity to return and refund. |
| 1783 | "reason": "A String", # The reason for the return. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1784 | # |
| 1785 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1786 | # - "`customerDiscretionaryReturn`" |
| 1787 | # - "`customerInitiatedMerchantCancel`" |
| 1788 | # - "`deliveredTooLate`" |
| 1789 | # - "`expiredItem`" |
| 1790 | # - "`invalidCoupon`" |
| 1791 | # - "`malformedShippingAddress`" |
| 1792 | # - "`other`" |
| 1793 | # - "`productArrivedDamaged`" |
| 1794 | # - "`productNotAsDescribed`" |
| 1795 | # - "`qualityNotAsExpected`" |
| 1796 | # - "`undeliverableShippingAddress`" |
| 1797 | # - "`unsupportedPoBoxAddress`" |
| 1798 | # - "`wrongProductShipped`" |
| 1799 | "reasonText": "A String", # The explanation of the reason. |
| 1800 | "taxAmount": { # The amount of tax to be refunded. Required. |
| 1801 | "currency": "A String", # The currency of the price. |
| 1802 | "value": "A String", # The price represented as a number. |
| 1803 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1804 | } |
| 1805 | |
| 1806 | |
| 1807 | Returns: |
| 1808 | An object of the form: |
| 1809 | |
| 1810 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1811 | "executionStatus": "A String", # The status of the execution. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1812 | # |
| 1813 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1814 | # - "`duplicate`" |
| 1815 | # - "`executed`" |
| 1816 | "kind": "content#ordersInStoreRefundLineItemResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersInStoreRefundLineItemResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1817 | }</pre> |
| 1818 | </div> |
| 1819 | |
| 1820 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1821 | <code class="details" id="list">list(merchantId, acknowledged=None, maxResults=None, orderBy=None, pageToken=None, placedDateEnd=None, placedDateStart=None, statuses=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1822 | <pre>Lists the orders in your Merchant Center account. |
| 1823 | |
| 1824 | Args: |
| 1825 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1826 | 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. |
| 1827 | We recommend using this filter set to `false`, in conjunction with the `acknowledge` call, such that only un-acknowledged orders are returned. |
| 1828 | 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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1829 | orderBy: string, Order results by placement date in descending or ascending order. |
| 1830 | |
| 1831 | Acceptable values are: |
| 1832 | - placedDateAsc |
| 1833 | - placedDateDesc |
| 1834 | pageToken: string, The token returned by the previous request. |
| 1835 | placedDateEnd: string, Obtains orders placed before this date (exclusively), in ISO 8601 format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1836 | placedDateStart: string, Obtains orders placed after this date (inclusively), in ISO 8601 format. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1837 | statuses: string, Obtains orders that match any of the specified statuses. Please note that `active` is a shortcut for `pendingShipment` and `partiallyShipped`, and `completed` is a shortcut for `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, `returned`, and `canceled`. (repeated) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1838 | Allowed values |
| 1839 | active - |
| 1840 | canceled - |
| 1841 | completed - |
| 1842 | delivered - |
| 1843 | inProgress - |
| 1844 | partiallyDelivered - |
| 1845 | partiallyReturned - |
| 1846 | partiallyShipped - |
| 1847 | pendingShipment - |
| 1848 | returned - |
| 1849 | shipped - |
| 1850 | |
| 1851 | Returns: |
| 1852 | An object of the form: |
| 1853 | |
| 1854 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1855 | "kind": "content#ordersListResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersListResponse". |
| 1856 | "nextPageToken": "A String", # The token for the retrieval of the next page of orders. |
| 1857 | "resources": [ |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1858 | { # Order. Production access (all methods) requires the order manager role. Sandbox access does not. (== resource_for v2.orders ==) (== resource_for v2.1.orders ==) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1859 | "acknowledged": True or False, # Whether the order was acknowledged. |
| 1860 | "billingAddress": { # The billing address. |
| 1861 | "country": "A String", # CLDR country code (e.g. "US"). |
| 1862 | "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: |
| 1863 | # John Smith |
| 1864 | # 1600 Amphitheatre Parkway |
| 1865 | # Mountain View, CA, 94043 |
| 1866 | # United States |
| 1867 | "A String", |
| 1868 | ], |
| 1869 | "isPostOfficeBox": True or False, # Whether the address is a post office box. |
| 1870 | "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). |
| 1871 | "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). |
| 1872 | "recipientName": "A String", # Name of the recipient. |
| 1873 | "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). |
| 1874 | "streetAddress": [ # Street-level part of the address. |
| 1875 | "A String", |
| 1876 | ], |
| 1877 | }, |
| 1878 | "customer": { # The details of the customer who placed the order. |
| 1879 | "fullName": "A String", # Full name of the customer. |
| 1880 | "invoiceReceivingEmail": "A String", # Email address for the merchant to send value-added tax or invoice documentation of the order. Only the last document sent is made available to the customer. For more information, see About automated VAT invoicing for Shopping Actions. |
| 1881 | "loyaltyInfo": { # Loyalty program information. |
| 1882 | "loyaltyNumber": "A String", # The loyalty card/membership number. |
| 1883 | "name": "A String", # Name of card/membership holder, this field will be populated when |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1884 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1885 | "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. |
| 1886 | "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. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1887 | # |
| 1888 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1889 | # - "`denied`" |
| 1890 | # - "`granted`" |
| 1891 | "lastUpdatedTimestamp": "A String", # Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet. |
| 1892 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1893 | }, |
| 1894 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1895 | "deliveryDetails": { # Delivery details for shipments of type `delivery`. |
| 1896 | "address": { # The delivery address |
| 1897 | "country": "A String", # CLDR country code (e.g. "US"). |
| 1898 | "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: |
| 1899 | # John Smith |
| 1900 | # 1600 Amphitheatre Parkway |
| 1901 | # Mountain View, CA, 94043 |
| 1902 | # United States |
| 1903 | "A String", |
| 1904 | ], |
| 1905 | "isPostOfficeBox": True or False, # Whether the address is a post office box. |
| 1906 | "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). |
| 1907 | "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). |
| 1908 | "recipientName": "A String", # Name of the recipient. |
| 1909 | "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). |
| 1910 | "streetAddress": [ # Street-level part of the address. |
| 1911 | "A String", |
| 1912 | ], |
| 1913 | }, |
| 1914 | "phoneNumber": "A String", # The phone number of the person receiving the delivery. |
| 1915 | }, |
| 1916 | "id": "A String", # The REST ID of the order. Globally unique. |
| 1917 | "kind": "content#order", # Identifies what kind of resource this is. Value: the fixed string "`content#order`" |
| 1918 | "lineItems": [ # Line items that are ordered. |
| 1919 | { |
| 1920 | "adjustments": [ # Price and tax adjustments applied on the line item. |
| 1921 | { |
| 1922 | "priceAdjustment": { # Adjustment for total price of the line item. |
| 1923 | "currency": "A String", # The currency of the price. |
| 1924 | "value": "A String", # The price represented as a number. |
| 1925 | }, |
| 1926 | "taxAdjustment": { # Adjustment for total tax of the line item. |
| 1927 | "currency": "A String", # The currency of the price. |
| 1928 | "value": "A String", # The price represented as a number. |
| 1929 | }, |
| 1930 | "type": "A String", # Type of this adjustment. |
| 1931 | # |
| 1932 | # Acceptable values are: |
| 1933 | # - "`promotion`" |
| 1934 | }, |
| 1935 | ], |
| 1936 | "annotations": [ # Annotations that are attached to the line item. |
| 1937 | { |
| 1938 | "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. |
| 1939 | "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. |
| 1940 | }, |
| 1941 | ], |
| 1942 | "cancellations": [ # Cancellations of the line item. |
| 1943 | { |
| 1944 | "actor": "A String", # The actor that created the cancellation. |
| 1945 | # |
| 1946 | # Acceptable values are: |
| 1947 | # - "`customer`" |
| 1948 | # - "`googleBot`" |
| 1949 | # - "`googleCustomerService`" |
| 1950 | # - "`googlePayments`" |
| 1951 | # - "`googleSabre`" |
| 1952 | # - "`merchant`" |
| 1953 | "creationDate": "A String", # Date on which the cancellation has been created, in ISO 8601 format. |
| 1954 | "quantity": 42, # The quantity that was canceled. |
| 1955 | "reason": "A String", # The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Shopping Actions until you make an update to that product. This will not affect your Shopping ads. |
| 1956 | # |
| 1957 | # Acceptable values are: |
| 1958 | # - "`autoPostInternal`" |
| 1959 | # - "`autoPostInvalidBillingAddress`" |
| 1960 | # - "`autoPostNoInventory`" |
| 1961 | # - "`autoPostPriceError`" |
| 1962 | # - "`autoPostUndeliverableShippingAddress`" |
| 1963 | # - "`couponAbuse`" |
| 1964 | # - "`customerCanceled`" |
| 1965 | # - "`customerInitiatedCancel`" |
| 1966 | # - "`customerSupportRequested`" |
| 1967 | # - "`failToPushOrderGoogleError`" |
| 1968 | # - "`failToPushOrderMerchantError`" |
| 1969 | # - "`failToPushOrderMerchantFulfillmentError`" |
| 1970 | # - "`failToPushOrderToMerchant`" |
| 1971 | # - "`failToPushOrderToMerchantOutOfStock`" |
| 1972 | # - "`invalidCoupon`" |
| 1973 | # - "`malformedShippingAddress`" |
| 1974 | # - "`merchantDidNotShipOnTime`" |
| 1975 | # - "`noInventory`" |
| 1976 | # - "`orderTimeout`" |
| 1977 | # - "`other`" |
| 1978 | # - "`paymentAbuse`" |
| 1979 | # - "`paymentDeclined`" |
| 1980 | # - "`priceError`" |
| 1981 | # - "`returnRefundAbuse`" |
| 1982 | # - "`shippingPriceError`" |
| 1983 | # - "`taxError`" |
| 1984 | # - "`undeliverableShippingAddress`" |
| 1985 | # - "`unsupportedPoBoxAddress`" |
| 1986 | "reasonText": "A String", # The explanation of the reason. |
| 1987 | }, |
| 1988 | ], |
| 1989 | "id": "A String", # The ID of the line item. |
| 1990 | "price": { # Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. |
| 1991 | "currency": "A String", # The currency of the price. |
| 1992 | "value": "A String", # The price represented as a number. |
| 1993 | }, |
| 1994 | "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. |
| 1995 | "brand": "A String", # Brand of the item. |
| 1996 | "condition": "A String", # Condition or state of the item. |
| 1997 | # |
| 1998 | # Acceptable values are: |
| 1999 | # - "`new`" |
| 2000 | # - "`refurbished`" |
| 2001 | # - "`used`" |
| 2002 | "contentLanguage": "A String", # The two-letter ISO 639-1 language code for the item. |
| 2003 | "fees": [ # Associated fees at order creation time. |
| 2004 | { |
| 2005 | "amount": { # Amount of the fee. |
| 2006 | "currency": "A String", # The currency of the price. |
| 2007 | "value": "A String", # The price represented as a number. |
| 2008 | }, |
| 2009 | "name": "A String", # Name of the fee. |
| 2010 | }, |
| 2011 | ], |
| 2012 | "gtin": "A String", # Global Trade Item Number (GTIN) of the item. |
| 2013 | "id": "A String", # The REST ID of the product. |
| 2014 | "imageLink": "A String", # URL of an image of the item. |
| 2015 | "itemGroupId": "A String", # Shared identifier for all variants of the same product. |
| 2016 | "mpn": "A String", # Manufacturer Part Number (MPN) of the item. |
| 2017 | "offerId": "A String", # An identifier of the item. |
| 2018 | "price": { # Price of the item. |
| 2019 | "currency": "A String", # The currency of the price. |
| 2020 | "value": "A String", # The price represented as a number. |
| 2021 | }, |
| 2022 | "shownImage": "A String", # URL to the cached image shown to the user when order was placed. |
| 2023 | "targetCountry": "A String", # The CLDR territory code of the target country of the product. |
| 2024 | "title": "A String", # The title of the product. |
| 2025 | "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. |
| 2026 | { |
| 2027 | "dimension": "A String", # The dimension of the variant. |
| 2028 | "value": "A String", # The value for the dimension. |
| 2029 | }, |
| 2030 | ], |
| 2031 | }, |
| 2032 | "quantityCanceled": 42, # Number of items canceled. |
| 2033 | "quantityDelivered": 42, # Number of items delivered. |
| 2034 | "quantityOrdered": 42, # Number of items ordered. |
| 2035 | "quantityPending": 42, # Number of items pending. |
| 2036 | "quantityReadyForPickup": 42, # Number of items ready for pickup. |
| 2037 | "quantityReturned": 42, # Number of items returned. |
| 2038 | "quantityShipped": 42, # Number of items shipped. |
| 2039 | "quantityUndeliverable": 42, # Number of items undeliverable. |
| 2040 | "returnInfo": { # Details of the return policy for the line item. |
| 2041 | "daysToReturn": 42, # Required. How many days later the item can be returned. |
| 2042 | "isReturnable": True or False, # Required. Whether the item is returnable. |
| 2043 | "policyUrl": "A String", # Required. URL of the item return policy. |
| 2044 | }, |
| 2045 | "returns": [ # Returns of the line item. |
| 2046 | { |
| 2047 | "actor": "A String", # The actor that created the refund. |
| 2048 | # |
| 2049 | # Acceptable values are: |
| 2050 | # - "`customer`" |
| 2051 | # - "`googleBot`" |
| 2052 | # - "`googleCustomerService`" |
| 2053 | # - "`googlePayments`" |
| 2054 | # - "`googleSabre`" |
| 2055 | # - "`merchant`" |
| 2056 | "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. |
| 2057 | "quantity": 42, # Quantity that is returned. |
| 2058 | "reason": "A String", # The reason for the return. |
| 2059 | # |
| 2060 | # Acceptable values are: |
| 2061 | # - "`customerDiscretionaryReturn`" |
| 2062 | # - "`customerInitiatedMerchantCancel`" |
| 2063 | # - "`deliveredTooLate`" |
| 2064 | # - "`expiredItem`" |
| 2065 | # - "`invalidCoupon`" |
| 2066 | # - "`malformedShippingAddress`" |
| 2067 | # - "`other`" |
| 2068 | # - "`productArrivedDamaged`" |
| 2069 | # - "`productNotAsDescribed`" |
| 2070 | # - "`qualityNotAsExpected`" |
| 2071 | # - "`undeliverableShippingAddress`" |
| 2072 | # - "`unsupportedPoBoxAddress`" |
| 2073 | # - "`wrongProductShipped`" |
| 2074 | "reasonText": "A String", # The explanation of the reason. |
| 2075 | }, |
| 2076 | ], |
| 2077 | "shippingDetails": { # Details of the requested shipping for the line item. |
| 2078 | "deliverByDate": "A String", # Required. The delivery by date, in ISO 8601 format. |
| 2079 | "method": { # Required. Details of the shipping method. |
| 2080 | "carrier": "A String", # The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values. |
| 2081 | "maxDaysInTransit": 42, # Required. Maximum transit time. |
| 2082 | "methodName": "A String", # Required. The name of the shipping method. |
| 2083 | "minDaysInTransit": 42, # Required. Minimum transit time. |
| 2084 | }, |
| 2085 | "shipByDate": "A String", # Required. The ship by date, in ISO 8601 format. |
| 2086 | "type": "A String", # Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. |
| 2087 | # |
| 2088 | # Acceptable values are: |
| 2089 | # - "`delivery`" |
| 2090 | # - "`pickup`" |
| 2091 | }, |
| 2092 | "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. |
| 2093 | "currency": "A String", # The currency of the price. |
| 2094 | "value": "A String", # The price represented as a number. |
| 2095 | }, |
| 2096 | }, |
| 2097 | ], |
| 2098 | "merchantId": "A String", |
| 2099 | "merchantOrderId": "A String", # Merchant-provided ID of the order. |
| 2100 | "netPriceAmount": { # The net amount for the order (price part). For example, if an order was originally for $100 and a refund was issued for $20, the net amount will be $80. |
| 2101 | "currency": "A String", # The currency of the price. |
| 2102 | "value": "A String", # The price represented as a number. |
| 2103 | }, |
| 2104 | "netTaxAmount": { # The net amount for the order (tax part). Note that in certain cases due to taxable base adjustment `netTaxAmount` might not match to a sum of tax field across all lineItems and refunds. |
| 2105 | "currency": "A String", # The currency of the price. |
| 2106 | "value": "A String", # The price represented as a number. |
| 2107 | }, |
| 2108 | "paymentStatus": "A String", # The status of the payment. |
| 2109 | # |
| 2110 | # Acceptable values are: |
| 2111 | # - "`paymentCaptured`" |
| 2112 | # - "`paymentRejected`" |
| 2113 | # - "`paymentSecured`" |
| 2114 | # - "`pendingAuthorization`" |
| 2115 | "pickupDetails": { # Pickup details for shipments of type `pickup`. |
| 2116 | "address": { # Address of the pickup location where the shipment should be sent. Note that `recipientName` in the address is the name of the business at the pickup location. |
| 2117 | "country": "A String", # CLDR country code (e.g. "US"). |
| 2118 | "fullAddress": [ # Strings representing the lines of the printed label for mailing the order, for example: |
| 2119 | # John Smith |
| 2120 | # 1600 Amphitheatre Parkway |
| 2121 | # Mountain View, CA, 94043 |
| 2122 | # United States |
| 2123 | "A String", |
| 2124 | ], |
| 2125 | "isPostOfficeBox": True or False, # Whether the address is a post office box. |
| 2126 | "locality": "A String", # City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). |
| 2127 | "postalCode": "A String", # Postal Code or ZIP (e.g. "94043"). |
| 2128 | "recipientName": "A String", # Name of the recipient. |
| 2129 | "region": "A String", # Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). |
| 2130 | "streetAddress": [ # Street-level part of the address. |
| 2131 | "A String", |
| 2132 | ], |
| 2133 | }, |
| 2134 | "collectors": [ # Collectors authorized to pick up shipment from the pickup location. |
| 2135 | { |
| 2136 | "name": "A String", # Name of the person picking up the shipment. |
| 2137 | "phoneNumber": "A String", # Phone number of the person picking up the shipment. |
| 2138 | }, |
| 2139 | ], |
| 2140 | "locationId": "A String", # ID of the pickup location. |
| 2141 | }, |
| 2142 | "placedDate": "A String", # The date when the order was placed, in ISO 8601 format. |
| 2143 | "promotions": [ # Promotions associated with the order. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2144 | # |
| 2145 | # To determine which promotions apply to which products, check the `Promotions[].appliedItems[].lineItemId` field against the `LineItems[].id` field for each promotion. If a promotion is applied to more than 1 offerId, divide the discount value by the number of affected offers to determine how much discount to apply to each offerId. |
| 2146 | # |
| 2147 | # Examples: |
| 2148 | # - To calculate price paid by the customer for a single line item including the discount: For each promotion, subtract the `LineItems[].adjustments[].priceAdjustment.value` amount from the `LineItems[].Price.value`. |
| 2149 | # - To calculate price paid by the customer for a single line item including the discount in case of multiple quantity: For each promotion, divide the `LineItems[].adjustments[].priceAdjustment.value` by the quantity of products then subtract the resulting value from the `LineItems[].Product.Price.value` for each quantity item. |
| 2150 | # |
| 2151 | # Only 1 promotion can be applied to an offerId in a given order. To refund an item which had a promotion applied to it, make sure to refund the amount after first subtracting the promotion discount from the item price. |
| 2152 | # |
| 2153 | # More details about the program are here. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2154 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2155 | "applicableItems": [ # Items which this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2156 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2157 | "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. |
| 2158 | "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. |
| 2159 | "productId": "A String", # `orders.createtestorder`. |
| 2160 | "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2161 | }, |
| 2162 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2163 | "appliedItems": [ # Items which this promotion have been applied to. Do not provide for `orders.createtestorder`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2164 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2165 | "lineItemId": "A String", # The line item ID of a product. Do not provide for `orders.createtestorder`. |
| 2166 | "offerId": "A String", # Required. Offer ID of a product. Only for `orders.createtestorder`. |
| 2167 | "productId": "A String", # `orders.createtestorder`. |
| 2168 | "quantity": 42, # The quantity of the associated product. Do not provide for `orders.createtestorder`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2169 | }, |
| 2170 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2171 | "endTime": "A String", # Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". |
| 2172 | "funder": "A String", # Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2173 | # |
| 2174 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2175 | # - "`google`" |
| 2176 | # - "`merchant`" |
| 2177 | "merchantPromotionId": "A String", # Required. This field is used to identify promotions within merchants' own systems. |
| 2178 | "priceValue": { # Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. |
| 2179 | "currency": "A String", # The currency of the price. |
| 2180 | "value": "A String", # The price represented as a number. |
| 2181 | }, |
| 2182 | "shortTitle": "A String", # A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`. |
| 2183 | "startTime": "A String", # Promotion start time in ISO 8601 format. Date, time, and offset required, e.g., "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z". |
| 2184 | "subtype": "A String", # Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2185 | # |
| 2186 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2187 | # - "`buyMGetMoneyOff`" |
| 2188 | # - "`buyMGetNMoneyOff`" |
| 2189 | # - "`buyMGetNPercentOff`" |
| 2190 | # - "`buyMGetPercentOff`" |
| 2191 | # - "`freeGift`" |
| 2192 | # - "`freeGiftWithItemId`" |
| 2193 | # - "`freeGiftWithValue`" |
| 2194 | # - "`freeShippingOvernight`" |
| 2195 | # - "`freeShippingStandard`" |
| 2196 | # - "`freeShippingTwoDay`" |
| 2197 | # - "`moneyOff`" |
| 2198 | # - "`percentOff`" |
| 2199 | # - "`rewardPoints`" |
| 2200 | # - "`salePrice`" |
| 2201 | "taxValue": { # Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`. |
| 2202 | "currency": "A String", # The currency of the price. |
| 2203 | "value": "A String", # The price represented as a number. |
| 2204 | }, |
| 2205 | "title": "A String", # Required. The title of the promotion. |
| 2206 | "type": "A String", # Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. |
| 2207 | # |
| 2208 | # Acceptable values are: |
| 2209 | # - "`product`" |
| 2210 | # - "`shipping`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2211 | }, |
| 2212 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2213 | "refunds": [ # Refunds for the order. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2214 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2215 | "actor": "A String", # The actor that created the refund. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2216 | # |
| 2217 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2218 | # - "`customer`" |
| 2219 | # - "`googleBot`" |
| 2220 | # - "`googleCustomerService`" |
| 2221 | # - "`googlePayments`" |
| 2222 | # - "`googleSabre`" |
| 2223 | # - "`merchant`" |
| 2224 | "amount": { # The amount that is refunded. |
| 2225 | "currency": "A String", # The currency of the price. |
| 2226 | "value": "A String", # The price represented as a number. |
| 2227 | }, |
| 2228 | "creationDate": "A String", # Date on which the item has been created, in ISO 8601 format. |
| 2229 | "reason": "A String", # The reason for the refund. |
| 2230 | # |
| 2231 | # Acceptable values are: |
| 2232 | # - "`adjustment`" |
| 2233 | # - "`autoPostInternal`" |
| 2234 | # - "`autoPostInvalidBillingAddress`" |
| 2235 | # - "`autoPostNoInventory`" |
| 2236 | # - "`autoPostPriceError`" |
| 2237 | # - "`autoPostUndeliverableShippingAddress`" |
| 2238 | # - "`couponAbuse`" |
| 2239 | # - "`courtesyAdjustment`" |
| 2240 | # - "`customerCanceled`" |
| 2241 | # - "`customerDiscretionaryReturn`" |
| 2242 | # - "`customerInitiatedMerchantCancel`" |
| 2243 | # - "`customerSupportRequested`" |
| 2244 | # - "`deliveredLateByCarrier`" |
| 2245 | # - "`deliveredTooLate`" |
| 2246 | # - "`expiredItem`" |
| 2247 | # - "`failToPushOrderGoogleError`" |
| 2248 | # - "`failToPushOrderMerchantError`" |
| 2249 | # - "`failToPushOrderMerchantFulfillmentError`" |
| 2250 | # - "`failToPushOrderToMerchant`" |
| 2251 | # - "`failToPushOrderToMerchantOutOfStock`" |
| 2252 | # - "`feeAdjustment`" |
| 2253 | # - "`invalidCoupon`" |
| 2254 | # - "`lateShipmentCredit`" |
| 2255 | # - "`malformedShippingAddress`" |
| 2256 | # - "`merchantDidNotShipOnTime`" |
| 2257 | # - "`noInventory`" |
| 2258 | # - "`orderTimeout`" |
| 2259 | # - "`other`" |
| 2260 | # - "`paymentAbuse`" |
| 2261 | # - "`paymentDeclined`" |
| 2262 | # - "`priceAdjustment`" |
| 2263 | # - "`priceError`" |
| 2264 | # - "`productArrivedDamaged`" |
| 2265 | # - "`productNotAsDescribed`" |
| 2266 | # - "`promoReallocation`" |
| 2267 | # - "`qualityNotAsExpected`" |
| 2268 | # - "`returnRefundAbuse`" |
| 2269 | # - "`shippingCostAdjustment`" |
| 2270 | # - "`shippingPriceError`" |
| 2271 | # - "`taxAdjustment`" |
| 2272 | # - "`taxError`" |
| 2273 | # - "`undeliverableShippingAddress`" |
| 2274 | # - "`unsupportedPoBoxAddress`" |
| 2275 | # - "`wrongProductShipped`" |
| 2276 | "reasonText": "A String", # The explanation of the reason. |
| 2277 | }, |
| 2278 | ], |
| 2279 | "shipments": [ # Shipments of the order. |
| 2280 | { |
| 2281 | "carrier": "A String", # The carrier handling the shipment. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2282 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2283 | # For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. Note: You can also use unsupported carriers, but emails to customers will not include the carrier name or tracking URL, and there will be no automatic order status updates. |
| 2284 | # Supported carriers for US are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2285 | # - "`ups`" (United Parcel Service) automatic status updates |
| 2286 | # - "`usps`" (United States Postal Service) automatic status updates |
| 2287 | # - "`fedex`" (FedEx) automatic status updates |
| 2288 | # - "`dhl`" (DHL eCommerce) automatic status updates (US only) |
| 2289 | # - "`ontrac`" (OnTrac) automatic status updates |
| 2290 | # - "`dhl express`" (DHL Express) |
| 2291 | # - "`deliv`" (Deliv) |
| 2292 | # - "`dynamex`" (TForce) |
| 2293 | # - "`lasership`" (LaserShip) |
| 2294 | # - "`mpx`" (Military Parcel Xpress) |
| 2295 | # - "`uds`" (United Delivery Service) |
| 2296 | # - "`efw`" (Estes Forwarding Worldwide) |
| 2297 | # - "`jd logistics`" (JD Logistics) |
| 2298 | # - "`yunexpress`" (YunExpress) |
| 2299 | # - "`china post`" (China Post) |
| 2300 | # - "`china ems`" (China Post Express Mail Service) |
| 2301 | # - "`singapore post`" (Singapore Post) |
| 2302 | # - "`pos malaysia`" (Pos Malaysia) |
| 2303 | # - "`postnl`" (PostNL) |
| 2304 | # - "`ptt`" (PTT Turkish Post) |
| 2305 | # - "`eub`" (ePacket) |
| 2306 | # - "`chukou1`" (Chukou1 Logistics) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2307 | # Supported carriers for FR are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2308 | # - "`la poste`" (La Poste) automatic status updates |
| 2309 | # - "`colissimo`" (Colissimo by La Poste) automatic status updates |
| 2310 | # - "`ups`" (United Parcel Service) automatic status updates |
| 2311 | # - "`chronopost`" (Chronopost by La Poste) |
| 2312 | # - "`gls`" (General Logistics Systems France) |
| 2313 | # - "`dpd`" (DPD Group by GeoPost) |
| 2314 | # - "`bpost`" (Belgian Post Group) |
| 2315 | # - "`colis prive`" (Colis Privé) |
| 2316 | # - "`boxtal`" (Boxtal) |
| 2317 | # - "`geodis`" (GEODIS) |
| 2318 | # - "`tnt`" (TNT) |
| 2319 | # - "`db schenker`" (DB Schenker) |
| 2320 | # - "`aramex`" (Aramex) |
| 2321 | "creationDate": "A String", # Date on which the shipment has been created, in ISO 8601 format. |
| 2322 | "deliveryDate": "A String", # Date on which the shipment has been delivered, in ISO 8601 format. Present only if `status` is `delivered` |
| 2323 | "id": "A String", # The ID of the shipment. |
| 2324 | "lineItems": [ # The line items that are shipped. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2325 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2326 | "lineItemId": "A String", # The ID of the line item that is shipped. This value is assigned by Google when an order is created. Either lineItemId or productId is required. |
| 2327 | "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. |
| 2328 | "quantity": 42, # The quantity that is shipped. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2329 | }, |
| 2330 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2331 | "shipmentGroupId": "A String", # The shipment group ID of the shipment. This is set in shiplineitems request. |
| 2332 | "status": "A String", # The status of the shipment. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2333 | # |
| 2334 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2335 | # - "`delivered`" |
| 2336 | # - "`readyForPickup`" |
| 2337 | # - "`shipped`" |
| 2338 | # - "`undeliverable`" |
| 2339 | "trackingId": "A String", # The tracking ID for the shipment. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2340 | }, |
| 2341 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2342 | "shippingCost": { # The total cost of shipping for all items. |
| 2343 | "currency": "A String", # The currency of the price. |
| 2344 | "value": "A String", # The price represented as a number. |
| 2345 | }, |
| 2346 | "shippingCostTax": { # The tax for the total shipping cost. |
| 2347 | "currency": "A String", # The currency of the price. |
| 2348 | "value": "A String", # The price represented as a number. |
| 2349 | }, |
| 2350 | "status": "A String", # The status of the order. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2351 | # |
| 2352 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2353 | # - "`canceled`" |
| 2354 | # - "`delivered`" |
| 2355 | # - "`inProgress`" |
| 2356 | # - "`partiallyDelivered`" |
| 2357 | # - "`partiallyReturned`" |
| 2358 | # - "`partiallyShipped`" |
| 2359 | # - "`pendingShipment`" |
| 2360 | # - "`returned`" |
| 2361 | # - "`shipped`" |
| 2362 | "taxCollector": "A String", # The party responsible for collecting and remitting taxes. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2363 | # |
| 2364 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2365 | # - "`marketplaceFacilitator`" |
| 2366 | # - "`merchant`" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2367 | }, |
| 2368 | ], |
| 2369 | }</pre> |
| 2370 | </div> |
| 2371 | |
| 2372 | <div class="method"> |
| 2373 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 2374 | <pre>Retrieves the next page of results. |
| 2375 | |
| 2376 | Args: |
| 2377 | previous_request: The request for the previous page. (required) |
| 2378 | previous_response: The response from the request for the previous page. (required) |
| 2379 | |
| 2380 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2381 | A request object that you can call 'execute()' on to request the next |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2382 | page. Returns None if there are no more items in the collection. |
| 2383 | </pre> |
| 2384 | </div> |
| 2385 | |
| 2386 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2387 | <code class="details" id="rejectreturnlineitem">rejectreturnlineitem(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2388 | <pre>Rejects return on an line item. |
| 2389 | |
| 2390 | Args: |
| 2391 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 2392 | orderId: string, The ID of the order. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2393 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2394 | The object takes the form of: |
| 2395 | |
| 2396 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2397 | "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. |
| 2398 | "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. |
| 2399 | "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. |
| 2400 | "quantity": 42, # The quantity to return and refund. |
| 2401 | "reason": "A String", # The reason for the return. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2402 | # |
| 2403 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2404 | # - "`damagedOrUsed`" |
| 2405 | # - "`missingComponent`" |
| 2406 | # - "`notEligible`" |
| 2407 | # - "`other`" |
| 2408 | # - "`outOfReturnWindow`" |
| 2409 | "reasonText": "A String", # The explanation of the reason. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2410 | } |
| 2411 | |
| 2412 | |
| 2413 | Returns: |
| 2414 | An object of the form: |
| 2415 | |
| 2416 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2417 | "executionStatus": "A String", # The status of the execution. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2418 | # |
| 2419 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2420 | # - "`duplicate`" |
| 2421 | # - "`executed`" |
| 2422 | "kind": "content#ordersRejectReturnLineItemResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersRejectReturnLineItemResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2423 | }</pre> |
| 2424 | </div> |
| 2425 | |
| 2426 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2427 | <code class="details" id="returnrefundlineitem">returnrefundlineitem(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2428 | <pre>Returns and refunds a line item. Note that this method can only be called on fully shipped orders. |
| 2429 | |
| 2430 | Args: |
| 2431 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 2432 | orderId: string, The ID of the order. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2433 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2434 | The object takes the form of: |
| 2435 | |
| 2436 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2437 | "lineItemId": "A String", # The ID of the line item to return. Either lineItemId or productId is required. |
| 2438 | "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. |
| 2439 | "priceAmount": { # The amount to be refunded. This may be pre-tax or post-tax depending on the location of the order. If omitted, refundless return is assumed. |
| 2440 | "currency": "A String", # The currency of the price. |
| 2441 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2442 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2443 | "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. |
| 2444 | "quantity": 42, # The quantity to return and refund. |
| 2445 | "reason": "A String", # The reason for the return. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2446 | # |
| 2447 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2448 | # - "`customerDiscretionaryReturn`" |
| 2449 | # - "`customerInitiatedMerchantCancel`" |
| 2450 | # - "`deliveredTooLate`" |
| 2451 | # - "`expiredItem`" |
| 2452 | # - "`invalidCoupon`" |
| 2453 | # - "`malformedShippingAddress`" |
| 2454 | # - "`other`" |
| 2455 | # - "`productArrivedDamaged`" |
| 2456 | # - "`productNotAsDescribed`" |
| 2457 | # - "`qualityNotAsExpected`" |
| 2458 | # - "`undeliverableShippingAddress`" |
| 2459 | # - "`unsupportedPoBoxAddress`" |
| 2460 | # - "`wrongProductShipped`" |
| 2461 | "reasonText": "A String", # The explanation of the reason. |
| 2462 | "taxAmount": { # The amount of tax to be refunded. Optional, but if filled, then priceAmount must be set. Calculated automatically if not provided. |
| 2463 | "currency": "A String", # The currency of the price. |
| 2464 | "value": "A String", # The price represented as a number. |
| 2465 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2466 | } |
| 2467 | |
| 2468 | |
| 2469 | Returns: |
| 2470 | An object of the form: |
| 2471 | |
| 2472 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2473 | "executionStatus": "A String", # The status of the execution. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2474 | # |
| 2475 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2476 | # - "`duplicate`" |
| 2477 | # - "`executed`" |
| 2478 | "kind": "content#ordersReturnRefundLineItemResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersReturnRefundLineItemResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2479 | }</pre> |
| 2480 | </div> |
| 2481 | |
| 2482 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2483 | <code class="details" id="setlineitemmetadata">setlineitemmetadata(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2484 | <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. |
| 2485 | |
| 2486 | Args: |
| 2487 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 2488 | orderId: string, The ID of the order. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2489 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2490 | The object takes the form of: |
| 2491 | |
| 2492 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2493 | "annotations": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2494 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2495 | "key": "A String", # Key for additional merchant provided (as key-value pairs) annotation about the line item. |
| 2496 | "value": "A String", # Value for additional merchant provided (as key-value pairs) annotation about the line item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2497 | }, |
| 2498 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2499 | "lineItemId": "A String", # The ID of the line item to set metadata. Either lineItemId or productId is required. |
| 2500 | "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. |
| 2501 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2502 | } |
| 2503 | |
| 2504 | |
| 2505 | Returns: |
| 2506 | An object of the form: |
| 2507 | |
| 2508 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2509 | "executionStatus": "A String", # The status of the execution. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2510 | # |
| 2511 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2512 | # - "`duplicate`" |
| 2513 | # - "`executed`" |
| 2514 | "kind": "content#ordersSetLineItemMetadataResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersSetLineItemMetadataResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2515 | }</pre> |
| 2516 | </div> |
| 2517 | |
| 2518 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2519 | <code class="details" id="shiplineitems">shiplineitems(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2520 | <pre>Marks line item(s) as shipped. |
| 2521 | |
| 2522 | Args: |
| 2523 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 2524 | orderId: string, The ID of the order. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2525 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2526 | The object takes the form of: |
| 2527 | |
| 2528 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2529 | "lineItems": [ # Line items to ship. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2530 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2531 | "lineItemId": "A String", # The ID of the line item that is shipped. This value is assigned by Google when an order is created. Either lineItemId or productId is required. |
| 2532 | "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. |
| 2533 | "quantity": 42, # The quantity that is shipped. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2534 | }, |
| 2535 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2536 | "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. |
| 2537 | "shipmentGroupId": "A String", # ID of the shipment group. Required for orders that use the orderinvoices service. |
| 2538 | "shipmentInfos": [ # Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2539 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2540 | "carrier": "A String", # The carrier handling the shipment. See `shipments[].carrier` in the Orders resource representation for a list of acceptable values. |
| 2541 | "shipmentId": "A String", # Required. The ID of the shipment. This is assigned by the merchant and is unique to each shipment. |
| 2542 | "trackingId": "A String", # The tracking ID for the shipment. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2543 | }, |
| 2544 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2545 | } |
| 2546 | |
| 2547 | |
| 2548 | Returns: |
| 2549 | An object of the form: |
| 2550 | |
| 2551 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2552 | "executionStatus": "A String", # The status of the execution. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2553 | # |
| 2554 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2555 | # - "`duplicate`" |
| 2556 | # - "`executed`" |
| 2557 | "kind": "content#ordersShipLineItemsResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersShipLineItemsResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2558 | }</pre> |
| 2559 | </div> |
| 2560 | |
| 2561 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2562 | <code class="details" id="updatelineitemshippingdetails">updatelineitemshippingdetails(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2563 | <pre>Updates ship by and delivery by dates for a line item. |
| 2564 | |
| 2565 | Args: |
| 2566 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 2567 | orderId: string, The ID of the order. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2568 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2569 | The object takes the form of: |
| 2570 | |
| 2571 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2572 | "deliverByDate": "A String", # Updated delivery by date, in ISO 8601 format. If not specified only ship by date is updated. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2573 | # |
| 2574 | # Provided date should be within 1 year timeframe and can not be a date in the past. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2575 | "lineItemId": "A String", # The ID of the line item to set metadata. Either lineItemId or productId is required. |
| 2576 | "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. |
| 2577 | "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. |
| 2578 | "shipByDate": "A String", # Updated ship by date, in ISO 8601 format. If not specified only deliver by date is updated. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2579 | # |
| 2580 | # Provided date should be within 1 year timeframe and can not be a date in the past. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2581 | } |
| 2582 | |
| 2583 | |
| 2584 | Returns: |
| 2585 | An object of the form: |
| 2586 | |
| 2587 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2588 | "executionStatus": "A String", # The status of the execution. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2589 | # |
| 2590 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2591 | # - "`duplicate`" |
| 2592 | # - "`executed`" |
| 2593 | "kind": "content#ordersUpdateLineItemShippingDetailsResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersUpdateLineItemShippingDetailsResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2594 | }</pre> |
| 2595 | </div> |
| 2596 | |
| 2597 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2598 | <code class="details" id="updatemerchantorderid">updatemerchantorderid(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2599 | <pre>Updates the merchant order ID for a given order. |
| 2600 | |
| 2601 | Args: |
| 2602 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 2603 | orderId: string, The ID of the order. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2604 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2605 | The object takes the form of: |
| 2606 | |
| 2607 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2608 | "merchantOrderId": "A String", # The merchant order id to be assigned to the order. Must be unique per merchant. |
| 2609 | "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2610 | } |
| 2611 | |
| 2612 | |
| 2613 | Returns: |
| 2614 | An object of the form: |
| 2615 | |
| 2616 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2617 | "executionStatus": "A String", # The status of the execution. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2618 | # |
| 2619 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2620 | # - "`duplicate`" |
| 2621 | # - "`executed`" |
| 2622 | "kind": "content#ordersUpdateMerchantOrderIdResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersUpdateMerchantOrderIdResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2623 | }</pre> |
| 2624 | </div> |
| 2625 | |
| 2626 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2627 | <code class="details" id="updateshipment">updateshipment(merchantId, orderId, body=None)</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2628 | <pre>Updates a shipment's status, carrier, and/or tracking ID. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2629 | |
| 2630 | Args: |
| 2631 | merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) |
| 2632 | orderId: string, The ID of the order. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2633 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2634 | The object takes the form of: |
| 2635 | |
| 2636 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2637 | "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. |
| 2638 | "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`. |
| 2639 | "operationId": "A String", # The ID of the operation. Unique across all operations for a given order. |
| 2640 | "shipmentId": "A String", # The ID of the shipment. |
| 2641 | "status": "A String", # New status for the shipment. Not updated if missing. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2642 | # |
| 2643 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2644 | # - "`delivered`" |
| 2645 | # - "`undeliverable`" |
| 2646 | "trackingId": "A String", # The tracking ID for the shipment. Not updated if missing. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2647 | } |
| 2648 | |
| 2649 | |
| 2650 | Returns: |
| 2651 | An object of the form: |
| 2652 | |
| 2653 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2654 | "executionStatus": "A String", # The status of the execution. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2655 | # |
| 2656 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2657 | # - "`duplicate`" |
| 2658 | # - "`executed`" |
| 2659 | "kind": "content#ordersUpdateShipmentResponse", # Identifies what kind of resource this is. Value: the fixed string "content#ordersUpdateShipmentResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2660 | }</pre> |
| 2661 | </div> |
| 2662 | |
| 2663 | </body></html> |