LineItem

一個委刊項包含一個產業。單一訂單或購物車可包含多個同產業的委刊項。在垂直 proto 中,您應根據用途定義子委刊項/外掛程式等項目。注意:1.除非另有指定,否則所有層級的所有字串都必須少於 1,000 個字元。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)

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

「item_quantity」選項。

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)

表演者的圖片。