• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="content_v2.html">Content API for Shopping</a> . <a href="content_v2.orderinvoices.html">orderinvoices</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#createchargeinvoice">createchargeinvoice(merchantId, orderId, body)</a></code></p>
79<p class="firstline">Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.</p>
80<p class="toc_element">
81  <code><a href="#createrefundinvoice">createrefundinvoice(merchantId, orderId, body)</a></code></p>
82<p class="firstline">Creates a refund invoice for one or more shipment groups, and triggers a refund for orderinvoice enabled orders. This can only be used for line items that have previously been charged using createChargeInvoice. All amounts (except for the summary) are incremental with respect to the previous invoice.</p>
83<h3>Method Details</h3>
84<div class="method">
85    <code class="details" id="createchargeinvoice">createchargeinvoice(merchantId, orderId, body)</code>
86  <pre>Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.
87
88Args:
89  merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required)
90  orderId: string, The ID of the order. (required)
91  body: object, The request body. (required)
92    The object takes the form of:
93
94{
95    "operationId": "A String", # [required] The ID of the operation, unique across all operations for a given order.
96    "invoiceSummary": { # [required] Invoice summary.
97      "productTotal": { # [required] Total price for the product.
98        "tax": { # [required] Tax value.
99          "currency": "A String", # The currency of the price.
100          "value": "A String", # The price represented as a number.
101        },
102        "pretax": { # [required] Value before taxes.
103          "currency": "A String", # The currency of the price.
104          "value": "A String", # The price represented as a number.
105        },
106      },
107      "merchantBalance": { # Deprecated.
108        "tax": { # [required] Tax value.
109          "currency": "A String", # The currency of the price.
110          "value": "A String", # The price represented as a number.
111        },
112        "pretax": { # [required] Value before taxes.
113          "currency": "A String", # The currency of the price.
114          "value": "A String", # The price represented as a number.
115        },
116      },
117      "googleBalance": { # Deprecated.
118        "tax": { # [required] Tax value.
119          "currency": "A String", # The currency of the price.
120          "value": "A String", # The price represented as a number.
121        },
122        "pretax": { # [required] Value before taxes.
123          "currency": "A String", # The currency of the price.
124          "value": "A String", # The price represented as a number.
125        },
126      },
127      "promotionSummaries": [ # Deprecated.
128        {
129          "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts.
130            "tax": { # [required] Tax value.
131              "currency": "A String", # The currency of the price.
132              "value": "A String", # The price represented as a number.
133            },
134            "pretax": { # [required] Value before taxes.
135              "currency": "A String", # The currency of the price.
136              "value": "A String", # The price represented as a number.
137            },
138          },
139          "promotionId": "A String", # [required] ID of the promotion.
140        },
141      ],
142      "customerBalance": { # Deprecated.
143        "tax": { # [required] Tax value.
144          "currency": "A String", # The currency of the price.
145          "value": "A String", # The price represented as a number.
146        },
147        "pretax": { # [required] Value before taxes.
148          "currency": "A String", # The currency of the price.
149          "value": "A String", # The price represented as a number.
150        },
151      },
152      "additionalChargeSummaries": [ # Summary of the total amounts of the additional charges.
153        {
154          "totalAmount": { # [required] Total additional charge for this type.
155            "tax": { # [required] Tax value.
156              "currency": "A String", # The currency of the price.
157              "value": "A String", # The price represented as a number.
158            },
159            "pretax": { # [required] Value before taxes.
160              "currency": "A String", # The currency of the price.
161              "value": "A String", # The price represented as a number.
162            },
163          },
164          "type": "A String", # [required] Type of the additional charge.
165        },
166      ],
167    },
168    "invoiceId": "A String", # [required] The ID of the invoice.
169    "shipmentGroupId": "A String", # [required] ID of the shipment group. It is assigned by the merchant in the shipLineItems method and is used to group multiple line items that have the same kind of shipping charges.
170    "lineItemInvoices": [ # [required] Invoice details per line item.
171      {
172        "unitInvoice": { # [required] Invoice details for a single unit.
173          "promotions": [ # Deprecated.
174            {
175              "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts.
176                "tax": { # [required] Tax value.
177                  "currency": "A String", # The currency of the price.
178                  "value": "A String", # The price represented as a number.
179                },
180                "pretax": { # [required] Value before taxes.
181                  "currency": "A String", # The currency of the price.
182                  "value": "A String", # The price represented as a number.
183                },
184              },
185              "promotionId": "A String", # [required] ID of the promotion.
186            },
187          ],
188          "unitPricePretax": { # [required] Price of the unit, before applying taxes.
189            "currency": "A String", # The currency of the price.
190            "value": "A String", # The price represented as a number.
191          },
192          "unitPriceTaxes": [ # Tax amounts to apply to the unit price.
193            {
194              "taxType": "A String", # [required] Type of the tax.
195              "taxAmount": { # [required] Tax amount for the tax type.
196                "currency": "A String", # The currency of the price.
197                "value": "A String", # The price represented as a number.
198              },
199              "taxName": "A String", # Optional name of the tax type. This should only be provided if taxType is otherFeeTax.
200            },
201          ],
202          "additionalCharges": [ # Additional charges for a unit, e.g. shipping costs.
203            {
204              "additionalChargeAmount": { # [required] Amount of the additional charge.
205                "tax": { # [required] Tax value.
206                  "currency": "A String", # The currency of the price.
207                  "value": "A String", # The price represented as a number.
208                },
209                "pretax": { # [required] Value before taxes.
210                  "currency": "A String", # The currency of the price.
211                  "value": "A String", # The price represented as a number.
212                },
213              },
214              "type": "A String", # [required] Type of the additional charge.
215              "additionalChargePromotions": [ # Deprecated.
216                {
217                  "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts.
218                    "tax": { # [required] Tax value.
219                      "currency": "A String", # The currency of the price.
220                      "value": "A String", # The price represented as a number.
221                    },
222                    "pretax": { # [required] Value before taxes.
223                      "currency": "A String", # The currency of the price.
224                      "value": "A String", # The price represented as a number.
225                    },
226                  },
227                  "promotionId": "A String", # [required] ID of the promotion.
228                },
229              ],
230            },
231          ],
232        },
233        "shipmentUnitIds": [ # [required] The shipment unit ID is assigned by the merchant and defines individual quantities within a line item. The same ID can be assigned to units that are the same while units that differ must be assigned a different ID (for example: free or promotional units).
234          "A String",
235        ],
236        "lineItemId": "A String", # ID of the line item. Either lineItemId or productId must be set.
237        "productId": "A String", # ID of the product. This is the REST ID used in the products service. Either lineItemId or productId must be set.
238      },
239    ],
240  }
241
242
243Returns:
244  An object of the form:
245
246    {
247    "kind": "content#orderinvoicesCreateChargeInvoiceResponse", # Identifies what kind of resource this is. Value: the fixed string "content#orderinvoicesCreateChargeInvoiceResponse".
248    "executionStatus": "A String", # The status of the execution.
249  }</pre>
250</div>
251
252<div class="method">
253    <code class="details" id="createrefundinvoice">createrefundinvoice(merchantId, orderId, body)</code>
254  <pre>Creates a refund invoice for one or more shipment groups, and triggers a refund for orderinvoice enabled orders. This can only be used for line items that have previously been charged using createChargeInvoice. All amounts (except for the summary) are incremental with respect to the previous invoice.
255
256Args:
257  merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required)
258  orderId: string, The ID of the order. (required)
259  body: object, The request body. (required)
260    The object takes the form of:
261
262{
263    "shipmentInvoices": [ # Invoice details for different shipment groups.
264      {
265        "invoiceSummary": { # [required] Invoice summary.
266          "productTotal": { # [required] Total price for the product.
267            "tax": { # [required] Tax value.
268              "currency": "A String", # The currency of the price.
269              "value": "A String", # The price represented as a number.
270            },
271            "pretax": { # [required] Value before taxes.
272              "currency": "A String", # The currency of the price.
273              "value": "A String", # The price represented as a number.
274            },
275          },
276          "merchantBalance": { # Deprecated.
277            "tax": { # [required] Tax value.
278              "currency": "A String", # The currency of the price.
279              "value": "A String", # The price represented as a number.
280            },
281            "pretax": { # [required] Value before taxes.
282              "currency": "A String", # The currency of the price.
283              "value": "A String", # The price represented as a number.
284            },
285          },
286          "googleBalance": { # Deprecated.
287            "tax": { # [required] Tax value.
288              "currency": "A String", # The currency of the price.
289              "value": "A String", # The price represented as a number.
290            },
291            "pretax": { # [required] Value before taxes.
292              "currency": "A String", # The currency of the price.
293              "value": "A String", # The price represented as a number.
294            },
295          },
296          "promotionSummaries": [ # Deprecated.
297            {
298              "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts.
299                "tax": { # [required] Tax value.
300                  "currency": "A String", # The currency of the price.
301                  "value": "A String", # The price represented as a number.
302                },
303                "pretax": { # [required] Value before taxes.
304                  "currency": "A String", # The currency of the price.
305                  "value": "A String", # The price represented as a number.
306                },
307              },
308              "promotionId": "A String", # [required] ID of the promotion.
309            },
310          ],
311          "customerBalance": { # Deprecated.
312            "tax": { # [required] Tax value.
313              "currency": "A String", # The currency of the price.
314              "value": "A String", # The price represented as a number.
315            },
316            "pretax": { # [required] Value before taxes.
317              "currency": "A String", # The currency of the price.
318              "value": "A String", # The price represented as a number.
319            },
320          },
321          "additionalChargeSummaries": [ # Summary of the total amounts of the additional charges.
322            {
323              "totalAmount": { # [required] Total additional charge for this type.
324                "tax": { # [required] Tax value.
325                  "currency": "A String", # The currency of the price.
326                  "value": "A String", # The price represented as a number.
327                },
328                "pretax": { # [required] Value before taxes.
329                  "currency": "A String", # The currency of the price.
330                  "value": "A String", # The price represented as a number.
331                },
332              },
333              "type": "A String", # [required] Type of the additional charge.
334            },
335          ],
336        },
337        "shipmentGroupId": "A String", # [required] ID of the shipment group. It is assigned by the merchant in the shipLineItems method and is used to group multiple line items that have the same kind of shipping charges.
338        "lineItemInvoices": [ # [required] Invoice details per line item.
339          {
340            "unitInvoice": { # [required] Invoice details for a single unit.
341              "promotions": [ # Deprecated.
342                {
343                  "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts.
344                    "tax": { # [required] Tax value.
345                      "currency": "A String", # The currency of the price.
346                      "value": "A String", # The price represented as a number.
347                    },
348                    "pretax": { # [required] Value before taxes.
349                      "currency": "A String", # The currency of the price.
350                      "value": "A String", # The price represented as a number.
351                    },
352                  },
353                  "promotionId": "A String", # [required] ID of the promotion.
354                },
355              ],
356              "unitPricePretax": { # [required] Price of the unit, before applying taxes.
357                "currency": "A String", # The currency of the price.
358                "value": "A String", # The price represented as a number.
359              },
360              "unitPriceTaxes": [ # Tax amounts to apply to the unit price.
361                {
362                  "taxType": "A String", # [required] Type of the tax.
363                  "taxAmount": { # [required] Tax amount for the tax type.
364                    "currency": "A String", # The currency of the price.
365                    "value": "A String", # The price represented as a number.
366                  },
367                  "taxName": "A String", # Optional name of the tax type. This should only be provided if taxType is otherFeeTax.
368                },
369              ],
370              "additionalCharges": [ # Additional charges for a unit, e.g. shipping costs.
371                {
372                  "additionalChargeAmount": { # [required] Amount of the additional charge.
373                    "tax": { # [required] Tax value.
374                      "currency": "A String", # The currency of the price.
375                      "value": "A String", # The price represented as a number.
376                    },
377                    "pretax": { # [required] Value before taxes.
378                      "currency": "A String", # The currency of the price.
379                      "value": "A String", # The price represented as a number.
380                    },
381                  },
382                  "type": "A String", # [required] Type of the additional charge.
383                  "additionalChargePromotions": [ # Deprecated.
384                    {
385                      "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts.
386                        "tax": { # [required] Tax value.
387                          "currency": "A String", # The currency of the price.
388                          "value": "A String", # The price represented as a number.
389                        },
390                        "pretax": { # [required] Value before taxes.
391                          "currency": "A String", # The currency of the price.
392                          "value": "A String", # The price represented as a number.
393                        },
394                      },
395                      "promotionId": "A String", # [required] ID of the promotion.
396                    },
397                  ],
398                },
399              ],
400            },
401            "shipmentUnitIds": [ # [required] The shipment unit ID is assigned by the merchant and defines individual quantities within a line item. The same ID can be assigned to units that are the same while units that differ must be assigned a different ID (for example: free or promotional units).
402              "A String",
403            ],
404            "lineItemId": "A String", # ID of the line item. Either lineItemId or productId must be set.
405            "productId": "A String", # ID of the product. This is the REST ID used in the products service. Either lineItemId or productId must be set.
406          },
407        ],
408      },
409    ],
410    "invoiceId": "A String", # [required] The ID of the invoice.
411    "returnOption": { # Option to create an invoice for a refund and mark all items within the invoice as returned. Exactly one of refundOnlyOption or returnOption must be provided.
412      "reason": "A String", # [required] Reason for the return.
413      "description": "A String", # Optional description of the return reason.
414    },
415    "refundOnlyOption": { # Option to create a refund-only invoice. Exactly one of refundOnlyOption or returnOption must be provided.
416      "reason": "A String", # [required] Reason for the refund.
417      "description": "A String", # Optional description of the refund reason.
418    },
419    "operationId": "A String", # [required] The ID of the operation, unique across all operations for a given order.
420  }
421
422
423Returns:
424  An object of the form:
425
426    {
427    "kind": "content#orderinvoicesCreateRefundInvoiceResponse", # Identifies what kind of resource this is. Value: the fixed string "content#orderinvoicesCreateRefundInvoiceResponse".
428    "executionStatus": "A String", # The status of the execution.
429  }</pre>
430</div>
431
432</body></html>