- HTTP request
- Path parameters
- Request body
- Response body
- Authorization Scopes
- OrdersRefundItemRequest
- OrdersCustomBatchRequestEntryRefundItemItem
- OrdersCustomBatchRequestEntryRefundItemShipping
- Try it!
Issues a partial or total refund for items and shipment.
HTTP request
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/orders/{orderId}/refunditem
Path parameters
Parameters | |
---|---|
merchantId |
The ID of the account that manages the order. This cannot be a multi-client account. |
orderId |
The ID of the order to refund. |
Request body
The request body contains an instance of OrdersRefundItemRequest
.
Response body
If successful, the response body contains data with the following structure:
JSON representation | |
---|---|
{ "executionStatus": string, "kind": string } |
Fields | |
---|---|
executionStatus |
The status of the execution.
|
kind |
Identifies what kind of resource this is. Value: the fixed string
. |
Authorization Scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
OrdersRefundItemRequest
JSON representation | |
---|---|
{ "operationId": string, "reason": string, "reasonText": string, "items": [ { object ( |
Fields | |
---|---|
operationId |
The ID of the operation. Unique across all operations for a given order. |
reason |
The reason for the refund.
|
reasonText |
The explanation of the reason. |
items[] |
The items that are refunded. Either Item or Shipping must be provided in the request. |
shipping |
The refund on shipping. Optional, but either Item or Shipping must be provided in the request. |
OrdersCustomBatchRequestEntryRefundItemItem
JSON representation | |
---|---|
{
"lineItemId": string,
"productId": string,
"quantity": integer,
"fullRefund": boolean,
"amount": {
object ( |
Fields | |
---|---|
lineItemId |
The ID of the line item. Either lineItemId or productId is required. |
productId |
The ID of the product. This is the REST ID used in the products service. Either lineItemId or productId is required. |
quantity |
The number of products that are refunded. |
fullRefund |
If true, the full item will be refunded. If this is true, amount should not be provided and will be ignored. |
amount |
The total amount that is refunded. (e.g. refunding $5 each for 2 products should be done by setting quantity to 2 and amount to 10$) In case of multiple refunds, this should be the amount you currently want to refund to the customer. |
OrdersCustomBatchRequestEntryRefundItemShipping
JSON representation | |
---|---|
{
"fullRefund": boolean,
"amount": {
object ( |
Fields | |
---|---|
fullRefund |
If set to true, all shipping costs for the order will be refunded. If this is true, amount should not be provided and will be ignored. |
amount |
The amount that is refunded. If this is not the first refund for the shipment, this should be the newly refunded amount. |