Offer

LINT.IfChange(offer_definition) [START offer_definition] Next tag: 26

JSON 表示法
{
  "offerId": string,
  "entityIds": [
    string
  ],
  "addOnOfferApplicableToAllEntities": boolean,
  "offerSource": enum (OfferSource),
  "actionType": enum (ActionType),
  "offerModes": [
    enum (OfferMode)
  ],
  "offerCategory": enum (OfferCategory),
  "sourceAssignedPriority": integer,
  "offerDetails": {
    object (OfferDetails)
  },
  "offerRestrictions": {
    object (OfferRestrictions)
  },
  "coupon": {
    object (Coupon)
  },
  "paymentInstrument": {
    object (PaymentInstrument)
  },
  "subscription": {
    object (Subscription)
  },
  "terms": {
    object (Terms)
  },
  "validityPeriods": [
    {
      object (ValidityPeriod)
    }
  ],
  "offerUrl": string,
  "imageUrl": string,
  "tags": [
    enum (OfferTag)
  ],
  "brandId": string
}
欄位
offerId

string

優惠的專屬 ID。必填。

entityIds[]

string

參與這項優惠的商家清單。

addOnOfferApplicableToAllEntities

boolean

如果為 true,這項優惠適用於匯總器下的所有實體。僅適用於加購優惠。

offerSource

enum (OfferSource)

優惠可能由集結網站、個別商家提供,甚至由第三方以加購形式提供。必填。

actionType

enum (ActionType)

提供優惠的服務。一個 offerId 只能屬於一個 actionType。如果優惠可跨多種服務類型共用,則應為每種服務類型建立具有專屬 ID 的重複優惠。必填。

offerModes[]

enum (OfferMode)

提供優惠的方式,例如親自前往、預約、線上等。必填。

offerCategory

enum (OfferCategory)

優惠類別。必填。

sourceAssignedPriority

integer

非負整數 ([1-100],其中 1 代表最高優先順序),表示來源指派的方案優先順序。如果同一商家提供多項方案,這會成為方案排序的信號。0 代表未設定優先順序。

offerDetails

object (OfferDetails)

優惠詳細資料,例如折扣、預訂費用等。必填。

offerRestrictions

object (OfferRestrictions)

說明優惠限制,例如是否需要訂閱/付款方式、這項優惠是否可與其他優惠合併使用 (以及哪些類型) 等。必填。

coupon

object (Coupon)

優惠券詳細資料。如果 offerCategory 為 OFFER_CATEGORY_ADD_ON_COUPON_OFFER,則為必填欄位。

paymentInstrument

object (PaymentInstrument)

付款方式的詳細資料。如果 offerCategory 為 OFFER_CATEGORY_ADD_ON_PAYMENT_OFFER,則為必填欄位。

subscription

object (Subscription)

訂閱方案詳細資料。如果 offerCategory 為 OFFER_CATEGORY_ADD_ON_SUBSCRIPTION_OFFER,則為必填欄位。

terms

object (Terms)

優惠條款及細則。必填。

validityPeriods[]

object (ValidityPeriod)

優惠的有效期限。說明優惠的有效時間範圍,包括開始和結束時間、星期幾等。必要。

offerUrl

string

商家優惠頁面的網址。如果 offerCategory 為 OFFER_CATEGORY_BASE_OFFER,則為必填欄位。

imageUrl

string

商家優惠圖片的網址。

tags[]

enum (OfferTag)

與優惠相關的特殊標記。用於識別「節慶」、「評價最高」、「預訂次數最多」等特別優惠。

brandId

string

禮物卡交易必須提供這項資訊,才能識別提供交易的品牌。

OfferDetails

[START offer_details_definition] 下一個標記:15

JSON 表示法
{
  "offerDisplayText": string,
  "maxDiscountValue": {
    object (Money)
  },
  "minSpendValue": {
    object (Money)
  },
  "bookingCost": {
    object (Money)
  },
  "bookingCostUnit": enum (FeeUnit),
  "convenienceFee": {
    object (Fee)
  },
  "bookingCostAdjustable": boolean,
  "additionalFees": [
    {
      object (AdditionalFee)
    }
  ],
  "giftCardInfo": {
    object (GiftCardInfo)
  },

  // Union field offer_specification can be only one of the following:
  "discountPercent": number,
  "discountValue": {
    object (Money)
  },
  "otherOfferDetailText": string
  // End of list of possible types for union field offer_specification.
}
欄位
offerDisplayText

string

供應商希望在搜尋結果網頁上向消費者顯示的優惠文字。必填。

maxDiscountValue

object (Money)

可享有的最高折扣。例如:最高可享 $100 美元的 9 折優惠。

minSpendValue

object (Money)

享有折扣的最低消費金額。例如:總價滿 $100 美元可享 9 折優惠。

bookingCost

object (Money)

預訂這項優惠的費用。舉例來說,如果訂位費用為 $15 美元,最終帳單可折抵 $100 美元。

bookingCostUnit

enum (FeeUnit)

預訂費用的單位。例如每人每筆交易。

convenienceFee

object (Fee)

bookingCostAdjustable

boolean

預訂費用是否可調整,也就是從最終帳單中扣除預訂費用。例如:預訂晚餐可享 7 折優惠。預訂費用為 $15 美元,這筆費用會計入最終帳單。因此最終帳單為:總支出 - 30% - $15 美元

additionalFees[]

object (AdditionalFee)

向使用者收取的額外費用。例如:便利、處理、運送、包裝、服務費等。

giftCardInfo

object (GiftCardInfo)

禮物卡交易的專屬詳細資料。

聯集欄位 offer_specification。折扣可以是百分比,也可以是從總值扣除的固定值。例如:1. 最終帳單可享 9 折優惠。2. 訂單可享 $15 美元折扣。商家也可以透過相關規格欄位提供自訂折扣,例如「買一送一」。必填。offer_specification 只能是下列其中一項:
discountPercent

number

帳單折扣百分比。[0, 100] 如果買一送一或半價優惠適用於整餐 (例如買一送一自助餐、買一送一整筆帳單、買一送一套餐),這個值可以設為 50。

discountValue

object (Money)

折扣的固定值。

otherOfferDetailText

string

你可以自由輸入文字,說明折扣。如果是特定買一送一優惠 (例如買一送一飲料、加購主餐、買一送一指定菜單項目),請在此處說明這些詳細資料。

OfferRestrictions

[START offer_restrictions_definition] 下一個標記:11

JSON 表示法
{
  "combinableWithOtherOffers": boolean,
  "combinableOfferCategories": [
    enum (OfferCategory)
  ],
  "combinableOfferIds": [
    string
  ],
  "inclusions": [
    {
      object (OfferCondition)
    }
  ],
  "exclusions": [
    {
      object (OfferCondition)
    }
  ],
  "minGuest": integer,
  "foodOfferRestrictions": {
    object (FoodOfferRestrictions)
  },
  "specialConditions": [
    string
  ]
}
欄位
combinableWithOtherOffers

boolean

這項優惠是否可與其他優惠併用。如果設為 true,合作夥伴可以指定此優惠可與哪些優惠合併使用。如果同時設定 combinableOfferCategories 和 combinableOfferIds,只要符合上述任一條件,即可合併優惠。

combinableOfferCategories[]

enum (OfferCategory)

這項優惠可與哪些類型的優惠合併使用。舉例來說,這項優惠可能可與其他優待券併用。如果 combinableWithOtherOffers 為 true,且這個欄位未設定,則所有類型皆可合併。

combinableOfferIds[]

string

這項優惠可與哪些 offer_id 合用。部分優惠可能只能與特定其他 offer_id (可視為父項優惠) 併用。如果 combinableWithOtherOffers 為 true,且這個欄位未設定,則所有方案 ID 皆可合併。

inclusions[]

object (OfferCondition)

優惠生效的條件清單 (例如無酒精飲料、食物)。

exclusions[]

object (OfferCondition)

會使優惠失效的條件清單 (例如自助餐、套餐優惠和雞尾酒)。

minGuest

integer

使用優惠的人數下限。

foodOfferRestrictions

object (FoodOfferRestrictions)

餐飲優惠的專屬限制。

specialConditions[]

string

必須向使用者顯示的這項優惠特殊條件。例如:「僅適用於在 [區域] 付款」、「不適用於線上付款」

OfferCondition

[START offer_condition_definition]

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

string

PaymentInstrument

[START payment_instrument_definition]

JSON 表示法
{
  "items": [
    {
      object (PaymentInstrumentItem)
    }
  ],
  "providerName": string
}
欄位
items[]

object (PaymentInstrumentItem)

可用於兌換優惠的付款方式清單。必填。

providerName

string

付款方式供應商名稱。可以是銀行合作夥伴、銀行名稱等。例如:American Express、HDFC、ICICI。

PaymentInstrumentItem

[START payment_instrument_item_definition]

JSON 表示法
{
  "type": enum (PaymentInstrumentType),
  "name": string
}
欄位
type

enum (PaymentInstrumentType)

付款方式類型。必填。

name

string

付款方式項目的名稱,例如信用卡名稱。例如:HDFC Infinia、American Express Platinum。必填。

訂閱

[START subscription_definition]

JSON 表示法
{
  "name": string,
  "subscriptionAutoAdded": boolean,
  "cost": {
    object (Money)
  },
  "subscriptionDuration": string,
  "termsAndConditionsUrl": string
}
欄位
name

string

訂閱方案名稱。必填。

subscriptionAutoAdded

boolean

使用者兌換這項優惠時,系統是否會自動新增訂閱項目

cost

object (Money)

訂閱費用。必填。

subscriptionDuration

string (Duration format)

訂閱方案在 subscription_cost 的效期。必填。

時間長度以秒為單位,最多可有 9 個小數位數,並應以「s」結尾,例如:"3.5s"

termsAndConditionsUrl

string

合作夥伴條款及細則的網址,與這項訂閱方案相關。

條款

[START terms_definition]

JSON 表示法
{
  "url": string,
  "restrictedToCertainUsers": boolean,
  "termsAndConditions": string,
  "additionalTermsAndConditions": [
    string
  ]
}
欄位
url

string

合作夥伴條款及細則的網址。

restrictedToCertainUsers

boolean

優惠是否僅限特定使用者。

termsAndConditions

string

合作夥伴提供的主要條款及細則文字。

additionalTermsAndConditions[]

string

除了合作夥伴的主要條款及細則外,還須遵守其他條款及細則。