Skip to main content

orders

Overview

Nameorders
TypeResource
Idgoogledevelopers.content.orders

Fields

NameDatatypeDescription
idstringThe REST ID of the order. Globally unique.
merchantOrderIdstringMerchant-provided ID of the order.
deliveryDetailsobject
placedDatestringThe date when the order was placed, in ISO 8601 format.
acknowledgedbooleanWhether the order was acknowledged.
promotionsarrayPromotions associated with the order. To determine which promotions apply to which products, check the Promotions[].appliedItems[].lineItemId field against the LineItems[].id field for each promotion. If a promotion is applied to more than 1 offerId, divide the discount value by the number of affected offers to determine how much discount to apply to each offerId. Examples: 1. To calculate price paid by the customer for a single line item including the discount: For each promotion, subtract the LineItems[].adjustments[].priceAdjustment.value amount from the LineItems[].Price.value. 2. To calculate price paid by the customer for a single line item including the discount in case of multiple quantity: For each promotion, divide the LineItems[].adjustments[].priceAdjustment.value by the quantity of products then subtract the resulting value from the LineItems[].Product.Price.value for each quantity item. Only 1 promotion can be applied to an offerId in a given order. To refund an item which had a promotion applied to it, make sure to refund the amount after first subtracting the promotion discount from the item price. More details about the program are here.
netPriceAmountobject
lineItemsarrayLine items that are ordered.
billingAddressobject
merchantIdstring
shippingCostobject
netTaxAmountobject
annotationsarrayList of key-value pairs that are attached to a given order.
taxCollectorstringThe party responsible for collecting and remitting taxes. Acceptable values are: - "marketplaceFacilitator" - "merchant"
paymentStatusstringThe status of the payment. Acceptable values are: - "paymentCaptured" - "paymentRejected" - "paymentSecured" - "pendingAuthorization"
customerobject
shipmentsarrayShipments of the order.
statusstringThe status of the order. Acceptable values are: - "canceled" - "delivered" - "inProgress" - "partiallyDelivered" - "partiallyReturned" - "partiallyShipped" - "pendingShipment" - "returned" - "shipped"
shippingCostTaxobject
refundsarrayRefunds for the order.
pickupDetailsobject
kindstringIdentifies what kind of resource this is. Value: the fixed string "content#order"

Methods

NameAccessible byRequired ParamsDescription
getSELECTmerchantId, orderIdRetrieves an order from your Merchant Center account.
listSELECTmerchantIdLists the orders in your Merchant Center account.
acknowledgeEXECmerchantId, orderIdMarks an order as acknowledged.
advancetestorderEXECmerchantId, orderIdSandbox only. Moves a test order from state "inProgress" to state "pendingShipment".
cancelEXECmerchantId, orderIdCancels all line items in an order, making a full refund.
cancellineitemEXECmerchantId, orderIdCancels a line item, making a full refund.
canceltestorderbycustomerEXECmerchantId, orderIdSandbox only. Cancels a test order for customer-initiated cancellation.
captureOrderEXECmerchantId, orderIdCapture funds from the customer for the current order total. This method should be called after the merchant verifies that they are able and ready to start shipping the order. This method blocks until a response is received from the payment processsor. If this method succeeds, the merchant is guaranteed to receive funds for the order after shipment. If the request fails, it can be retried or the order may be cancelled. This method cannot be called after the entire order is already shipped. A rejected error code is returned when the payment service provider has declined the charge. This indicates a problem between the PSP and either the merchant's or customer's account. Sometimes this error will be resolved by the customer. We recommend retrying these errors once per day or cancelling the order with reason failedToCaptureFunds if the items cannot be held.
instorerefundlineitemEXECmerchantId, orderIdDeprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (for example, cash refund done in store). Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding through Google then through an in-store return.
refunditemEXECmerchantId, orderIdIssues a partial or total refund for items and shipment.
refundorderEXECmerchantId, orderIdIssues a partial or total refund for an order.
rejectreturnlineitemEXECmerchantId, orderIdRejects return on an line item.
returnrefundlineitemEXECmerchantId, orderIdReturns 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.
setlineitemmetadataEXECmerchantId, orderIdSets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided through other methods. Submitted key-value pairs can be retrieved as part of the orders resource.
shiplineitemsEXECmerchantId, orderIdMarks line item(s) as shipped.
updatelineitemshippingdetailsEXECmerchantId, orderIdUpdates ship by and delivery by dates for a line item.
updatemerchantorderidEXECmerchantId, orderIdUpdates the merchant order ID for a given order.
updateshipmentEXECmerchantId, orderIdUpdates a shipment's status, carrier, and/or tracking ID.