REST Resource: orders

Resource: Order

Order. Production access (all methods) requires the order manager role. Sandbox access does not.

JSON representation
{
  "id": string,
  "merchantId": string,
  "merchantOrderId": string,
  "kind": string,
  "lineItems": [
    {
      object (OrderLineItem)
    }
  ],
  "status": string,
  "paymentStatus": string,
  "acknowledged": boolean,
  "placedDate": string,
  "deliveryDetails": {
    object (OrderDeliveryDetails)
  },
  "customer": {
    object (OrderCustomer)
  },
  "shippingCost": {
    object (Price)
  },
  "shippingCostTax": {
    object (Price)
  },
  "refunds": [
    {
      object (OrderRefund)
    }
  ],
  "shipments": [
    {
      object (OrderShipment)
    }
  ],
  "billingAddress": {
    object (OrderAddress)
  },
  "promotions": [
    {
      object (OrderPromotion)
    }
  ],
  "taxCollector": string,
  "netPriceAmount": {
    object (Price)
  },
  "netTaxAmount": {
    object (Price)
  },
  "pickupDetails": {
    object (OrderPickupDetails)
  },
  "annotations": [
    {
      object (OrderOrderAnnotation)
    }
  ]
}
Fields
id

string

The REST ID of the order. Globally unique.

merchantId

string

merchantOrderId

string

Merchant-provided ID of the order.

kind

string

Identifies what kind of resource this is. Value: the fixed string "content#order"

lineItems[]

object (OrderLineItem)

Line items that are ordered.

status

string

The status of the order.

Acceptable values are:

  • "canceled"
  • "delivered"
  • "inProgress"
  • "partiallyDelivered"
  • "partiallyReturned"
  • "partiallyShipped"
  • "pendingShipment"
  • "returned"
  • "shipped"

paymentStatus

string

The status of the payment.

Acceptable values are:

  • "paymentCaptured"
  • "paymentRejected"
  • "paymentSecured"
  • "pendingAuthorization"

acknowledged

boolean

Whether the order was acknowledged.

placedDate

string

The date when the order was placed, in ISO 8601 format.

deliveryDetails

object (OrderDeliveryDetails)

Delivery details for shipments of type delivery.

customer

object (OrderCustomer)

The details of the customer who placed the order.

shippingCost

object (Price)

The total cost of shipping for all items.

shippingCostTax

object (Price)

The tax for the total shipping cost.

refunds[]

object (OrderRefund)

Refunds for the order.

shipments[]

object (OrderShipment)

Shipments of the order.

billingAddress

object (OrderAddress)

The billing address.

promotions[]

object (OrderPromotion)

Promotions 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.

taxCollector

string

The party responsible for collecting and remitting taxes.

Acceptable values are:

  • "marketplaceFacilitator"
  • "merchant"

netPriceAmount

object (Price)

The net amount for the order (price part). For example, if an order was originally for $100 and a refund was issued for $20, the net amount will be $80.

netTaxAmount

object (Price)

The net amount for the order (tax part). Note that in certain cases due to taxable base adjustment netTaxAmount might not match to a sum of tax field across all lineItems and refunds.

pickupDetails

object (OrderPickupDetails)

Pickup details for shipments of type pickup.

annotations[]

object (OrderOrderAnnotation)

orders.list of key-value pairs that are attached to a given order.

OrderLineItem

JSON representation
{
  "id": string,
  "quantityOrdered": integer,
  "quantityPending": integer,
  "quantityShipped": integer,
  "quantityDelivered": integer,
  "quantityReturned": integer,
  "quantityCanceled": integer,
  "price": {
    object (Price)
  },
  "tax": {
    object (Price)
  },
  "shippingDetails": {
    object (OrderLineItemShippingDetails)
  },
  "returnInfo": {
    object (OrderLineItemReturnInfo)
  },
  "product": {
    object (OrderLineItemProduct)
  },
  "returns": [
    {
      object (OrderReturn)
    }
  ],
  "cancellations": [
    {
      object (OrderCancellation)
    }
  ],
  "annotations": [
    {
      object (OrderMerchantProvidedAnnotation)
    }
  ],
  "adjustments": [
    {
      object (OrderLineItemAdjustment)
    }
  ],
  "quantityUndeliverable": integer,
  "quantityReadyForPickup": integer
}
Fields
id

string

The ID of the line item.

quantityOrdered

integer (uint32 format)

Number of items ordered.

quantityPending

integer (uint32 format)

Number of items pending.

quantityShipped

integer (uint32 format)

Number of items shipped.

quantityDelivered

integer (uint32 format)

Number of items delivered.

quantityReturned

integer (uint32 format)

Number of items returned.

quantityCanceled

integer (uint32 format)

Number of items canceled.

price

object (Price)

Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20.

tax

object (Price)

Total tax amount for the line item. For example, if two items are purchased, and each have a cost tax of $2, the total tax amount will be $4.

shippingDetails

object (OrderLineItemShippingDetails)

Details of the requested shipping for the line item.

returnInfo

object (OrderLineItemReturnInfo)

Details of the return policy for the line item.

product

object (OrderLineItemProduct)

Product data as seen by customer from the time of the order placement. Note that certain attributes values (for example, title or gtin) might be reformatted and no longer match values submitted through product feed.

returns[]

object (OrderReturn)

Returns of the line item.

cancellations[]

object (OrderCancellation)

Cancellations of the line item.

annotations[]

object (OrderMerchantProvidedAnnotation)

Annotations that are attached to the line item.

adjustments[]

object (OrderLineItemAdjustment)

Price and tax adjustments applied on the line item.

quantityUndeliverable

integer (uint32 format)

Number of items undeliverable.

quantityReadyForPickup

integer (uint32 format)

Number of items ready for pickup.

OrderLineItemShippingDetails

JSON representation
{
  "method": {
    object (OrderLineItemShippingDetailsMethod)
  },
  "shipByDate": string,
  "deliverByDate": string,
  "type": string,
  "pickupPromiseInMinutes": integer
}
Fields
method

object (OrderLineItemShippingDetailsMethod)

Required. Details of the shipping method.

shipByDate

string

Required. The ship by date, in ISO 8601 format.

deliverByDate

string

Required. The delivery by date, in ISO 8601 format.

type

string

Type of shipment. Indicates whether deliveryDetails or pickupDetails is applicable for this shipment.

Acceptable values are:

  • "delivery"
  • "pickup"

pickupPromiseInMinutes

integer (uint32 format)

The promised time in minutes in which the order will be ready for pickup. This only applies to buy-online-pickup-in-store same-day order.

OrderLineItemShippingDetailsMethod

JSON representation
{
  "methodName": string,
  "carrier": string,
  "minDaysInTransit": integer,
  "maxDaysInTransit": integer
}
Fields
methodName

string

Required. The name of the shipping method.

carrier

string

The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values.

minDaysInTransit

integer (uint32 format)

Required. Minimum transit time.

maxDaysInTransit

integer (uint32 format)

Required. Maximum transit time.

OrderLineItemReturnInfo

JSON representation
{
  "isReturnable": boolean,
  "daysToReturn": integer,
  "policyUrl": string
}
Fields
isReturnable

boolean

Required. Whether the item is returnable.

daysToReturn

integer

Required. How many days later the item can be returned.

policyUrl

string

Required. URL of the item return policy.

OrderLineItemProduct

JSON representation
{
  "id": string,
  "offerId": string,
  "targetCountry": string,
  "contentLanguage": string,
  "price": {
    object (Price)
  },
  "title": string,
  "gtin": string,
  "brand": string,
  "mpn": string,
  "condition": string,
  "itemGroupId": string,
  "imageLink": string,
  "shownImage": string,
  "variantAttributes": [
    {
      object (OrderLineItemProductVariantAttribute)
    }
  ],
  "fees": [
    {
      object (OrderLineItemProductFee)
    }
  ]
}
Fields
id

string

The REST ID of the product.

offerId

string

An identifier of the item.

targetCountry

string

The CLDR territory code of the target country of the product.

contentLanguage

string

The two-letter ISO 639-1 language code for the item.

price

object (Price)

Price of the item.

title

string

The title of the product.

gtin

string

Global Trade Item Number (GTIN) of the item.

brand

string

Brand of the item.

mpn

string

Manufacturer Part Number (MPN) of the item.

condition

string

Condition or state of the item.

Acceptable values are:

  • "new"
  • "refurbished"
  • "used"

itemGroupId

string

Shared identifier for all variants of the same product.

shownImage

string

URL to the cached image shown to the user when order was placed.

variantAttributes[]

object (OrderLineItemProductVariantAttribute)

Variant attributes for the item. These are dimensions of the product, such as color, gender, material, pattern, and size. You can find a comprehensive list of variant attributes here.

fees[]

object (OrderLineItemProductFee)

Associated fees at order creation time.

OrderLineItemProductVariantAttribute

JSON representation
{
  "dimension": string,
  "value": string
}
Fields
dimension

string

The dimension of the variant.

value

string

The value for the dimension.

OrderLineItemProductFee

JSON representation
{
  "name": string,
  "amount": {
    object (Price)
  }
}
Fields
name

string

Name of the fee.

amount

object (Price)

Amount of the fee.

OrderReturn

JSON representation
{
  "creationDate": string,
  "actor": string,
  "quantity": integer,
  "reason": string,
  "reasonText": string
}
Fields
creationDate

string

Date on which the item has been created, in ISO 8601 format.

actor

string

The actor that created the refund.

Acceptable values are:

  • "customer"
  • "googleBot"
  • "googleCustomerService"
  • "googlePayments"
  • "googleSabre"
  • "merchant"

quantity

integer (uint32 format)

Quantity that is returned.

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.

OrderCancellation

JSON representation
{
  "creationDate": string,
  "actor": string,
  "quantity": integer,
  "reason": string,
  "reasonText": string
}
Fields
creationDate

string

Date on which the cancellation has been created, in ISO 8601 format.

actor

string

The actor that created the cancellation.

Acceptable values are:

  • "customer"
  • "googleBot"
  • "googleCustomerService"
  • "googlePayments"
  • "googleSabre"
  • "merchant"

quantity

integer (uint32 format)

The quantity that was canceled.

reason

string

The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Buy on Google until you make an update to that product. This won't affect your Shopping ads.

Acceptable values are:

  • "autoPostInternal"
  • "autoPostInvalidBillingAddress"
  • "autoPostNoInventory"
  • "autoPostPriceError"
  • "autoPostUndeliverableShippingAddress"
  • "couponAbuse"
  • "customerCanceled"
  • "customerInitiatedCancel"
  • "customerSupportRequested"
  • "failToPushOrderGoogleError"
  • "failToPushOrderMerchantError"
  • "failToPushOrderMerchantFulfillmentError"
  • "failToPushOrderToMerchant"
  • "failToPushOrderToMerchantOutOfStock"
  • "invalidCoupon"
  • "malformedShippingAddress"
  • "merchantDidNotShipOnTime"
  • "noInventory"
  • "orderTimeout"
  • "other"
  • "paymentAbuse"
  • "paymentDeclined"
  • "priceError"
  • "returnRefundAbuse"
  • "shippingPriceError"
  • "taxError"
  • "undeliverableShippingAddress"
  • "unsupportedPoBoxAddress"
  • "failedToCaptureFunds"

reasonText

string

The explanation of the reason.

OrderMerchantProvidedAnnotation

JSON representation
{
  "key": string,
  "value": string
}
Fields
key

string

Key for additional merchant provided (as key-value pairs) annotation about the line item.

value

string

Value for additional merchant provided (as key-value pairs) annotation about the line item.

OrderLineItemAdjustment

JSON representation
{
  "type": string,
  "priceAdjustment": {
    object (Price)
  },
  "taxAdjustment": {
    object (Price)
  }
}
Fields
type

string

Type of this adjustment.

Acceptable values are:

  • "promotion"

priceAdjustment

object (Price)

Adjustment for total price of the line item.

taxAdjustment

object (Price)

Adjustment for total tax of the line item.

OrderDeliveryDetails

JSON representation
{
  "address": {
    object (OrderAddress)
  },
  "phoneNumber": string
}
Fields
address

object (OrderAddress)

The delivery address

phoneNumber

string

The phone number of the person receiving the delivery.

OrderAddress

JSON representation
{
  "recipientName": string,
  "streetAddress": [
    string
  ],
  "locality": string,
  "region": string,
  "country": string,
  "postalCode": string,
  "isPostOfficeBox": boolean,
  "fullAddress": [
    string
  ]
}
Fields
recipientName

string

Name of the recipient.

streetAddress[]

string

Street-level part of the address. Use \n to add a second line.

locality

string

City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).

region

string

Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC").

country

string

CLDR country code (for example, "US").

postalCode

string

Postal Code or ZIP (for example, "94043").

isPostOfficeBox

boolean

Whether the address is a post office box.

fullAddress[]

string

Strings representing the lines of the printed label for mailing the order, for example:

John Smith
1600 Amphitheatre Parkway
Mountain View, CA, 94043
United States

OrderCustomer

JSON representation
{
  "fullName": string,
  "marketingRightsInfo": {
    object (OrderCustomerMarketingRightsInfo)
  },
  "loyaltyInfo": {
    object (OrderCustomerLoyaltyInfo)
  },
  "invoiceReceivingEmail": string
}
Fields
fullName

string

Full name of the customer.

marketingRightsInfo

object (OrderCustomerMarketingRightsInfo)

Customer's marketing preferences. Contains the marketing opt-in information that is current at the time that the merchant call. User preference selections can change from one order to the next so preferences must be checked with every order.

loyaltyInfo

object (OrderCustomerLoyaltyInfo)

Loyalty program information.

invoiceReceivingEmail

string

Email address for the merchant to send value-added tax or invoice documentation of the order. Only the last document sent is made available to the customer. For more information, see About automated VAT invoicing for Buy on Google.

OrderCustomerMarketingRightsInfo

JSON representation
{
  "marketingEmailAddress": string,
  "explicitMarketingPreference": string,
  "lastUpdatedTimestamp": string
}
Fields
marketingEmailAddress

string

Email address that can be used for marketing purposes. The field may be empty even if explicitMarketingPreference is 'granted'. This happens when retrieving an old order from the customer who deleted their account.

explicitMarketingPreference

string

Last known customer selection regarding marketing preferences. In certain cases this selection might not be known, so this field would be empty. If a customer selected granted in their most recent order, they can be subscribed to marketing emails. Customers who have chosen denied must not be subscribed, or must be unsubscribed if already opted-in.

Acceptable values are:

  • "denied"
  • "granted"

lastUpdatedTimestamp

string

Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet.

OrderCustomerLoyaltyInfo

JSON representation
{
  "name": string,
  "loyaltyNumber": string
}
Fields
name

string

Name of card/membership holder, this field will be populated when

loyaltyNumber

string

The loyalty card/membership number.

OrderRefund

JSON representation
{
  "creationDate": string,
  "actor": string,
  "amount": {
    object (Price)
  },
  "reason": string,
  "reasonText": string
}
Fields
creationDate

string

Date on which the item has been created, in ISO 8601 format.

actor

string

The actor that created the refund.

Acceptable values are:

  • "customer"
  • "googleBot"
  • "googleCustomerService"
  • "googlePayments"
  • "googleSabre"
  • "merchant"

amount

object (Price)

The amount that is refunded.

reason

string

The reason for the refund.

Acceptable values are:

  • "adjustment"
  • "autoPostInternal"
  • "autoPostInvalidBillingAddress"
  • "autoPostNoInventory"
  • "autoPostPriceError"
  • "autoPostUndeliverableShippingAddress"
  • "couponAbuse"
  • "courtesyAdjustment"
  • "customerCanceled"
  • "customerDiscretionaryReturn"
  • "customerInitiatedMerchantCancel"
  • "customerSupportRequested"
  • "deliveredLateByCarrier"
  • "deliveredTooLate"
  • "expiredItem"
  • "failToPushOrderGoogleError"
  • "failToPushOrderMerchantError"
  • "failToPushOrderMerchantFulfillmentError"
  • "failToPushOrderToMerchant"
  • "failToPushOrderToMerchantOutOfStock"
  • "feeAdjustment"
  • "invalidCoupon"
  • "lateShipmentCredit"
  • "malformedShippingAddress"
  • "merchantDidNotShipOnTime"
  • "noInventory"
  • "orderTimeout"
  • "other"
  • "paymentAbuse"
  • "paymentDeclined"
  • "priceAdjustment"
  • "priceError"
  • "productArrivedDamaged"
  • "productNotAsDescribed"
  • "promoReallocation"
  • "qualityNotAsExpected"
  • "returnRefundAbuse"
  • "shippingCostAdjustment"
  • "shippingPriceError"
  • "taxAdjustment"
  • "taxError"
  • "undeliverableShippingAddress"
  • "unsupportedPoBoxAddress"
  • "wrongProductShipped"

reasonText

string

The explanation of the reason.

OrderShipment

JSON representation
{
  "id": string,
  "creationDate": string,
  "lineItems": [
    {
      object (OrderShipmentLineItemShipment)
    }
  ],
  "status": string,
  "carrier": string,
  "trackingId": string,
  "deliveryDate": string,
  "shipmentGroupId": string,
  "scheduledDeliveryDetails": {
    object (OrderShipmentScheduledDeliveryDetails)
  }
}
Fields
id

string

The ID of the shipment.

creationDate

string

Date on which the shipment has been created, in ISO 8601 format.

lineItems[]

object (OrderShipmentLineItemShipment)

The line items that are shipped.

status

string

The status of the shipment.

Acceptable values are:

  • "delivered"
  • "readyForPickup"
  • "shipped"
  • "undeliverable"

carrier

string

The carrier handling the shipment.

For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID.

Supported carriers for "US" are:

  • "ups" (United Parcel Service) automatic status updates
  • "usps" (United States Postal Service) automatic status updates
  • "fedex" (FedEx) automatic status updates
  • "dhl" (DHL eCommerce) automatic status updates (US only)
  • "ontrac" (OnTrac) automatic status updates
  • "dhl express" (DHL Express)
  • "deliv" (Deliv)
  • "dynamex" (TForce)
  • "lasership" (LaserShip)
  • "mpx" (Military Parcel Xpress)
  • "uds" (United Delivery Service)
  • "efw" (Estes Forwarding Worldwide)
  • "jd logistics" (JD Logistics)
  • "yunexpress" (YunExpress)
  • "china post" (China Post)
  • "china ems" (China Post Express Mail Service)
  • "singapore post" (Singapore Post)
  • "pos malaysia" (Pos Malaysia)
  • "postnl" (PostNL)
  • "ptt" (PTT Turkish Post)
  • "eub" (ePacket)
  • "chukou1" (Chukou1 Logistics)
  • "bestex" (Best Express)
  • "canada post" (Canada Post)
  • "purolator" (Purolator)
  • "canpar" (Canpar)
  • "india post" (India Post)
  • "blue dart" (Blue Dart)
  • "delhivery" (Delhivery)
  • "dtdc" (DTDC)
  • "tpc india" (TPC India)
  • "lso" (Lone Star Overnight)
  • "tww" (Team Worldwide)
  • "deliver-it" (Deliver-IT)
  • "cdl last mile" (CDL Last Mile)

Supported carriers for FR are:

  • "la poste" (La Poste) automatic status updates
  • "colissimo" (Colissimo by La Poste) automatic status updates
  • "ups" (United Parcel Service) automatic status updates
  • "chronopost" (Chronopost by La Poste)
  • "gls" (General Logistics Systems France)
  • "dpd" (DPD Group by GeoPost)
  • "bpost" (Belgian Post Group)
  • "colis prive" (Colis Privé)
  • "boxtal" (Boxtal)
  • "geodis" (GEODIS)
  • "tnt" (TNT)
  • "db schenker" (DB Schenker)
  • "aramex" (Aramex)

trackingId

string

The tracking ID for the shipment.

deliveryDate

string

Date on which the shipment has been delivered, in ISO 8601 format. Present only if status is delivered

shipmentGroupId

string

The shipment group ID of the shipment. This is set in shiplineitems request.

scheduledDeliveryDetails

object (OrderShipmentScheduledDeliveryDetails)

Delivery details of the shipment if scheduling is needed.

OrderShipmentLineItemShipment

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

string

The ID of the line item that is shipped. This value is assigned by Google when an order is created. Either lineItemId or productId is required.

quantity

integer (uint32 format)

The quantity that is shipped.

productId

string

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

OrderShipmentScheduledDeliveryDetails

JSON representation
{
  "scheduledDate": string,
  "carrierPhoneNumber": string
}
Fields
scheduledDate

string

The date a shipment is scheduled for delivery, in ISO 8601 format.

carrierPhoneNumber

string

The phone number of the carrier fulfilling the delivery. The phone number is formatted as the international notation in ITU-T Recommendation E.123 (for example, "+41 44 668 1800").

OrderPromotion

JSON representation
{
  "merchantPromotionId": string,
  "type": string,
  "subtype": string,
  "funder": string,
  "title": string,
  "shortTitle": string,
  "priceValue": {
    object (Price)
  },
  "taxValue": {
    object (Price)
  },
  "applicableItems": [
    {
      object (OrderPromotionItem)
    }
  ],
  "appliedItems": [
    {
      object (OrderPromotionItem)
    }
  ],
  "startTime": string,
  "endTime": string
}
Fields
merchantPromotionId

string

Required. This field is used to identify promotions within merchants' own systems.

type

string

Required. The scope of the promotion. Only product is supported for orders.createtestorder.

Acceptable values are:

  • "product"
  • "shipping"

subtype

string

Required. The category of the promotion. Only moneyOff is supported for orders.createtestorder.

Acceptable values are:

  • "buyMGetMoneyOff"
  • "buyMGetNMoneyOff"
  • "buyMGetNPercentOff"
  • "buyMGetPercentOff"
  • "freeGift"
  • "freeGiftWithItemId"
  • "freeGiftWithValue"
  • "freeShippingOvernight"
  • "freeShippingStandard"
  • "freeShippingTwoDay"
  • "moneyOff"
  • "percentOff"
  • "rewardPoints"
  • "salePrice"

funder

string

Required. The party funding the promotion. Only merchant is supported for orders.createtestorder.

Acceptable values are:

  • "google"
  • "merchant"

title

string

Required. The title of the promotion.

shortTitle

string

A short title of the promotion to be shown on the checkout page. Do not provide for orders.createtestorder.

priceValue

object (Price)

Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order.

taxValue

object (Price)

Estimated discount applied to tax (if allowed by law). Do not provide for orders.createtestorder.

applicableItems[]

object (OrderPromotionItem)

Items that this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. This field will also be empty for shipping promotions because shipping is not tied to any specific item.

appliedItems[]

object (OrderPromotionItem)

Items that this promotion have been applied to. Do not provide for orders.createtestorder. This field will be empty for shipping promotions because shipping is not tied to any specific item.

startTime

string

Promotion start time in ISO 8601 format. Date, time, and offset required, for example, "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z".

endTime

string

Promotion end time in ISO 8601 format. Date, time, and offset required, for example, "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z".

OrderPromotionItem

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

string

The line item ID of a product. Do not provide for orders.createtestorder.

productId

string

orders.createtestorder.

quantity

integer

The quantity of the associated product. Do not provide for orders.createtestorder.

offerId

string

Required. Offer ID of a product. Only for orders.createtestorder.

OrderPickupDetails

JSON representation
{
  "locationId": string,
  "address": {
    object (OrderAddress)
  },
  "collectors": [
    {
      object (OrderPickupDetailsCollector)
    }
  ],
  "pickupType": string
}
Fields
locationId

string

ID of the pickup location.

address

object (OrderAddress)

Address of the pickup location where the shipment should be sent. Note that recipientName in the address is the name of the business at the pickup location.

collectors[]

object (OrderPickupDetailsCollector)

Collectors authorized to pick up shipment from the pickup location.

pickupType

string

The pickup type of this order.

Acceptable values are:

  • "merchantStore"
  • "merchantStoreCurbside"
  • "merchantStoreLocker"
  • "thirdPartyPickupPoint"
  • "thirdPartyLocker"

OrderPickupDetailsCollector

JSON representation
{
  "name": string,
  "phoneNumber": string
}
Fields
name

string

Name of the person picking up the shipment.

phoneNumber

string

Phone number of the person picking up the shipment.

OrderOrderAnnotation

JSON representation
{
  "key": string,
  "value": string
}
Fields
key

string

Key for additional google provided (as key-value pairs) annotation.

value

string

Value for additional google provided (as key-value pairs) annotation.

Methods

acknowledge

Marks an order as acknowledged.

advancetestorder

Sandbox only.

cancel

Cancels all line items in an order, making a full refund.

cancellineitem

Cancels a line item, making a full refund.

canceltestorderbycustomer

Sandbox only.

captureOrder

Capture funds from the customer for the current order total.

createtestorder

Sandbox only.

createtestreturn

Sandbox only.

get

Retrieves an order from your Merchant Center account.

getbymerchantorderid

Retrieves an order using merchant order ID.

gettestordertemplate

Sandbox only.

instorerefundlineitem

Deprecated.

list

Lists the orders in your Merchant Center account.

refunditem

Issues a partial or total refund for items and shipment.

refundorder

Issues a partial or total refund for an order.

rejectreturnlineitem

Rejects return on an line item.

returnrefundlineitem

Returns and refunds a line item.

setlineitemmetadata

Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs.

shiplineitems

Marks line item(s) as shipped.

updatelineitemshippingdetails

Updates ship by and delivery by dates for a line item.

updatemerchantorderid

Updates the merchant order ID for a given order.

updateshipment

Updates a shipment's status, carrier, and/or tracking ID.