Order

Order represents the content of a user's in-progress or completed order.

JSON representation
{
  "items": [
    {
      object (OrderItem)
    }
  ],
  "metadata": {
    object (OrderMetadata)
  },
  "fulfillment": {
    object (OrderFulfillment)
  },
  "priceInfo": {
    object (OrderPriceInfo)
  },
  "externalOrderId": string,
  "orderPayment": {
    object (OrderPayment)
  }
}
Fields
items[]

object (OrderItem)

Optional. The items in the order.

metadata

object (OrderMetadata)

Optional. Other metadata collected or inferred during the order.

fulfillment

object (OrderFulfillment)

Optional. The fulfillment information for the order.

priceInfo

object (OrderPriceInfo)

Optional. Price information for the order.

externalOrderId

string

Output only. The external identifier for this order. Populated only if a point-of-sale integration is enabled.

orderPayment

object (OrderPayment)

Optional. The payment state associated with this order.

OrderItem

OrderItem specifies the state of an Item which is part of an Order.

JSON representation
{
  "uid": string,
  "itemId": string,
  "displayName": string,
  "image": {
    object (Image)
  },
  "basePrice": {
    object (Money)
  },
  "integrationAttributes": {
    object (ItemIntegrationAttributes)
  },
  "modifierGroups": [
    {
      object (OrderModifierGroup)
    }
  ],
  "quantity": integer,
  "totalPrice": {
    object (Money)
  },
  "categoryIds": [
    string
  ]
}
Fields
uid

string

Optional. A system-assigned unique identifier for this item.

itemId

string

Required. Identifier for an Item in the Menu, unique within its Menu.

displayName

string

Output only. Human-readable name for this line item to be shown on user interfaces.

image

object (Image)

Output only. Image to display for this item in the UI.

basePrice

object (Money)

Output only. The base price of the item. This may be affected by the selected modifiers. This is the price per unit of the item.

integrationAttributes

object (ItemIntegrationAttributes)

Output only. Metadata associated with this entity used for downstream integrations.

modifierGroups[]

object (OrderModifierGroup)

Optional. ModifierGroups applied to this item.

quantity

integer

Optional. The quantity of this item in the order.

totalPrice

object (Money)

Output only. The total price for this line item, inclusive of selected modifiers and reflecting the item quantity, before tax. Used for per-item bag display.

categoryIds[]

string

Output only. Category IDs the underlying menu item belongs to. Mirrors the menu's Item.category_ids so clients can group ordered items by menu category.

OrderModifierGroup

OrderModifierGroup specifies the state of a ModifierGroup which is part of an OrderItem.

JSON representation
{
  "modifierGroupId": string,
  "displayName": string,
  "integrationAttributes": {
    object (ModifierGroupIntegrationAttributes)
  },
  "modifiers": [
    {
      object (OrderModifier)
    }
  ]
}
Fields
modifierGroupId

string

Required. Identifier for this modifier group, unique within its menu.

displayName

string

Output only. The modifier group name -- e.g. "Toppings (Sandwich)" or "Side for Medium Combo".

integrationAttributes

object (ModifierGroupIntegrationAttributes)

Output only. Metadata associated with this entity used for downstream integrations.

modifiers[]

object (OrderModifier)

Optional. The modifiers applied to this modifier group.

OrderModifier

OrderModifier specifies the state of a Modifier which is part of an OrderModifierGroup.

JSON representation
{
  "uid": string,
  "modifierId": string,
  "displayName": string,
  "priceAdjustment": {
    object (Money)
  },
  "quantity": integer,
  "modifierAction": {
    object (OrderModifierAction)
  },
  "image": {
    object (Image)
  },
  "integrationAttributes": {
    object (ModifierIntegrationAttributes)
  },
  "modifierGroups": [
    {
      object (OrderModifierGroup)
    }
  ],
  "isDefault": boolean
}
Fields
uid

string

Optional. A system-assigned unique identifier for this modifier.

modifierId

string

Required. Identifier for this modifier, unique within the menu.

displayName

string

Output only. The modifier display name to be shown on user interfaces.

priceAdjustment

object (Money)

Output only. The price adjustment associated with this modifier, if any. This is the price per unit of the modifier.

quantity

integer

Optional. The quantity of this modifier action applied.

modifierAction

object (OrderModifierAction)

Optional. The modifier action applied to this modifier.

image

object (Image)

Output only. Image to display for this modifier in the UI.

integrationAttributes

object (ModifierIntegrationAttributes)

Output only. Metadata associated with this entity used for downstream integrations.

modifierGroups[]

object (OrderModifierGroup)

Optional. Nested modifier groups applied to this modifier.

isDefault

boolean

Output only. Whether this modifier is a default selection for its modifier group. Needed so clients can compute an accurate selections diff.

OrderModifierAction

OrderModifierAction specifies the ModifierAction associated with an applied OrderModifier.

JSON representation
{
  "name": string
}
Fields
name

string

Optional. The modifier action name -- e.g. "NO", "SIDE", "ADD", "EXTRA".

OrderMetadata

OrderMetadata contains other metadata collected or inferred during the order.

JSON representation
{
  "collectedCustomerName": string,
  "callerPhoneNumber": string,
  "deliveryAddress": {
    object (DeliveryAddress)
  }
}
Fields
collectedCustomerName

string

Optional. Name of the customer, collected while taking the order. Only populated when the agent is configured to collect the customer's name. This may be collected verbally and could contain spelling mistakes or mistranscriptions, so care should be taken when displaying it to users, and it shouldn't be trusted as e.g. payment information.

callerPhoneNumber

string

Optional. The phone number of the customer placing the order.

deliveryAddress

object (DeliveryAddress)

Optional. The delivery address, if the order is a delivery order.

DeliveryAddress

The delivery address of an order. It could be an existing saved or collected address.

JSON representation
{
  "address": {
    object (PostalAddress)
  },
  "validationStatus": enum (ValidationStatus),
  "coordinates": {
    object (LatLng)
  }
}
Fields
address

object (PostalAddress)

Optional. The delivery address.

validationStatus

enum (ValidationStatus)

Optional. The validation status of the address.

coordinates

object (LatLng)

Optional. The geographic coordinates of the address. Used to validate if the address is within the delivery range of the store.

ValidationStatus

The validation status of the delivery address. It is determined by client-specific validation logic.

Enums
VALIDATION_STATUS_UNSPECIFIED The address has not yet been validated.
VALIDATION_STATUS_VALID The address is valid.
VALIDATION_STATUS_INVALID The address is invalid (does not exist, cannot be parsed, etc.)
VALIDATION_STATUS_OUT_OF_RANGE The address exists and is resolved, but out of range for the store.
VALIDATION_STATUS_INCOMPLETE_ADDRESS The address is missing required fields (missing street number/name, city, state, zip, etc)

OrderFulfillment

OrderFulfillment contains information about order fulfillment.

JSON representation
{
  "fulfillmentMethod": enum (FulfillmentMethod),
  "createTime": string,
  "targetFulfillmentTime": string
}
Fields
fulfillmentMethod

enum (FulfillmentMethod)

Optional. The fulfillment method of the order.

createTime

string (Timestamp format)

Output only. The time the order was created at.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

targetFulfillmentTime

string (Timestamp format)

Optional. The time the order is scheduled for fulfillment, used for 'order ahead'. If not provided, the order is assumed to be for 'as soon as possible'.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

OrderPriceInfo

OrderPriceInfo encapsulates the various price components of an order.

JSON representation
{
  "totalPrice": {
    object (Money)
  },
  "subtotalPrice": {
    object (Money)
  },
  "taxPrice": {
    object (Money)
  },
  "discount": {
    object (Money)
  },
  "saving": {
    object (Money)
  },
  "fees": {
    object (Money)
  }
}
Fields
totalPrice

object (Money)

Optional. The final total price after all taxes, fees, and discounts are applied.

subtotalPrice

object (Money)

Optional. The subtotal price of all items and modifiers, before taxes, discounts.

taxPrice

object (Money)

Optional. The amount of tax applied to the order.

discount

object (Money)

Optional. Total discount applied to the order

saving

object (Money)

Optional. Deal savings applied to the order

fees

object (Money)

Optional. Total fees applied to the order

OrderPayment

The payment related information for an order.

JSON representation
{
  "tippingInfo": {
    object (TippingInfo)
  },
  "loyaltyConsumed": {
    object (LoyaltyAmount)
  },
  "paymentInfo": {
    object (PaymentInfo)
  }
}
Fields
tippingInfo

object (TippingInfo)

Optional. Tipping information.

loyaltyConsumed

object (LoyaltyAmount)

Optional. Loyalty amount consumed for the payment.

paymentInfo

object (PaymentInfo)

Optional. Information about the payment method used.

TippingInfo

Information about tipping.

JSON representation
{

  // Union field tip_type can be only one of the following:
  "amount": {
    object (Money)
  },
  "percentageBps": integer
  // End of list of possible types for union field tip_type.
}
Fields
Union field tip_type. The tip amount or percentage. tip_type can be only one of the following:
amount

object (Money)

Optional. A specific money amount for the tip.

percentageBps

integer

Optional. Percentage in basis points, e.g., 450 = 4.5%.

LoyaltyAmount

Represents a customer's loyalty amount.

JSON representation
{
  "units": string
}
Fields
units

string (int64 format)

Required. The loyalty points.

PaymentInfo

Payment information of the user.

JSON representation
{
  "creditCardLastFourDigits": string,
  "creditCardCvv": string,
  "paymentMethod": enum (PaymentMethod)
}
Fields
creditCardLastFourDigits

string

Optional. The last four digits of the credit card. This is used to verify the credit card number at the payment stage.

creditCardCvv

string

Optional. CVV of the credit card.

paymentMethod

enum (PaymentMethod)

Optional. The type of payment method used.

PaymentMethod

The type of payment method.

Enums
PAYMENT_METHOD_UNSPECIFIED Unspecified payment method.
PAYMENT_METHOD_CREDIT_CARD Credit card.
PAYMENT_METHOD_CASH Cash.