LineItem

一個委刊項包含一個產業。訂單或購物車中可以有多個相同產業的委刊項。請根據其用途,在垂直 proto 中定義子委刊項/外掛程式等項目。注意:1. 除非另有指定,所有層級的所有字串都必須少於 1000 個半形字元。2. 除非另有指定,否則所有層級的所有重複欄位計數都必須少於 50。3. 如有指定,所有層級的所有時間戳記都必須是有效的時間戳記。

JSON 表示法
{
  "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.
}
欄位
id

string

必要:委刊項指派給商家 ID。用於識別現有委刊項,以套用部分更新。長度上限為 64 個半形字元。

name

string

收據上的明細項目名稱。長度上限為 100 個半形字元。

userVisibleStateLabel
(deprecated)

string

已淘汰,請改用垂直層級狀態。舉例來說,如果是購物,請使用 PurchaseOrderExtension.status。這個委刊項狀態的使用者可見標籤。

provider

object (Merchant)

特定委刊項的供應商 (若與整體訂單不同)。例如:具有委刊項供應商 ANA 的 Expedia 訂單。

priceAttributes[]

object (PriceAttribute)

委刊項層級價格和調整項。

followUpActions[]

object (Action)

對委刊項的後續行動。

recipients[]

object (UserInfo)

委刊項層級客戶,可能與訂單層級的買方不同。示例:使用者 X 以使用者 Y 的名稱預訂了餐廳訂位。

image

object (Image)

與此項目相關聯的小型圖片 (如果有的話)。

description

string

委刊項說明。

notes[]

string

適用於這個特定委刊項的其他附註,例如取消政策。

disclosures[]

object (Disclosure)

與這個委刊項相關的揭露聲明。

vertical
(deprecated)

object

已淘汰:請改用產業。必要:根據類型/產業的委刊項語意內容。每個類別都應提供專屬的執行要求詳細資料。必須是下列其中一個值:google.actions.orders.v3.verticals.purchase.PurchaseItemExtension google.actions.orders.v3.verticals.reservation.ReservationItemExtension google.actions.orders.v3.verticals.ticket.TicketItemExtension

包含任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。例如:{ "id": 1234, "@type": "types.example.com/standard/id" }.

聯集欄位 verticals。必要:根據類型/產業的委刊項語意內容。每個類別都應提供專屬的執行要求詳細資料。verticals 只能是下列其中一項:
purchase

object (PurchaseItemExtension)

購買商品,例如商品、食物等。

reservation

object (ReservationItemExtension)

預訂餐廳、剪髮等訂單,

PurchaseItemExtension

「購買產業」中的委刊項內容。

JSON 表示法
{
  "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)
  }
}
欄位
status

enum (PurchaseStatus)

必要:委刊項層級狀態。

userVisibleStatusLabel

string

必要:使用者能夠看見狀態的標籤/字串。長度上限為 50 個半形字元。

type

enum (PurchaseType)

必填:購買類型。

productId
(deprecated)

string

與這個委刊項相關聯的產品或優惠 ID。

quantity

integer

商品數量。

unitMeasure

object (MerchantUnitMeasure)

單位測量。以所選單位指定項目大小。系統會根據尺寸和有效價格來決定單位價格。

returnsInfo

object (PurchaseReturnsInfo)

傳回這個明細項目的資訊。如果未設定,這個委刊項會沿用訂單層級傳回資訊。

fulfillmentInfo

object (PurchaseFulfillmentInfo)

這個委刊項的出貨資訊。如果未設定,這個委刊項會沿用訂單層級的出貨資訊。

itemOptions[]

object (ItemOption)

其他外掛程式或子作品。

extension

object

商家與 Google 之間交換的任何額外欄位。

包含任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。例如:{ "id": 1234, "@type": "types.example.com/standard/id" }.

productDetails

object (ProductDetails)

產品詳細資料。

MerchantUnitMeasure

商家計價單位。

JSON 表示法
{
  "measure": number,
  "unit": enum (Unit)
}
欄位
measure

number

值:範例 1.2。

unit

enum (Unit)

單位:POUND 範例,GRAM。

ItemOption

代表外掛程式或子作品。

JSON 表示法
{
  "id": string,
  "name": string,
  "prices": [
    {
      object (PriceAttribute)
    }
  ],
  "note": string,
  "quantity": integer,
  "productId": string,
  "subOptions": [
    {
      object (ItemOption)
    }
  ]
}
欄位
id

string

關於項目的選項,則專屬項目 ID。

name

string

選項名稱。

prices[]

object (PriceAttribute)

選項總價。

note

string

選項相關附註。

quantity

integer

選項包括商品數量、數量。

productId

string

與這個選項相關聯的產品或優惠 ID。

subOptions[]

object (ItemOption)

定義其他巢狀子選項。

ProductDetails

產品詳細資料。

JSON 表示法
{
  "productId": string,
  "gtin": string,
  "plu": string,
  "productType": string,
  "productAttributes": {
    string: string,
    ...
  }
}
欄位
productId

string

與這個委刊項相關聯的產品或優惠 ID。

gtin

string

產品的全球交易品項識別碼。如果 Merchant Center 中沒有 OfferId,這個做法就相當實用。選用。

plu

string

價格查詢代碼 (通常稱為 PLU 代碼、PLU 號碼、PLU、產生的代碼或製作標籤) 是一組編號,可用來識別雜貨店和超市銷售的批發農產品。

productType

string

商家定義的產品類別。例如「首頁 > 雜貨店 > 奶製品與雞蛋 > 牛奶 > 全牛奶」

productAttributes

map (key: string, value: string)

商家提供的產品詳細資料,例如 { "allergen": "peanut" }。如果 Merchant Center 中沒有 OfferId,這個做法就相當實用。選用。

這個物件中包含 "key": value 組合的清單,例如:{ "name": "wrench", "mass": "1.3kg", "count": "3" }.

ReservationItemExtension

餐廳、剪髮等預訂訂單的委刊項內容,下一個 ID:15。

JSON 表示法
{
  "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: ...,
    ...
  }
}
欄位
status

enum (ReservationStatus)

必要:預訂狀態。

userVisibleStatusLabel

string

必要:使用者能夠看見狀態的標籤/字串。長度上限為 50 個半形字元。

type

enum (ReservationType)

預訂類型如果沒有任何類型選項適用,則可取消設定。

reservationTime

object (Time)

預定完成服務/活動的時間。可以是時間範圍、日期或確切日期時間。

userAcceptableTimeRange

object (Time)

使用者可以接受的時間範圍

confirmationCode

string

此預訂的確認碼。

partySize

integer

人數。

staffFacilitators[]

object (StaffFacilitator)

準備預訂行程的職員講師。例如:髮型師。

location

object (Location)

服務/活動的位置。

extension

object

商家與 Google 之間交換的任何額外欄位。

包含任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。例如:{ "id": 1234, "@type": "types.example.com/standard/id" }.

StaffFacilitator

服務人員的相關資訊。

JSON 表示法
{
  "name": string,
  "image": {
    object (Image)
  }
}
欄位
name

string

工作人員的講師姓名。例如:「王大明」

image

object (Image)

表演者的圖片。