- Resource: Order
- OrderLineItem
- OrderLineItemShippingDetails
- OrderLineItemShippingDetailsMethod
- OrderLineItemReturnInfo
- OrderLineItemProduct
- OrderLineItemProductVariantAttribute
- OrderLineItemProductFee
- OrderReturn
- OrderCancellation
- OrderMerchantProvidedAnnotation
- OrderLineItemAdjustment
- OrderDeliveryDetails
- OrderAddress
- OrderCustomer
- OrderCustomerMarketingRightsInfo
- OrderCustomerLoyaltyInfo
- OrderRefund
- OrderShipment
- OrderShipmentLineItemShipment
- OrderShipmentScheduledDeliveryDetails
- OrderPromotion
- OrderPromotionItem
- OrderPickupDetails
- OrderPickupDetailsCollector
- OrderOrderAnnotation
- Methods
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 ( |
Fields | |
---|---|
id |
The REST ID of the order. Globally unique. |
merchantId |
|
merchantOrderId |
Merchant-provided ID of the order. |
kind |
Identifies what kind of resource this is. Value: the fixed string " |
lineItems[] |
Line items that are ordered. |
status |
The status of the order. Acceptable values are:
|
paymentStatus |
The status of the payment. Acceptable values are:
|
acknowledged |
Whether the order was acknowledged. |
placedDate |
The date when the order was placed, in ISO 8601 format. |
deliveryDetails |
Delivery details for shipments of type |
customer |
The details of the customer who placed the order. |
shippingCost |
The total cost of shipping for all items. |
shippingCostTax |
The tax for the total shipping cost. |
refunds[] |
Refunds for the order. |
shipments[] |
Shipments of the order. |
billingAddress |
The billing address. |
promotions[] |
Promotions associated with the order. To determine which promotions apply to which products, check the Examples:
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 |
The party responsible for collecting and remitting taxes. Acceptable values are:
|
netPriceAmount |
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 |
The net amount for the order (tax part). Note that in certain cases due to taxable base adjustment |
pickupDetails |
Pickup details for shipments of type |
annotations[] |
accounts.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 ( |
Fields | |
---|---|
id |
The ID of the line item. |
quantityOrdered |
Number of items ordered. |
quantityPending |
Number of items pending. |
quantityShipped |
Number of items shipped. |
quantityDelivered |
Number of items delivered. |
quantityReturned |
Number of items returned. |
quantityCanceled |
Number of items canceled. |
price |
Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. |
tax |
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 |
Details of the requested shipping for the line item. |
returnInfo |
Details of the return policy for the line item. |
product |
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[] |
Returns of the line item. |
cancellations[] |
Cancellations of the line item. |
annotations[] |
Annotations that are attached to the line item. |
adjustments[] |
Price and tax adjustments applied on the line item. |
quantityUndeliverable |
Number of items undeliverable. |
quantityReadyForPickup |
Number of items ready for pickup. |
OrderLineItemShippingDetails
JSON representation |
---|
{
"method": {
object ( |
Fields | |
---|---|
method |
Required. Details of the shipping method. |
shipByDate |
Required. The ship by date, in ISO 8601 format. |
deliverByDate |
Required. The delivery by date, in ISO 8601 format. |
type |
Type of shipment. Indicates whether Acceptable values are:
|
pickupPromiseInMinutes |
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 |
Required. The name of the shipping method. |
carrier |
The carrier for the shipping. Optional. See |
minDaysInTransit |
Required. Minimum transit time. |
maxDaysInTransit |
Required. Maximum transit time. |
OrderLineItemReturnInfo
JSON representation |
---|
{ "isReturnable": boolean, "daysToReturn": integer, "policyUrl": string } |
Fields | |
---|---|
isReturnable |
Required. Whether the item is returnable. |
daysToReturn |
Required. How many days later the item can be returned. |
policyUrl |
Required. URL of the item return policy. |
OrderLineItemProduct
JSON representation |
---|
{ "id": string, "offerId": string, "targetCountry": string, "contentLanguage": string, "price": { object ( |
Fields | |
---|---|
id |
The REST ID of the product. |
offerId |
An identifier of the item. |
targetCountry |
The CLDR territory code of the target country of the product. |
contentLanguage |
The two-letter ISO 639-1 language code for the item. |
price |
Price of the item. |
title |
The title of the product. |
gtin |
Global Trade Item Number (GTIN) of the item. |
brand |
Brand of the item. |
mpn |
Manufacturer Part Number (MPN) of the item. |
condition |
Condition or state of the item. Acceptable values are:
|
itemGroupId |
Shared identifier for all variants of the same product. |
imageLink |
URL of an image of the item. |
shownImage |
URL to the cached image shown to the user when order was placed. |
variantAttributes[] |
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[] |
Associated fees at order creation time. |
OrderLineItemProductVariantAttribute
JSON representation |
---|
{ "dimension": string, "value": string } |
Fields | |
---|---|
dimension |
The dimension of the variant. |
value |
The value for the dimension. |
OrderLineItemProductFee
JSON representation |
---|
{
"name": string,
"amount": {
object ( |
Fields | |
---|---|
name |
Name of the fee. |
amount |
Amount of the fee. |
OrderReturn
JSON representation |
---|
{ "creationDate": string, "actor": string, "quantity": integer, "reason": string, "reasonText": string } |
Fields | |
---|---|
creationDate |
Date on which the item has been created, in ISO 8601 format. |
actor |
The actor that created the refund. Acceptable values are:
|
quantity |
Quantity that is returned. |
reason |
The reason for the return. Acceptable values are:
|
reasonText |
The explanation of the reason. |
OrderCancellation
JSON representation |
---|
{ "creationDate": string, "actor": string, "quantity": integer, "reason": string, "reasonText": string } |
Fields | |
---|---|
creationDate |
Date on which the cancellation has been created, in ISO 8601 format. |
actor |
The actor that created the cancellation. Acceptable values are:
|
quantity |
The quantity that was canceled. |
reason |
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:
|
reasonText |
The explanation of the reason. |
OrderMerchantProvidedAnnotation
JSON representation |
---|
{ "key": string, "value": string } |
Fields | |
---|---|
key |
Key for additional merchant provided (as key-value pairs) annotation about the line item. |
value |
Value for additional merchant provided (as key-value pairs) annotation about the line item. |
OrderLineItemAdjustment
JSON representation |
---|
{ "type": string, "priceAdjustment": { object ( |
Fields | |
---|---|
type |
Type of this adjustment. Acceptable values are:
|
priceAdjustment |
Adjustment for total price of the line item. |
taxAdjustment |
Adjustment for total tax of the line item. |
OrderDeliveryDetails
JSON representation |
---|
{
"address": {
object ( |
Fields | |
---|---|
address |
The delivery address |
phoneNumber |
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 |
Name of the recipient. |
streetAddress[] |
Street-level part of the address. Use |
locality |
City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs). |
region |
Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). |
country |
CLDR country code (for example, "US"). |
postalCode |
Postal Code or ZIP (for example, "94043"). |
isPostOfficeBox |
Whether the address is a post office box. |
fullAddress[] |
Strings representing the lines of the printed label for mailing the order, for example: John Smith |
OrderCustomer
JSON representation |
---|
{ "fullName": string, "marketingRightsInfo": { object ( |
Fields | |
---|---|
fullName |
Full name of the customer. |
marketingRightsInfo |
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 |
Loyalty program information. |
invoiceReceivingEmail |
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 |
Email address that can be used for marketing purposes. The field may be empty even if |
explicitMarketingPreference |
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 Acceptable values are:
|
lastUpdatedTimestamp |
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 |
Name of card/membership holder, this field will be populated when |
loyaltyNumber |
The loyalty card/membership number. |
OrderRefund
JSON representation |
---|
{
"creationDate": string,
"actor": string,
"amount": {
object ( |
Fields | |
---|---|
creationDate |
Date on which the item has been created, in ISO 8601 format. |
actor |
The actor that created the refund. Acceptable values are:
|
amount |
The amount that is refunded. |
reason |
The reason for the refund. Acceptable values are:
|
reasonText |
The explanation of the reason. |
OrderShipment
JSON representation |
---|
{ "id": string, "creationDate": string, "lineItems": [ { object ( |
Fields | |
---|---|
id |
The ID of the shipment. |
creationDate |
Date on which the shipment has been created, in ISO 8601 format. |
lineItems[] |
The line items that are shipped. |
status |
The status of the shipment. Acceptable values are:
|
carrier |
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:
Supported carriers for FR are:
|
trackingId |
The tracking ID for the shipment. |
deliveryDate |
Date on which the shipment has been delivered, in ISO 8601 format. Present only if |
shipmentGroupId |
The shipment group ID of the shipment. This is set in shiplineitems request. |
scheduledDeliveryDetails |
Delivery details of the shipment if scheduling is needed. |
OrderShipmentLineItemShipment
JSON representation |
---|
{ "lineItemId": string, "quantity": integer, "productId": string } |
Fields | |
---|---|
lineItemId |
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 |
The quantity that is shipped. |
productId |
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 |
The date a shipment is scheduled for delivery, in ISO 8601 format. |
carrierPhoneNumber |
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 ( |
Fields | |
---|---|
merchantPromotionId |
Required. This field is used to identify promotions within merchants' own systems. |
type |
Required. The scope of the promotion. Only Acceptable values are:
|
subtype |
Required. The category of the promotion. Only Acceptable values are:
|
funder |
Required. The party funding the promotion. Only Acceptable values are:
|
title |
Required. The title of the promotion. |
shortTitle |
A short title of the promotion to be shown on the checkout page. Do not provide for |
priceValue |
Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order. |
taxValue |
Estimated discount applied to tax (if allowed by law). Do not provide for |
applicableItems[] |
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[] |
Items that this promotion have been applied to. Do not provide for |
startTime |
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 |
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 |
The line item ID of a product. Do not provide for |
productId |
|
quantity |
The quantity of the associated product. Do not provide for |
offerId |
Required. Offer ID of a product. Only for |
OrderPickupDetails
JSON representation |
---|
{ "locationId": string, "address": { object ( |
Fields | |
---|---|
locationId |
ID of the pickup location. |
address |
Address of the pickup location where the shipment should be sent. Note that |
collectors[] |
Collectors authorized to pick up shipment from the pickup location. |
pickupType |
The pickup type of this order. Acceptable values are:
|
OrderPickupDetailsCollector
JSON representation |
---|
{ "name": string, "phoneNumber": string } |
Fields | |
---|---|
name |
Name of the person picking up the shipment. |
phoneNumber |
Phone number of the person picking up the shipment. |
OrderOrderAnnotation
JSON representation |
---|
{ "key": string, "value": string } |
Fields | |
---|---|
key |
Key for additional google provided (as key-value pairs) annotation. |
value |
Value for additional google provided (as key-value pairs) annotation. |
Methods |
|
---|---|
|
Marks an order as acknowledged. |
|
Sandbox only. |
|
Cancels all line items in an order, making a full refund. |
|
Cancels a line item, making a full refund. |
|
Sandbox only. |
|
Capture funds from the customer for the current order total. |
|
Sandbox only. |
|
Sandbox only. |
|
Retrieves an order from your Merchant Center account. |
|
Retrieves an order using merchant order ID. |
|
Sandbox only. |
|
Deprecated. |
|
Lists the orders in your Merchant Center account. |
|
Issues a partial or total refund for items and shipment. |
|
Issues a partial or total refund for an order. |
|
Rejects return on an line item. |
|
Returns and refunds a line item. |
|
Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. |
|
Marks line item(s) as shipped. |
|
Updates ship by and delivery by dates for a line item. |
|
Updates the merchant order ID for a given order. |
|
Updates a shipment's status, carrier, and/or tracking ID. |