Order

訂單實體。注意:1. 除非另有指定,所有層級的所有字串都必須少於 1000 個半形字元。2. 除非另有指定,否則所有層級的所有重複欄位計數都必須少於 50。3. 如有指定,所有層級的所有時間戳記都必須是有效的時間戳記。

JSON 表示法
{
  "googleOrderId": string,
  "merchantOrderId": string,
  "userVisibleOrderId": string,
  "userVisibleStateLabel": string,
  "buyerInfo": {
    object (UserInfo)
  },
  "image": {
    object (Image)
  },
  "createTime": string,
  "lastUpdateTime": string,
  "transactionMerchant": {
    object (Merchant)
  },
  "contents": {
    object (Contents)
  },
  "priceAttributes": [
    {
      object (PriceAttribute)
    }
  ],
  "followUpActions": [
    {
      object (Action)
    }
  ],
  "paymentData": {
    object (PaymentData)
  },
  "termsOfServiceUrl": string,
  "note": string,
  "promotions": [
    {
      object (Promotion)
    }
  ],
  "disclosures": [
    {
      object (Disclosure)
    }
  ],
  "vertical": {
    "@type": string,
    field1: ...,
    ...
  },

  // Union field verticals can be only one of the following:
  "purchase": {
    object (PurchaseOrderExtension)
  },
  "ticket": {
    object (TicketOrderExtension)
  }
  // End of list of possible types for union field verticals.
}
欄位
googleOrderId

string

Google 指派的訂單 ID。

merchantOrderId

string

必填:商家指派的內部訂單 ID。此 ID 不得重複,而且是後續的訂單更新作業時必填。這個 ID 可以設為提供的 googleOrderId 或任何其他不重複的值。請注意,向使用者顯示的 ID 是 userVisibleOrderId,可能是另一個更易於使用的值。長度上限為 128 個半形字元。

userVisibleOrderId

string

參照目前訂單的使用者專屬 ID。在網站、應用程式和電子郵件等其他情況下,這個 ID 應與此訂單顯示的 ID 保持一致。

userVisibleStateLabel
(deprecated)

string

已淘汰:請改用 OrderExtensions 狀態。此訂單狀態的使用者可見標籤。

buyerInfo

object (UserInfo)

買方相關資訊

image

object (Image)

與訂單相關聯的圖片。

createTime

string (Timestamp format)

必填:訂單建立的日期和時間。

RFC3339 世界標準時間「Zulu」格式的時間戳記,精確度達奈秒單位,範例:"2014-10-02T15:01:23.045123456Z"

lastUpdateTime

string (Timestamp format)

上次更新訂單的日期和時間。此為 OrderUpdate 必填屬性。

RFC3339 世界標準時間「Zulu」格式的時間戳記,精確度達奈秒單位,範例:"2014-10-02T15:01:23.045123456Z"

transactionMerchant

object (Merchant)

協助結帳的商家。這可能與委刊項層級供應商設定不同。例如:帶有 ANA 委刊項的「Expedia Order」。

contents

object (Contents)

必要:排序一組委刊項的內容。

priceAttributes[]

object (PriceAttribute)

價格、折扣、稅金等。

followUpActions[]

object (Action)

依訂單層級的後續追蹤動作。

paymentData

object (PaymentData)

訂單的付款相關資料。

termsOfServiceUrl

string

訂單/提案適用的服務條款連結。

note

string

訂單附加的附註。

promotions[]

object (Promotion)

與這筆訂單相關聯的所有促銷活動。

disclosures[]

object (Disclosure)

與這筆訂單相關的揭露事項。

vertical
(deprecated)

object

已淘汰:請改用產業。除非在某些委刊項中覆寫設定,否則這些屬性會套用至所有委刊項。這個產業必須與委刊項層級產業類型相符。可能的值:google.actions.orders.v3.verticals.purchase.PurchaseOrderExtension google.actions.orders.v3.verticals.ticket.TicketOrderExtension

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

聯集欄位 verticals。除非在某些委刊項中覆寫設定,否則這些屬性會套用至所有委刊項。這個產業必須與委刊項層級產業類型相符。verticals 只能是下列其中一項:
purchase

object (PurchaseOrderExtension)

訂購單

ticket

object (TicketOrderExtension)

票券訂單

目錄

委刊項的包裝函式。

JSON 表示法
{
  "lineItems": [
    {
      object (LineItem)
    }
  ]
}
欄位
lineItems[]

object (LineItem)

訂單委刊項清單。至少要有 1 個委刊項,上限為 50 個。所有委刊項都必須屬於相同的產業。

PaymentData

與訂單相關的付款資料。

JSON 表示法
{
  "paymentResult": {
    object (PaymentResult)
  },
  "paymentInfo": {
    object (PaymentInfo)
  }
}
欄位
paymentResult

object (PaymentResult)

整合商用來完成交易的付款方式。如果結帳體驗是由「Google 上的應用程式」管理,Google 上的動作就會填入這個欄位。

paymentInfo

object (PaymentInfo)

與面向使用者互動的訂單相關的付款資訊。

PaymentResult

整合商用來完成交易的付款方式。

JSON 表示法
{

  // Union field result can be only one of the following:
  "googlePaymentData": string,
  "merchantPaymentMethodId": string
  // End of list of possible types for union field result.
}
欄位
聯集欄位 result。提供 Google 付款資料或商家付款方式。result 只能是下列其中一項:
googlePaymentData

string

Google 提供的付款方式資料。如果 Google 支援的付款處理方列為 Google 支援的付款處理方,請前往以下網址:https://developers.google.com/pay/api/ 前往付款處理方連結,瞭解詳情。如果不是,請參閱下列酬載詳細資料。https://developers.google.com/pay/api/payment-data-cryptography

merchantPaymentMethodId

string

使用者選擇商家/動作提供的付款方式。

PaymentInfo

所下訂單的付款資訊。這個 Proto 會擷取適用於使用者互動的資訊。

JSON 表示法
{
  "paymentMethodDisplayInfo": {
    object (PaymentMethodDisplayInfo)
  },
  "paymentMethodProvenance": enum (PaymentMethodProvenance)
}
欄位
paymentMethodDisplayInfo

object (PaymentMethodDisplayInfo)

交易所用付款方式的顯示資訊。

paymentMethodProvenance

enum (PaymentMethodProvenance)

交易所用付款方式的證明。使用者可能已向 Google 和商家註冊相同的付款方式。

PaymentMethodDisplayInfo

整合商用來完成交易的付款方式。

JSON 表示法
{
  "paymentType": enum (PaymentType),
  "paymentMethodDisplayName": string
}
欄位
paymentType

enum (PaymentType)

付款類型。

paymentMethodDisplayName

string

付款方式向使用者顯示的名稱。例如 VISA **** 1234 支票帳戶 **** 5678

宣傳

新增至購物車的促銷活動/優惠。

JSON 表示法
{
  "coupon": string
}
欄位
coupon

string

必填:套用至這項優惠的優待券代碼。

PurchaseOrderExtension

適用於採購產業的訂單延長期限。除非在委刊項中覆寫這些屬性,否則這些屬性適用於所有委刊項。

JSON 表示法
{
  "status": enum (PurchaseStatus),
  "userVisibleStatusLabel": string,
  "type": enum (PurchaseType),
  "returnsInfo": {
    object (PurchaseReturnsInfo)
  },
  "fulfillmentInfo": {
    object (PurchaseFulfillmentInfo)
  },
  "extension": {
    "@type": string,
    field1: ...,
    ...
  },
  "purchaseLocationType": enum (PurchaseLocationType),
  "errors": [
    {
      object (PurchaseError)
    }
  ]
}
欄位
status

enum (PurchaseStatus)

必要:訂單的整體狀態。

userVisibleStatusLabel

string

使用者顯示的狀態標籤/字串。長度上限為 50 個半形字元。

type

enum (PurchaseType)

必填:購買類型。

returnsInfo

object (PurchaseReturnsInfo)

訂單的退貨資訊。

fulfillmentInfo

object (PurchaseFulfillmentInfo)

訂單的出貨資訊。

extension

object

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

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

purchaseLocationType

enum (PurchaseLocationType)

購買位置 (店內 / 線上)

errors[]

object (PurchaseError)

選填:因為這筆訂單而遭到拒絕的錯誤。

PurchaseError

訂購單可遭拒的錯誤。

JSON 表示法
{
  "type": enum (ErrorType),
  "description": string,
  "entityId": string,
  "updatedPrice": {
    object (PriceAttribute)
  },
  "availableQuantity": integer
}
欄位
type

enum (ErrorType)

必填:這代表商家拒絕訂單的詳細原因。

description

string

其他錯誤說明。

entityId

string

與錯誤對應的實體 ID。範例可對應到 LineItemId / ItemOptionId。

updatedPrice

object (PriceAttribute)

與 PRICE_CHANGED / INCORRECT_PRICE 錯誤類型相關。

availableQuantity

integer

現貨數量。適用情況:AVAILABILITY_CHANGED。

TicketOrderExtension

訂購電影、體育等票券訂單內容。

JSON 表示法
{
  "ticketEvent": {
    object (TicketEvent)
  }
}
欄位
ticketEvent

object (TicketEvent)

事件會套用到所有委刊項票券。

TicketEvent

代表單一事件。

JSON 表示法
{
  "type": enum (Type),
  "name": string,
  "description": string,
  "url": string,
  "location": {
    object (Location)
  },
  "eventCharacters": [
    {
      object (EventCharacter)
    }
  ],
  "startDate": {
    object (Time)
  },
  "endDate": {
    object (Time)
  },
  "doorTime": {
    object (Time)
  }
}
欄位
type

enum (Type)

必要項目:票券活動的類型,例如電影、演唱會。

name

string

必填:活動名稱。舉例來說,如果事件是電影,則這是電影名稱。

description

string

活動的說明。

url

string

活動資訊的網址。

location

object (Location)

活動舉辦地點或機構所在地點。

eventCharacters[]

object (EventCharacter)

與這個事件相關的角色。例如電影活動的導演或演員,或演唱會的表演者等。

startDate

object (Time)

開始時間。

endDate

object (Time)

結束時間。

doorTime

object (Time)

進入時間,可能與活動開始時間不同,例如:活動將於上午 9 點開始,但進入時間是上午 8:30。

EventCharacter

一個活動角色,例如發起人、表演者等。

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

enum (Type)

事件角色類型,例如演員或導演。

name

string

字元名稱

image

object (Image)

角色的圖片。