Method: orders.returnrefundlineitem

Returns and refunds a line item. Note that this method can only be called on fully shipped orders. The Orderreturns API is the preferred way to handle returns after you receive a return from a customer. You can use Orderreturns.list or Orderreturns.get to search for the return, and then use Orderreturns.processreturn to issue the refund. If the return cannot be found, then we recommend using this API to issue a refund.

HTTP request

POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/orders/{orderId}/returnRefundLineItem

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.

Request body

The request body contains an instance of OrdersReturnRefundLineItemRequest.

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#ordersReturnRefundLineItemResponse".

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/content

For more information, see the OAuth 2.0 Overview.

OrdersReturnRefundLineItemRequest

JSON representation
{
  "operationId": string,
  "lineItemId": string,
  "productId": string,
  "quantity": integer,
  "reason": string,
  "reasonText": string,
  "priceAmount": {
    object (Price)
  },
  "taxAmount": {
    object (Price)
  }
}
Fields
operationId

string

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

lineItemId

string

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

productId

string

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

quantity

integer (uint32 format)

The quantity to return and refund. Quantity is required.

reason

string

The reason for the return.

Acceptable values are:

  • "customerDiscretionaryReturn"
  • "customerInitiatedMerchantCancel"
  • "deliveredTooLate"
  • "expiredItem"
  • "invalidCoupon"
  • "malformedShippingAddress"
  • "other"
  • "productArrivedDamaged"
  • "productNotAsDescribed"
  • "qualityNotAsExpected"
  • "undeliverableShippingAddress"
  • "unsupportedPoBoxAddress"
  • "wrongProductShipped"

reasonText

string

The explanation of the reason.

priceAmount

object (Price)

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.

taxAmount

object (Price)

The amount of tax to be refunded. Optional, but if filled, then priceAmount must be set. Calculated automatically if not provided.