LineItem

One line item contains one vertical. An order or cart can have multiple line items of same vertical. Sub-line items/add-ons etc should be defined in vertical protos depending on their use cases. Note: 1. All strings at all levels must be less than 1000 chars unless otherwise specified. 2. All repeated fields at all levels must be less than 50 in count unless otherwise specified. 3. All timestamps at all levels, if specified, must be valid timestamps.

JSON representation
{
  "id": string,
  "name": string,
  "userVisibleStateLabel": string,
  "provider": {
    object (Merchant)
  },
  "priceAttributes": [
    {
      object (PriceAttribute)
    }
  ],
  "followUpActions": [
    {
      object (Action)
    }
  ],
  "recipients": [
    {
      object (UserInfo)
    }
  ],
  "image": {
    object (Image)
  },
  "description": string,
  "notes": [
    string
  ],
  "disclosures": [
    {
      object (Disclosure)
    }
  ],
  "vertical": {
    "@type": string,
    field1: ...,
    ...
  },

  // Union field verticals can be only one of the following:
  "purchase": {
    object (PurchaseItemExtension)
  },
  "reservation": {
    object (ReservationItemExtension)
  }
  // End of list of possible types for union field verticals.
}
Fields
id

string

Required: Merchant assigned identifier for line item. Used for identifying existing line item in applying partial updates. Max allowed length is 64 chars.

name

string

name of line item as displayed on the receipt. Max allowed length is 100 chars.

userVisibleStateLabel
(deprecated)

string

Deprecated. Use vertical level status instead. For example, for purchases, use PurchaseOrderExtension.status. User visible label for the state of this line item.

provider

object (Merchant)

The provider of the particular line item, if different from the overall order. Example: Expedia Order with line item provider ANA.

priceAttributes[]

object (PriceAttribute)

Line item level price and adjustments.

followUpActions[]

object (Action)

Follow up actions at line item.

recipients[]

object (UserInfo)

Line item level customers, this could be different from Order level buyer. Example: User X made restaurant reservation under name of user Y.

image

object (Image)

Small image associated with this item, if any.

description

string

Line item description.

notes[]

string

Additional notes applicable to this particular line item, for example cancellation policy.

disclosures[]

object (Disclosure)

Disclosures associated with this line item.

vertical
(deprecated)

object

Deprecated: Use verticals instead. Required: Semantic Contents of line item based on its type/vertical. Every vertical should include its own fulfillment details. Must be either one of the following values: google.actions.orders.v3.verticals.purchase.PurchaseItemExtension google.actions.orders.v3.verticals.reservation.ReservationItemExtension google.actions.orders.v3.verticals.ticket.TicketItemExtension

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

Union field verticals. Required: Semantic Contents of line item based on its type/vertical. Every vertical should include its own fulfillment details. verticals can be only one of the following:
purchase

object (PurchaseItemExtension)

Purchase orders like goods, food etc.

reservation

object (ReservationItemExtension)

Reservation orders like restaurant, haircut etc.

PurchaseItemExtension

Line item contents of Purchase Vertical.

JSON representation
{
  "status": enum (PurchaseStatus),
  "userVisibleStatusLabel": string,
  "type": enum (PurchaseType),
  "productId": string,
  "quantity": integer,
  "unitMeasure": {
    object (MerchantUnitMeasure)
  },
  "returnsInfo": {
    object (PurchaseReturnsInfo)
  },
  "fulfillmentInfo": {
    object (PurchaseFulfillmentInfo)
  },
  "itemOptions": [
    {
      object (ItemOption)
    }
  ],
  "extension": {
    "@type": string,
    field1: ...,
    ...
  },
  "productDetails": {
    object (ProductDetails)
  }
}
Fields
status

enum (PurchaseStatus)

Required: Line item level status.

userVisibleStatusLabel

string

Required: User visible label/string for the status. Max allowed length is 50 chars.

type

enum (PurchaseType)

Required: type of purchase.

productId
(deprecated)

string

Product or offer id associated with this line item.

quantity

integer

Quantity of the item.

unitMeasure

object (MerchantUnitMeasure)

Unit measure. Specifies the size of the item in chosen units. The size, together with the active price is used to determine the unit price.

returnsInfo

object (PurchaseReturnsInfo)

Returns info for this line item. If unset, this line item inherits order level returns info.

fulfillmentInfo

object (PurchaseFulfillmentInfo)

Fulfillment info for this line item. If unset, this line item inherits order level fulfillment info.

itemOptions[]

object (ItemOption)

Additional add-ons or sub-items.

extension

object

Any extra fields exchanged between merchant and google.

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

productDetails

object (ProductDetails)

Details about the product.

MerchantUnitMeasure

Merchant unit pricing measure.

JSON representation
{
  "measure": number,
  "unit": enum (Unit)
}
Fields
measure

number

Value: Example 1.2.

unit

enum (Unit)

Unit: Example POUND, GRAM.

ItemOption

Represents add-ons or sub-items.

JSON representation
{
  "id": string,
  "name": string,
  "prices": [
    {
      object (PriceAttribute)
    }
  ],
  "note": string,
  "quantity": integer,
  "productId": string,
  "subOptions": [
    {
      object (ItemOption)
    }
  ]
}
Fields
id

string

For options that are items, unique item id.

name

string

Option name.

prices[]

object (PriceAttribute)

Option total price.

note

string

Note related to the option.

quantity

integer

For options that are items, quantity.

productId

string

Product or offer id associated with this option.

subOptions[]

object (ItemOption)

To define other nested sub options.

ProductDetails

Details about the product.

JSON representation
{
  "productId": string,
  "gtin": string,
  "plu": string,
  "productType": string,
  "productAttributes": {
    string: string,
    ...
  }
}
Fields
productId

string

Product or offer id associated with this line item.

gtin

string

Global Trade Item Number of the product. Useful if offerId is not present in Merchant Center. Optional.

plu

string

Price look-up codes, commonly called PLU codes, PLU numbers, PLUs, produce codes, or produce labels, are a system of numbers that uniquely identify bulk produce sold in grocery stores and supermarkets.

productType

string

Product category defined by the merchant. E.g. "Home > Grocery > Dairy & Eggs > Milk > Whole Milk"

productAttributes

map (key: string, value: string)

Merchant-provided details about the product, e.g. { "allergen": "peanut" }. Useful if offerId is not present in Merchant Center. Optional.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

ReservationItemExtension

Line item contents for reservation orders like restaurant, haircut etc. Next id: 15.

JSON representation
{
  "status": enum (ReservationStatus),
  "userVisibleStatusLabel": string,
  "type": enum (ReservationType),
  "reservationTime": {
    object (Time)
  },
  "userAcceptableTimeRange": {
    object (Time)
  },
  "confirmationCode": string,
  "partySize": integer,
  "staffFacilitators": [
    {
      object (StaffFacilitator)
    }
  ],
  "location": {
    object (Location)
  },
  "extension": {
    "@type": string,
    field1: ...,
    ...
  }
}
Fields
status

enum (ReservationStatus)

Required: Reservation status.

userVisibleStatusLabel

string

Required: User visible label/string for the status. Max allowed length is 50 chars.

type

enum (ReservationType)

type of reservation. May be unset if none of the type options is applicable.

reservationTime

object (Time)

time when the service/event is scheduled to occur. Can be a time range, a date, or an exact date time.

userAcceptableTimeRange

object (Time)

time range that is acceptable to the user.

confirmationCode

string

Confirmation code for this reservation.

partySize

integer

The number of people.

staffFacilitators[]

object (StaffFacilitator)

Staff facilitators who will be servicing the reservation. Ex. The hairstylist.

location

object (Location)

Location of the service/event.

extension

object

Any extra fields exchanged between merchant and google.

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

StaffFacilitator

Information about service person.

JSON representation
{
  "name": string,
  "image": {
    object (Image)
  }
}
Fields
name

string

The staff facilitator's name. Ex. "John Smith"

image

object (Image)

Performer's images.