We will sunset v2 of the Content API on March 29th, 2021. To avoid disruptions with your integration, please migrate to v2.1 as soon as possible. For more information, see Migrating to v2.1.

Method: orders.refunditem

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

string

The ID of the account that manages the order. This cannot be a multi-client account.

orderId

string

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

string

The status of the execution.

Acceptable values are:

  • "duplicate"
  • "executed"

kind

string

Identifies what kind of resource this is. Value: the fixed string

"content#ordersRefundItemResponse"

.

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 (OrdersCustomBatchRequestEntryRefundItemItem)
    }
  ],
  "shipping": {
    object (OrdersCustomBatchRequestEntryRefundItemShipping)
  }
}
Fields
operationId

string

The ID of the operation. Unique across all operations for a given order.

reason

string

The reason for the refund.

Acceptable values are:

  • "shippingCostAdjustment"
  • "priceAdjustment"
  • "taxAdjustment"
  • "feeAdjustment"
  • "courtesyAdjustment"
  • "adjustment"
  • "customerCancelled"
  • "noInventory"
  • "productNotAsDescribed"
  • "undeliverableShippingAddress"
  • "wrongProductShipped"
  • "lateShipmentCredit"
  • "deliveredLateByCarrier"
  • "productArrivedDamaged"

reasonText

string

The explanation of the reason.

items[]

object (OrdersCustomBatchRequestEntryRefundItemItem)

The items that are refunded. Either Item or Shipping must be provided in the request.

shipping

object (OrdersCustomBatchRequestEntryRefundItemShipping)

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 (MonetaryAmount)
  }
}
Fields
lineItemId

string

The ID of the line item. Either lineItemId or productId is required.

productId

string

The ID of the product. This is the REST ID used in the products service. Either lineItemId or productId is required.

quantity

integer

The number of products that are refunded.

fullRefund

boolean

If true, the full item will be refunded. If this is true, amount should not be provided and will be ignored.

amount

object (MonetaryAmount)

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 (Price)
  }
}
Fields
fullRefund

boolean

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

object (Price)

The amount that is refunded. If this is not the first refund for the shipment, this should be the newly refunded amount.