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: orderreturns.createorderreturn

Create return in your Merchant Center account.

HTTP request

POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/orderreturns/createOrderReturn

Path parameters

Parameters
merchantId

string

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

Request body

The request body contains an instance of OrderreturnsCreateOrderReturnRequest.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "executionStatus": string,
  "orderReturn": {
    object (MerchantOrderReturn)
  },
  "kind": string
}
Fields
executionStatus

string

The status of the execution.

Acceptable values are:

  • "duplicate"
  • "executed"

orderReturn

object (MerchantOrderReturn)

Created order return.

kind

string

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

"content#orderreturnsCreateOrderReturnResponse"

.

Authorization Scopes

Requires one of the following OAuth scopes:

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

For more information, see the OAuth 2.0 Overview.

OrderreturnsCreateOrderReturnRequest

JSON representation
{
  "orderId": string,
  "operationId": string,
  "lineItems": [
    {
      object (OrderreturnsLineItem)
    }
  ],
  "returnMethodType": string
}
Fields
orderId

string

The ID of the order.

operationId

string

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

lineItems[]

object (OrderreturnsLineItem)

The list of line items to return.

returnMethodType

string

The way of the package being returned.

OrderreturnsLineItem

JSON representation
{
  "lineItemId": string,
  "quantity": integer
}
Fields
lineItemId

string

The ID of the line item. This value is assigned by Google when an order is created.

quantity

integer (uint32 format)

The quantity of this line item.