Orders: cancellineitem

Requires authorization

Cancels a line item, making a full refund. Try it now.


HTTP request

POST https://www.googleapis.com/content/v2/merchantId/orders/orderId/cancelLineItem


Parameter name Value Description
Path parameters
merchantId unsigned long The ID of the account that manages the order. This cannot be a multi-client account.
orderId string The ID of the order.


This request requires authorization with the following scope (read more about authentication and authorization).


Request body

In the request body, supply data with the following structure:

  "operationId": string,
  "lineItemId": string,
  "quantity": unsigned integer,
  "reason": string,
  "reasonText": string,
  "amount": {
    "value": string,
    "currency": string
Property name Value Description Notes
operationId string The ID of the operation. Unique across all operations for a given order.
lineItemId string The ID of the line item to cancel.
quantity unsigned integer The quantity to cancel.
reason string The reason for the cancellation.

Acceptable values are:
  • "customerInitiatedCancel"
  • "malformedShippingAddress"
  • "noInventory"
  • "other"
  • "priceError"
  • "shippingPriceError"
  • "taxError"
  • "undeliverableShippingAddress"
  • "unsupportedPoBoxAddress"
reasonText string The explanation of the reason.
amount nested object Amount to refund for the cancelation. Optional. If not set, Google will calculate the default based on the price and tax of the items involved. The amount must not be larger than the net amount left on the order.
amount.value string The price represented as a number. writable
amount.currency string The currency of the price. writable


If successful, this method returns a response body with the following structure:

  "kind": "content#ordersCancelLineItemResponse",
  "executionStatus": string
Property name Value Description Notes
kind string Identifies what kind of resource this is. Value: the fixed string "content#ordersCancelLineItemResponse".
executionStatus string The status of the execution.

Acceptable values are:
  • "duplicate"
  • "executed"

Try it!

Use the APIs Explorer below to call this method on the Sandbox environment and see the response.
Alternatively, test this on live data.

Send feedback about...

Content API for Shopping