Offer

LINT.IfChange(offer_definition) [START offer_definition] 下一个标记: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 美元。

minSpendValue

object (Money)

享受折扣所需的最低支出金额。例如,总价达到 100 美元或以上时,可享受 10% 的折扣。

bookingCost

object (Money)

预订相应优惠的费用。例如,预订餐位的费用为 15 美元,最终账单可减免 100 美元。

bookingCostUnit

enum (FeeUnit)

预订费用的单位。例如,按人、按交易。

convenienceFee

object (Fee)

bookingCostAdjustable

boolean

预订费用是否可调整,即预订费用是否可从最终账单中扣除。例如:预订晚餐可享七折优惠。预订费用为 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

相应优惠可与其他优惠叠加使用的优惠 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 下的有效期。必填。

该时长以秒为单位,最多包含九个小数位,以“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

除了合作伙伴的主要条款及条件之外的条款及条件。