产品 Feed

商品 Feed 是您向 Google 提供要在各个 Google 平台上展示的推荐活动商品列表的主要方式。

ProductFeed 对象由单个 FeedMetadata 对象以及零个或零个以上的 Product 对象组成。如果未在所有分片中都提供 Product,则所有产品都将被删除。

ProductFeed

Proto

message ProductFeed {
  // Metadata for this feed.
  // Required.
  FeedMetadata feed_metadata = 1;

  // List of the products.
  // Optional. When unset in all shards, all products will be deleted.
  repeated Product products = 2;
}

实现说明

类型 字段 备注
FeedMetadata feed_metadata 必填。
此 Feed 的元数据。
重复
商品
产品 可选。
如果未在所有分片中取消设置,所有产品都会被删除。当移除大量商品时,可能需要设置 feed_metadata/max_removal_share

示例

// Example 1: Basic structure
{
  "feed_metadata": {
    ...
  },
  "products": [
    ...
  ]
}

// Example 2: Wipe all products
{
  "feed_metadata": {
    "shard_id": 0,
    "total_shards_count": 1,
    "processing_instruction": "PROCESS_AS_SNAPSHOT",
    "nonce": 202113041501,
    "max_removal_share": 1.0
  },
  "products": []
}

FeedMetadata

Proto

message FeedMetadata {
  // The current shard ID, zero-based. Shards do not need to be transferred in
  // order. Processing will start only after a full set of shards was uploaded.
  // Required when total_shards_count > 1.
  uint32 shard_id = 1;

  // Total number of shards in this transfer.
  // Required. Must be >= 1.
  uint32 total_shards_count = 2;

  // An arbitrary number used to link multiple shards to the same transfer.
  // Required when total_shards_count > 1.
  // Must be the same for all shards within the transfer.
  uint64 nonce = 3;

  enum ProcessingInstruction {
    // For compatibility, don't use.
    PROCESS_AS_UNSPECIFIED = 0;

    // This Feed upload should be processed as a complete snapshot replacing any
    // previously uploaded data of this type.
    // Supported feed types: product.
    PROCESS_AS_SNAPSHOT = 1;

    // This Feed upload should be processed as an upsert, updating or adding
    // data to the previous uploads. Supported feed types: reviews,
    // availability.
    PROCESS_AS_UPSERT = 2;
  }
  // Processing instruction for this upload.
  // Required.
  ProcessingInstruction processing_instruction = 4;

  // Maximal share of currently active products that are allowed to be removed
  // by an upload. If more products will be removed by this transfer, the whole
  // transfer will be rejected.
  // This is a safeguard against unintentional take down of a significant part
  // of the inventory. Can be set to 1.0 to allow complete inventory take down.
  // Optional.
  double max_removal_share = 5;
}

实现说明

类型 字段 备注
uint32 shard_id total_shards_count > 1 时,是必需的。
从零开始。 分片不需要按顺序转移。只有在上传整套分片后,系统才会开始处理。
uint32 total_shards_count 必需,必须大于等于 1。
uint64 nonce total_shards_count > 1 时,是必需的。
转移内的所有分片必须相同。
枚举 processing_instruction 必需。
PROCESS_AS_SNAPSHOT 是唯一支持的值。
双精度 max_removal_share 可选。
允许通过上传操作移除的有效商品的最大份额。如果此转移移除了更多产品,则整个转移将被拒绝。这是防止大量意外移除商品目录的保护措施。可设置为 1.0 以允许移除整个广告资源。

示例

// Example 1: metadata single JSON file
{
    "shard_id": 0,
    "total_shards_count": 1,
    "processing_instruction": "PROCESS_AS_SNAPSHOT",
    "nonce": 202113041501
}

// Example 2a: two JSON files (1st file)
{
    "shard_id": 0,
    "total_shards_count": 2,
    "processing_instruction": "PROCESS_AS_SNAPSHOT",
    "nonce": 202213041502
}

// Example 2b: two JSON files (2nd file)
{
    "shard_id": 1,
    "total_shards_count": 2,
    "processing_instruction": "PROCESS_AS_SNAPSHOT",
    "nonce": 202213041502
}

Product

Proto

message Product {
  // An opaque string from the partner which uniquely identifies the product.
  // Allowed characters are alphanumeric, _, and -. Max length: 255.
  // Required.
  string id = 1;

  // The title of the product in plain text, e.g. "Horseback riding on the
  // moon". See definition of "LocalizedTextSet" message for the details on the
  // localization.
  // Recommended to not exceed length of 50 in any language. Max length: 150.
  // Required.
  LocalizedTextSet title = 2;

  // The description of the product. Limited formatting options are allowed in
  // the HTML format. Supported tags:
  //   * h1-h5
  //   * ul, ol, li
  //   * strong, italic, em
  //   * p, br
  // Other tags are not supported and will be removed. CSS, tables, style
  // property, `a` links are not supported. Images are not allowed, use the
  // related_media field instead.
  // Important notes:
  //   * Try not to use other tags except for the supported ones mentioned
  //     above, because the contents within unsupported tags will be stripped,
  //     and may lead to an undesirable user experience.
  //   * Try avoid deep nested structures like more than 3 different heading
  //     levels or nested lists. Keeping the structure flat, simple, and
  //     straightforward, helps to create a better user experience.
  //   * Do not duplicate info from the product_features field below in the
  //     description as both would normally be shown side by side.
  // Recommended to not exceed length of 10000 in any language. Max length:
  // 16000.
  // Recommended.
  LocalizedTextSet description = 3;

  // Structured details about the product features.
  // Max number of features: 100.
  // Recommended.
  repeated TextFeature product_features = 4;

  // Aggregated product rating.
  // Recommended.
  Rating rating = 5;

  // Related media such as photos or videos.
  // Max number of media: 30.
  // Recommended.
  repeated Media related_media = 6;

  // Whether Google should make use of the order in which related media are
  // listed in the feed or not. The media order would be used to influence
  // the final image order for the product in the UI.
  // Optional, default is false.
  bool use_media_order = 13;

  // Options available for this product.
  // Max number of options: 20.
  // At least one is required.
  repeated Option options = 7;

  // Operator details.
  // Optional.
  Operator operator = 8;

  // Inventory type of this product.
  enum InventoryType {
    // Default inventory type.
    INVENTORY_TYPE_DEFAULT = 0;
    // Product is an official ticket to a point of interest. To learn what
    // qualifies as official inventory, refer to the policy doc.
    INVENTORY_TYPE_OFFICIAL = 1;
    // Product is coming directly from the operator or their official
    // Connectivity Provider / ResTech.
    INVENTORY_TYPE_OPERATOR_DIRECT = 2;
  }
  // Optional.
  InventoryType inventory_type = 9;

  // Should contain only distinct values of InventoryType.
  // Max number of inventory types: 2.
  // Optional.
  repeated InventoryType inventory_types = 12;

  // Confirmation type of this product.
  enum ConfirmationType {
    // Type of confirmation is unknown.
    CONFIRMATION_TYPE_UNKNOWN = 0;
    // Booking is confirmed to the end user immediately.
    CONFIRMATION_TYPE_INSTANT = 1;
    // Booking is confirmed to the end user within 24 hours.
    CONFIRMATION_TYPE_24HRS = 2;
    // Booking is confirmed to the end user within 48 hours.
    CONFIRMATION_TYPE_48HRS = 3;
  }
  // Optional.
  ConfirmationType confirmation_type = 10;

  // Possible fulfillment types -- ways to obtain a document to confirm the
  // booking. Combinations are possible, e.g. mobile + printed, or
  // printed at home + in-person pickup is available.
  // At least one field must be true.
  message FulfillmentType {
    // Confirmation on a mobile phone, e.g. with a QR code.
    bool mobile = 1;
    // Printable confirmation.
    bool print_at_home = 2;
    // Admission documents to be picked up in person.
    bool pickup = 3;
  }
  // Recommended.
  FulfillmentType fulfillment_type = 11;

  // Provider brand name.
  // Recommended to not exceed length of 50 in any language.
  // Max length: 100.
  // Optional.
  LocalizedTextSet brand_name = 14;
}

实现说明

类型 字段 备注
字符串 id 必需,长度上限为 255 个字符。
:用于标识商品的唯一字符串。允许使用的字符包括字母数字字符、_ 和 -。
LocalizedTextSet title 必需,建议长度不超过 50 个字符,长度上限为 150 个字符。
如需了解详情,请参阅标题和说明指南
LocalizedTextSet 说明 建议,建议长度 <= 10000,最大长度为 16000 个字符。
如需了解详情,请参阅标题和说明指南
重复
TextFeature
product_features 推荐,特征数量上限:100。
评分 评分 推荐。
强烈建议提供评分,因为显示评分的商品可以提高点击率。
重复
媒体
related_media 推荐,媒体数量上限:30
强烈建议提供多张图片。有关图片的详细指南,请参阅图片准则
boolean use_media_order 可选
提示 Google,在选择要显示的图片时,应考虑相关媒体在 Feed 中的排列顺序。
重复
选项
选项 必需,选项数量上限:20
每件商品必须至少包含一个商品选项。
运算符 运算符 可选。
枚举 已弃用
inventory_type
可选。
只能在链接到地图注点官方门票网站的产品中设置 INVENTORY_TYPE_OFFICIAL。只有在资格审核之后,才能设置此值。
此字段已废弃,取而代之的是新的重复字段 inventory_types。
重复 inventory_types 可选。
此商品所属的唯一广告资源类型的重复列表。
只能在链接到地图注点官方门票网站的产品中设置 INVENTORY_TYPE_OFFICIAL。只有在资格审核之后,才能设置此值。
只能在链接到旅行社网站的产品中设置 INVENTORY_TYPE_OPERATOR_DIRECT。 只有在资格审核之后,才能设置此值。
枚举 confirmation_type 可选。
FulfillmentType fulfillment_type 推荐。如果设置了此字段,则 fulfillment_rype 中必须至少有一个字段为 true。
设置获取文档以确认预订的方式。您可以结合多种方式,例如“手机 + 打印”或“在家打印 + 到店取货”。
LocalizedTextSet brand_name 长度上限为 100。
商品应显示的品牌名称,取代了现已废弃的“运算符/名称”。两个值中只能设置一个。

示例

{
  "id": "product-1",
  "title": {
      "localized_texts": [
          {
              "language_code": "en",
              "text": "Dans bike tour"
          },
          {
              "language_code": "es",
              "text": "Tour en bicicleta por Dans"
          },
          {
              "language_code": "zh-HK",
              "text": "丹斯自行車之旅"
          }
      ]
  },
  "description": {
    "localized_texts": [
        {
            "language_code": "en",
            "text": "<p>A very fun bike tour<p>"
        },
        {
            "language_code": "es",
            "text": "<p>Un recorrido en bicicleta muy divertido.</p>"
        },
        {
            "language_code": "zh-HK",
            "text": "<p>一個非常有趣的自行車之旅.</p>"
        }
    ]
  },
  "brand_name": {
      "localized_texts": [
          {
              "language_code": "en",
              "text": "Dans Bikes"
          }
      ]
  },
  "rating": {
      "average_value": 4.6,
      "rating_count": 192
  },
  "product_features": [{
    "feature_type": "TEXT_FEATURE_INCLUSION",
    "value": {
        "localized_texts": [
            {
                "language_code": "en",
                "text": "<p>A very fun bike tour<p>"
            },
          {
              "language_code": "es",
              "text": "<p>Un recorrido en bicicleta muy divertido.</p>"
          },
          {
              "language_code": "zh-HK",
              "text": "<p>一個非常有趣的自行車之旅.</p>"
          }
      ]
    }
  },{
    "feature_type": "TEXT_FEATURE_HIGHLIGHT",
    "value": {
        "localized_texts": [
            {
                "language_code": "en",
                "text": "<p>A very fun bike tour<p>"
              },
              {
                  "language_code": "es",
                  "text": "<p>Un recorrido en bicicleta muy divertido.</p>"
              },
              {
                  "language_code": "zh-HK",
                  "text": "<p>一個非常有趣的自行車之旅.</p>"
              }
          ]
      }
  },{
    "feature_type": "TEXT_FEATURE_MUST_KNOW",
    "value": {
        "localized_texts": [
            {
                "language_code": "en",
                "text": "<p>A very fun bike tour<p>"
            },
            {
                "language_code": "es",
                "text": "<p>Un recorrido en bicicleta muy divertido.</p>"
            },
            {
                "language_code": "zh-HK",
                "text": "<p>一個非常有趣的自行車之旅.</p>"
            }
        ]
      }
  }],
  "options": [{
    "id": "option-1",
    "title": {
        "localized_texts": [
            {
                "language_code": "en",
                "text": "Sunset tour"
            },
            {
                "language_code": "es",
                "text": "Tour al atardecer"
            },
            {
                "language_code": "zh-HK",
                "text": "日落之旅"
            }
        ]
    },
    "landing_page": {
        "url": "https://www.danstour.com/sunset?source={src}&language={lang}&currency={currency}"
    },
    "cancellation_policy": {
        "refund_conditions": [
            {
                "min_duration_before_start_time_sec": 86400,
                "refund_percent": 100
            }
        ]
    },
    "option_categories": [
        {
            "label": "sports"
        },
        {
            "label": "bike-tours"
        }
    ],
    "related_locations": [
        {
            "location": {
                "location": {
                    "place_id": "ChIJ3S-JXmauEmsRUcIaWtf4MzE"
                }
            },
            "relation_type": "RELATION_TYPE_RELATED_NO_ADMISSION"
        },
        {
            "location": {
                "location": {
                    "lat_lng": {
                        "latitude": 53.339688,
                        "longitude": 6.236688
                    }
                }
            },
            "relation_type": "RELATION_TYPE_RELATED_NO_ADMISSION"
        }
    ],
    "price_options": [
        {
            "id": "option-1-adult",
            "title": "Adult (14+)",
            "price": {
                "currency_code": "EUR",
                "units": 20
            },
            "fees_and_taxes": {
                "per_ticket_fee": {
                    "currency_code": "EUR",
                    "units": 1
                },
                "per_ticket_tax": {
                    "currency_code": "EUR",
                    "units": 1
                }
            }
        }
    ]},{
      "id": "option-2",
      "title": {
          "localized_texts": [
              {
                  "language_code": "en",
                  "text": "Sunrise tour"
              },
              {
                  "language_code": "es",
                  "text": "Tour al amanecer"
              },
              {
                  "language_code": "zh-HK",
                  "text": "日出之旅"
              }
          ]
      },
      "landing_page": {
          "url": "https://www.danstour.com/sunrise?source={src}&language={lang}&currency={currency}"
      },
      "cancellation_policy": {
          "refund_conditions": [
              {
                  "min_duration_before_start_time_sec": 86400,
                  "refund_percent": 100
              }
          ]
      },
      "option_categories": [
          {
              "label": "sports"
          },
          {
              "label": "bike-tours"
          }
      ],
      "related_locations": [
          {
              "location": {
                  "location": {
                      "place_id": "ChIJ3S-JXmauEmsRUcIaWtf4MzE"
                  }
              },
              "relation_type": "RELATION_TYPE_RELATED_NO_ADMISSION"
          }
      ],
      "price_options": [
          {
              "id": "option-2-adult",
              "title": "Adult (14+)",
              "price": {
                  "currency_code": "EUR",
                  "units": 20,
                  "nanos": 0
              }
          }
      ],
      "meeting_point": {
          "location": {
              "place_id": "ChIJ3S-JXmauEmsRUcIaWtf4MzE"
          },
          "description": {
              "localized_texts": [
                  {
                      "language_code": "en",
                      "text": "Sunrise tour"
                  },
                  {
                      "language_code": "es",
                      "text": "Tour al amanecer"
                  },
                  {
                      "language_code": "zh-HK",
                      "text": "日出之旅"
                  }
              ]
          }
      }
    }
  ],
  "related_media": [
      {
          "url": "http://www.danstour.com/photo1.jpg",
          "type": "MEDIA_TYPE_PHOTO"
      },
      {
          "url": "http://www.danstour.com/photo2.jpg",
          "type": "MEDIA_TYPE_PHOTO",
          "attribution": {
              "localized_texts": [
                  {
                      "language_code": "en",
                      "text": "Dans Photos"
                  }
              ]
          }
      }
  ],
  "operator": {
      "name": {
          "localized_texts": [
              {
                  "language_code": "en",
                  "text": "Dans Bikes"
              }
          ]
      },
      "phone_number": "01234567",
      "locations": [{
          "location": {
              "place_id": "ChIJ3S-JXmauEmsRUcIaWtf4MzE"
          }
        }]
  },
  "inventory_types": ["INVENTORY_TYPE_OPERATOR_DIRECT"]
}

选项

Proto

message Option {
  // Option ID. Must be unique within a product.
  // Required.
  string id = 1;

  // The title of the option in plain text, e.g. "Sunset tour".
  //
  // If there is only a single option, the option title may be the same as the
  // product title. If multiple product options are presented, the title must be
  // unique to the option.
  // Recommended to not exceed length of 50 in any language.
  // Max length: 150.
  // Required.
  LocalizedTextSet title = 2;

  // The description of the option. Limited formatting options are allowed in
  // the HTML format, see product description field for more details.
  // Recommended to not exceed length of 10000 in any language.
  // Max length: 16000.
  // Recommended.
  LocalizedTextSet description = 3;

  // Landing page URL for this option. The page should include a button to start
  // the booking/checkout flow.
  // Required.
  DeepLink landing_page = 5;

  // Link to a list view at a higher level of available tickets and tours,
  // prominently showing this option possibly among other options.
  // Recommended.
  DeepLink landing_page_list_view = 6;

  // Additional structured details about the option features. Should not
  // duplicate the details from the product level.
  // Max number of features: 100.
  // Optional.
  repeated TextFeature option_features = 7;

  // Cancellation policy for this option.
  // Recommended.
  CancellationPolicy cancellation_policy = 8;

  // Relevant categories for this Option. Refer to the documentation for valid
  // and mutually exclusive values.
  // Max number of categories: 100.
  // Optional.
  repeated Category option_categories = 9;

  // List of locations related to this option.
  // Max number of locations: 100.
  // Recommended.
  repeated RelatedLocation related_locations = 10;

  // If true, the option is a *typical ticket* that a user would expect to buy
  // to participate in the experience, whether it's an attraction admission or
  // a slot in a tour.
  // Optional, default is false.
  bool base_ticket = 11;

  // All possible prices for this option.
  // Note: With Feed Spec v1 only single Adult price is supported. If multiple
  // price options were provided, the lowest price, possibly with notion
  // "from ..." would be displayed.
  // At least one is required.
  repeated PriceOption price_options = 12;

  // Duration of the option in seconds, where applicable, e.g. for guided tours,
  // boat trips etc. This should reflect the duration of experience (not
  // validity time).
  // Optional.
  uint32 duration_sec = 16;

  // Languages of the option. Only where relevant -- when it's important for
  // the end user to understand and/or read in the language to enjoy the
  // experience. E.g. relevant for a guided tour, but not for a mini-golf pass.
  // Max number of languages: 100.
  // Recommended.
  repeated Language languages = 14;

  // Meeting point -- the start location. Only add where relevant and
  // beneficial, e.g. the place where participant will meet the tour guide to
  // start a walking tour, the place where participant will be picked up for a
  // city tour, the dock where a cruise trip will start.
  // Optional.
  Location meeting_point = 15;
}

实现说明

类型 字段 备注
字符串 id 必填。
选项 ID。在产品中必须是唯一的。
LocalizedTextSet title 必需,建议长度:50 个字符,长度上限:150 个字符。
如果只有一个选项,选项标题可以与商品名相同。如果提供了多个商品选项,则各选项的标题必须唯一。 如需了解详情,请参阅标题和说明指南
LocalizedTextSet 说明 推荐,推荐长度:10000,最大长度:16000。
如需了解详情,请参阅标题和说明指南
DeepLink landing_page 必填。
必须包含用于预订商品的按钮或链接。 如需了解详情,请参阅着陆页指南
DeepLink landing_page_list_view 推荐。
链接到更高层级的可用门票和游览项目的列表视图,可能会在其他选项中突出显示此选项。 如需了解详情,请参阅着陆页指南
重复
TextFeature
option_features 可选,地图项数量上限:100。
不应从商品级别复制详情。
CancellationPolicy cancellation_policy 推荐。
重复
类别
option_categories 可选,类别数量上限:100。
此选项的相关类别。尤其重要的是,请确保为所有非基于导览的活动设置 self-guided,并为基于导览的活动设置 guided-tour。 如需了解其他建议的值,请参阅商品类别文档。
重复
RelatedLocationRelatedLocation
related_location 建议,地点数量上限:100。
提供准确的相关营业地点列表对于商品在最相关的地点展示极为重要,但过度标记或提供准确的数据会导致商品被移除。如需了解详情,请参阅位置和地图注点指南。
bool base_ticket 可选。
用于指明相应商品选项是否为基本门票。
重复
PriceOption
price_options 必需,最少 1 个。
此选项的所有可能的价格。 注意:仅支持成人价格。如果提供了多个价格选项,系统将使用第一个通过地域限制检查的价格。对于团体票,必须改用整个团体的全价。
uint32 duration_sec 可选。
选项的时长(以秒为单位),适用于导览、乘船游览等。这应反映体验的时长(而非有效期)。
重复
语言
languages 建议,最多 100 种语言。
提供此选项的语言。当最终用户必须理解相应语言并/或用它来阅读时,才能享受到身临其境的体验。例如,与导览相关。
位置信息 meeting_point 可选。
仅添加相关且有益的地方,例如,参与者与导游会面开始步行游览的地点、接驾参与者进行城市游览的地点、游轮行程开始的码头。

示例

{
  "id": "option-1",
  "title": {
    "localized_texts": [
    {
            "language_code": "en",
            "text": "Sunset tour"
        },
        {
            "language_code": "es",
            "text": "Tour al atardecer"
        },
        {
            "language_code": "zh-HK",
            "text": "日落之旅"
        }
    ]
  },
  "landing_page": {
      "url": "https://www.danstour.com/sunset?source={src}&language={lang}&currency={currency}"
  },
  "cancellation_policy": {
      "refund_conditions": [
          {
              "min_duration_before_start_time_sec": 86400,
              "refund_percent": 100
          }
      ]
  },
  "option_categories": [
      {
          "label": "sports"
      },
      {
          "label": "bike-tours"
      }
  ],
  "related_locations": [
      {
          "location": {
              "location": {
                  "place_id": "ChIJ3S-JXmauEmsRUcIaWtf4MzE"
              }
          },
          "relation_type": "RELATION_TYPE_RELATED_NO_ADMISSION"
      },
      {
          "location": {
              "location": {
                  "lat_lng": {
                      "latitude": 53.339688,
                      "longitude": 6.236688
                  }
              }
          },
          "relation_type": "RELATION_TYPE_RELATED_NO_ADMISSION"
      }
  ],
  "price_options": [
      {
          "id": "option-1-adult",
          "title": "Adult (14+)",
          "price": {
              "currency_code": "EUR",
              "units": 20
          },
          "fees_and_taxes": {
              "per_ticket_fee": {
                  "currency_code": "EUR",
                  "units": 1
              },
              "per_ticket_tax": {
                  "currency_code": "EUR",
                  "units": 1
              }
          }
      }
  ]
}

TextFeature

Proto

message TextFeature {
  enum TextFeatureType {
    // Don't use, for backwards compatibility only.
    TEXT_FEATURE_UNKNOWN = 0;
    // Feature is an inclusion.
    TEXT_FEATURE_INCLUSION = 1;
    // Feature is an exclusion.
    TEXT_FEATURE_EXCLUSION = 2;
    // Feature is a highlight.
    TEXT_FEATURE_HIGHLIGHT = 3;
    // Feature is a "must know".
    TEXT_FEATURE_MUST_KNOW = 4;
    // Feature represents information about safety measures.
    TEXT_FEATURE_SAFETY_INFORMATION = 5;
  }
  // Feature type.
  // Required.
  TextFeatureType feature_type = 1;

  // LocalizedTextSet content of the feature. Values support both plain-text
  // and HTML-like text for basic formatting. Supported HTML formatting tags:
  //
  // Phrase tags: <br>, <strong>, <em>, <i>:
  //   Only the four tags mentioned above are supported. <br> can be used to
  //   break lines in paragraphs, and <strong>/<em>/<i> can be used to highlight
  //   important text. Any other phrase tags will be ignored.
  //
  // All other tags and custom styles are not allowed and will be removed. Any
  // URLs, anchors, and links will be stripped, and will never be displayed to
  // end-users.
  // Recommended to not exceed length of 1000 in any language. Max length: 2000.
  // Required.
  LocalizedTextSet value = 2;
}

实现说明

类型 字段 备注
枚举 feature_type 必填。
特征类型,可能的值:
  • TEXT_FEATURE_INCLUSION:地图项是包含项。
  • TEXT_FEATURE_EXCLUSION:地图项属于例外情况。
  • TEXT_FEATURE_HIGHLIGHT:功能是亮点。
  • TEXT_FEATURE_MUST_KNOW:功能是“须知事项”。
  • TEXT_FEATURE_SAFETY_INFORMATION:功能表示安全措施的相关信息。
  • LocalizedTextSet 必需,建议长度 <= 1000 个字符,长度上限为 2000 个字符。
    支持的 HTML 格式标记:br、strong、em、i
    仅支持上述 4 种标记。br 可用于对段落中的行进行换行,strong/em/i 可用于突出显示重要文本。所有其他词组标记都将被忽略。
    不允许使用所有其他标记和自定义样式,并将被移除。任何网址、锚点和链接都将被删除,并且永远不会向最终用户显示。

    示例

    {
        "feature_type": "TEXT_FEATURE_HIGHLIGHT",
        "value": {
            "localized_texts": [
                {
                    "language_code": "en",
                    "text": "<p>A very fun bike tour<p>"
                },
                {
                    "language_code": "es",
                    "text": "<p>Un recorrido en bicicleta muy divertido.</p>"
                },
                {
                    "language_code": "zh-HK",
                    "text": "<p>一個非常有趣的自行車之旅.</p>"
                }
            ]
        }
    }
    

    分级

    Proto

    message Rating {
      // Average rating value.
      // The value must be in the range of [1, 5] and can be omitted if and only if
      // the rating_count is zero.
      double average_value = 1;
    
      // Number of ratings used in calculating the value.
      // Required.
      uint64 rating_count = 2;
    }
    

    实现说明

    类型 字段 备注
    双精度 average_value 可选。
    平均评分值。该值必须在 [1, 5] 的范围内,并且当且仅当 rating_count 为零时才能省略。
    uint64 rating_count 必填。
    计算中使用的评分数量。

    示例

    // Example 1
    {
        "average_value": 4.6,
        "rating_count": 192
    }
    
    // Example 2: No ratings data
    {
        "rating_count": 0
    }
    

    媒体

    Proto

      message Media {
      // URL of this media source. Google will crawl the media hosted at this URL.
      // Max length: 2000.
      // Required.
      string url = 1;
    
      enum MediaType {
        // Don't use, for backwards compatibility only.
        MEDIA_TYPE_UNSPECIFIED = 0;
        // Indicates the media provided by the url is a photo.
        MEDIA_TYPE_PHOTO = 1;
      }
      // Type of this media source.
      // Required.
      MediaType type = 2;
    
      // Attribution information about the source of the media. Note that if
      // the attribution is required to display with the media to give credit to
      // photographer or agency, this field must be set.
      // Recommended to not exceed length of 1000 in any language.
      // Max length: 2000.
      // Optional.
      LocalizedTextSet attribution = 3;
    }
    

    实现说明

    类型 字段 备注
    字符串 网址 必需,长度上限为 2000。
    此媒体来源的网址。Google 会抓取托管在此网址上的媒体。
    枚举 类型 必需。
    此媒体来源的类型。可能的值:
  • MEDIA_TYPE_PHOTO:表示网址提供的媒体是照片。
  • LocalizedTextSet attribution 可选,建议长度:1000 个字符,长度上限为 2000 个字符。
    有关媒体来源的归因信息。请注意,如果提供方信息必须随媒体一起显示,以注明摄影师或代理机构,则必须设置此字段。

    示例

    {
        "url": "http://www.danstour.com/photo2.jpg",
        "type": "MEDIA_TYPE_PHOTO",
        "attribution": {
            "localized_texts": [
                {
                    "language_code": "en",
                    "text": "Dans Photos"
                }
            ]
        }
    }
    

    类别定义

    Proto

    message Category {
      // Refer to the documentation for the valid values list.
      // Required.
      string label = 1;
    }
    

    实现说明

    类型 字段 备注
    字符串 标签 必填。如需查看有效值列表,请参阅商品类别文档

    示例

    {
        "label": "sports"
    }
    

    RelatedLocation

    Proto

    // Defines relation between an option and a location.
    message RelatedLocation {
      // Location related to an option. Can be a POI (e.g. Eiffel tower),
      // neighbourhood (e.g. Old Town) or an address / arbitrary map point.
      // Required.
      Location location = 1;
    
      enum RelationType {
        // Location is related but relation does not allow admission or admission is
        // irrelevant, e.g. location is a square highlighted in a city tour.
        RELATION_TYPE_RELATED_NO_ADMISSION = 0;
        // Relation grants admission to this related location.
        RELATION_TYPE_ADMISSION_TICKET = 1;
        // Relation declares an additional service which doesn't get the user into
        // the related location, e.g. a parking ticket, a temporary exhibition, etc.
        RELATION_TYPE_SUPPLEMENTARY_ADDON = 2;
      }
      // Relation type of an option for the given location.
      // Required.
      RelationType relation_type = 2;
    }
    

    实现说明

    定义选项与位置之间的关系。

    类型 字段 备注
    位置信息 位置 必填。
    与选项相关的位置。可以是地图注点(例如埃菲尔铁塔)、街区(例如老城区)或地址 / 任意地图上的点。
    枚举 relation_type 必需。
    指定营业地点的选项的关系类型。可能的值:
  • RELATION_TYPE_RELATED_NO_ADMISSION:位置相关,但关系不允许入场或门票无关紧要,例如位置是城市观光中突出显示的一个广场。
  • RELATION_TYPE_ADMISSION_TICKET:关系授予进入此相关地点的门票。
  • RELATION_TYPE_SUPPLEMENTARY_ADDON:关系声明不会将用户引导至相关地点的附加服务,例如停车票、临时展览等。
  • 示例

    // Example of place id POI with no admissions
    {
        "location": {
            "location": {
                "place_id": "ChIJ3S-JXmauEmsRUcIaWtf4MzE"
            }
        },
        "relation_type": "RELATION_TYPE_RELATED_NO_ADMISSION"
    }
    
    // Example of Address POI with admissions
    {
        "location": {
            "location": {
                "address": "Madame Tussauds Berlin, Unter den Linden 74, 10117 Berlin, Germany"
            }
        },
        "relation_type": "RELATION_TYPE_ADMISSION_TICKET"
    }
    
    

    Proto

    // Deep link definition. Can include value parameters that will be expanded on
    // serve time.
    message DeepLink {
      // Landing page URL template for desktop. If both `url` and `localized_url`
      // are provided, the former is used as a fallback in case
      // no URL matches the user’s locale.
      // Max length: 2000.
      // Either `url` or `localized_url` is required.
      string url = 1;
    
      // Landing page URL template for mobile. If omitted, it defaults to the `url`
      // value.
      // Max length: 2000.
      // Optional.
      string mobile_url = 2;
    
      // Localized landing page URL template for desktop. If both `url` and
      // `localized_url` are provided, the former is used as a fallback in case
      // no URL matches the user’s locale.
      // Max length: 2000.
      // Max number of locales: 50.
      // Either `url` or `localized_url` is required.
      LocalizedTextSet localized_url = 3;
    
      // Localized landing page URL template for mobile.
      // Max length: 2000.
      // Max number of locales: 50.
      // Optional.
      LocalizedTextSet localized_mobile_url = 4;
    }
    

    实现说明

    深层链接定义。可包含将在投放广告时扩展的值参数。

    类型 字段 备注
    字符串 网址 可选,长度上限:2000。
    桌面版着陆页网址模板。必须提供 `url` 或 `localized_url`。
    字符串 mobile_url 可选,长度上限:2000。
    移动版着陆页网址模板。
    LocalizedTextSet localized_url 可选,长度上限:2000,本地人最多 50 个。
    适用于桌面设备的本地化着陆页网址模板。如果同时提供了 urllocalized_url,则前者会在没有任何网址与用户语言区域匹配的情况下用作后备方案。如果 url 不可用,且未提供语言,系统会使用英语网址。
    LocalizedTextSet localized_mobile_url 可选,长度上限为 2000 个,本地用户数量上限为 50 个。
    针对移动设备的本地化 mobile_landing page 网址模板。

    示例

    // Example 1: single landing page url.
    {
      "url": "https://www.danstour.com/bike-tours/?source={src}&language={lang}&currency={currency}"
    }
    
    // Example 2: localized landing page url with fallback
    {
      "url": "https://www.danstour.com/bike-tours/?source={src}&currency={currency}",
      "localized_url": {
        "localized_texts": [{
              "language_code": "de",
              "text": "https://www.danstour.com.de/bike-tours/?source={src}&currency={currency}"
        }, {
              "language_code": "es-MX",
              "text": "https://mx.danstour.com/bike-tours/?source={src}&currency={currency}"
        }, {
              "language_code": "zh-HK",
              "text": "https://hk.danstour.com.es/bike-tours/?source={src}&currency={currency}"
        }]
      }
    }
    
    

    运营商

    Proto

    message Operator {
      // Operator name.
      // Recommended to not exceed length of 50 in any language. Max length: 100.
      // Required.
    
      LocalizedTextSet name = 1;
      // Operator business name as it is registered in Google Business Profile and
      // appearing on Google Maps.
      // Recommended to not exceed length of 50 in any language.
      // Max length: 100.
      // Required.
      LocalizedTextSet google_business_profile_name = 4;
    
      // Operator phone number. Prefer full international phone number format.
      // Max length: 64.
      // Optional.
      string phone_number = 2;
    
      // List of operator locations.
      // Max number of locations: 1.
      // Optional.
      repeated Location locations = 3;
    }
    

    实现说明

    类型 字段 备注
    LocalizedTextSet 名称 [已弃用] 可选,建议的长度:50 个字符,长度上限为 100 个字符。
    此商品的卖家品牌名称。OTA 应将此品牌设置为 OTA 品牌。 此字段现已弃用,取而代之的是产品下的 brand_name
    LocalizedTextSet google_business_profile_name 必需,长度上限为 100 个字符。
    在 Google 商家资料中注册并在 Google 地图上显示的运营商商家名称。必须填写此字段才能加入运营商预订模块。
    字符串 phone_number 可选,长度上限:64 个字符。
    运营商电话号码。首选完整的国际电话号码格式。
    重复的
    位置
    位置 可选,最多数量:1。
    运营商的公司地址。 如果使用地址字符串,请将商家名称添加为地址字符串的一部分,例如“”。运营商商家必须能在 Google 地图上找到,才能触发运营商预订模块;如果无法在 Google 地图中找到该运营商,该运营商应注册 Google 商家资料。

    示例

    // Example 1: Sending operator information for operator booking module:
    operator: {
      "google_business_profile_name": {
        "localized_texts": [{
          "language_code": "en",
          "text": "Dans Bikes"}] 
      },
      "locations": [{
        "location": { //Operator business address
         "address": "Dans Bikes, 123 NYC st…"
      }}]
    }
    

    语言定义

    Proto

    message Language {
      // A BCP 47 compliant language code such as "en" or "de-CH".
      string code = 1;
    }
    

    实现说明

    类型 字段 备注
    字符串 验证码 符合 BCP-47 的语言代码,例如“en”或“de-CH”。

    示例

    {
        "code": "de-CH"
    }
    

    PriceOption

    Proto

    message PriceOption {
      // Unique ID within the price set.
      // Max length: 255.
      // Required.
      string id = 1;
    
      // Short description of the price option, e.g. "Adult weekday".
      // Max length: 150.
      // Required.
      string title = 2;
    
      // Price value, must match the final price on the checkout page, including all
      // taxes and charges, see price policy. Currency will be converted to the user
      // currency on rendering.
      // Required when is_free is false.
      google.type.Money price = 3;
    
      // Admission or ticket is free. Must be set to true for zero-price options.
      // Optional, default is false.
      bool is_free = 4;
    
      // List of geographical regions this price is applicable to. If empty,
      // applicable to all locations.
      // Optional.
      repeated GeoCriterion geo_criteria = 5;
    
      // Break down of fees and taxes included in the price above.
      // Optional.
      PriceFeesAndTaxes fees_and_taxes = 6;
    }
    

    实现说明

    类型 字段 备注
    字符串 id 必需,长度上限为 255 个字符。
    :价格集中的唯一 ID。
    字符串 title 必填,长度上限为 150 个字符。
    价格选项的简短说明,例如“成人工作日”。
    google.type.Money 价格 is_free 为 false 时,必需提供此属性。
    价格值必须与结账页上的最终价格一致(包括所有税费和费用),请参阅价格政策。呈现时,币种将换算为用户使用的币种。
    bool is_free 可选,默认值为 false。
    门票或门票免费。对于零价格选项,必须设置为 true。
    重复
    GeoCriterion
    geo_criteria 可选。
    此价格适用的地理区域列表。如果为空,则适用于所有营业地点。
    重复
    PriceFeesAndTaxes
    fees_and_taxes 可选。
    以上价格所含费用和税费的明细。

    示例

    {
        "id": "option-1-adult",
        "title": "Adult (14+)",
        "price": {
            "currency_code": "EUR",
            "units": 20
        },
        "fees_and_taxes": {
            "per_ticket_fee": {
                "currency_code": "EUR",
                "units": 1
            },
            "per_ticket_tax": {
                "currency_code": "EUR",
                "units": 1
            }
        }
    }
    

    GeoCriterion

    Proto

    message GeoCriterion {
      // 2-letter country code as defined in ISO 3166-1.
      // Required.
      string country_code = 1;
    
      // If true, criterion is negative (the country code is excluded).
      bool is_negative = 2;
    }
    

    实现说明

    类型 字段 备注
    字符串 country_code 必需。
    ISO 3166-1 中定义的由两个字母组成的国家/地区代码。
    bool is_negative 可选。
    如果为 true,则条件为负数(国家/地区代码除外)。

    示例

    {
        "country_code": "US",
        "is_negative": "true"
    }
    

    PriceFeesAndTaxes

    Proto

    message PriceFeesAndTaxes {
      // Booking fees included in the final product price for a single ticket.
      // Optional.
      google.type.Money per_ticket_fee = 1;
    
      // State taxes included in the final product price for a single ticket.
      // Optional.
      google.type.Money per_ticket_tax = 2;
    }
    

    实现说明

    类型 字段 备注
    google.type.Money per_ticket_fee 可选。
    预订费包含在单张门票的最终商品价格中。
    google.type.Money per_ticket_tax 可选。
    单张门票的最终商品价格中应包含相应税费。

    示例

    {
        "per_ticket_fee": {
            "currency_code": "EUR",
            "units": 1
        },
        "per_ticket_tax": {
            "currency_code": "EUR",
            "units": 1
        }
    }
    

    位置

    Proto

    message Location {
      // At least one of (location, description) must be set, and we highly
      // recommend populating location wherever possible.
      //
      // To emphasize, both fields can be populated together, e.g. you can set
      // Central Park New York for the location and "In front of the 72 Street
      // Station" for the description.
      GeoLocation location = 1;
    
      // Additional description in human-readable form, e.g.
      //     "On the left side of the fountain on the Palace square".
      // At least one of (location, description) must be set.
      // Recommended to not exceed length of 1000 in any language. Max length: 2000.
      LocalizedTextSet description = 2;
    }
    

    实现说明

    类型 字段 备注
    GeoLocation 位置 可选,必须至少提供位置或说明中的一项。
    地理位置。
    LocalizedTextSet 说明 可选,建议长度:1000 个字符,长度上限为 2000 个字符,必须至少存在一个位置或说明部分。
    其他说明,采用人类可读懂的格式,例如“位于宫殿广场喷泉的左侧”。

    示例

    {
        "location": {
            "place_id": "ChIJ3S-JXmauEmsRUcIaWtf4MzE"
        }
    }
    

    GeoLocation

    如需详细了解每种提示类型,请参阅 使用指南。

    Proto

    message GeoLocation {
      // Required (exactly one variant from oneof).
      // See
      // https://developers.google.com/travel/things-to-do/guides/partner-integration/location
      // for detailed guidelines.
      oneof value {
        // Place ID as defined by the Places API:
        //   https://developers.google.com/places/web-service/place-id
        //
        // Uniquely identifies a POI on Google.
        // It can be sourced using the Places API endpoints, for instance Place
        // Search or Place Autocomplete, or manually using the Find Location Matches
        // tool in Things to Do Center.
        string place_id = 1;
    
        // Legacy single-line address.
        // Components are expected to be comma-separated, with the first component
        // being the place name as it is displayed on Google.
        // For higher matching accuracy, use the street address shown on Google for
        // the place.
        //
        // Examples:
        // - "Colosseum, Piazza del Colosseo, 1, 00184 Roma RM, Italy"
        // - "The British Museum, Great Russell St, London WC1B 3DG, United Kingdom"
        //
        // Max length: 200.
        //
        // Deprecated: use `place_info` for higher matching accuracy, which provides
        // a separate field for the place name and supports both structured and
        // unstructured address formats.
        string address = 3 [deprecated = true];
    
        // Structured place information.
        PlaceInfo place_info = 4;
    
        // Business Profile ID, as found in the Google Business Profile settings
        // page. Use this field when sourcing locations directly from the place
        // owner, who has access to the Google Business Profile for the place and
        // can provide such ID.
        uint64 business_profile_id = 5;
    
        // Geographic coordinates.
        // This field can only be used to determine a city or geographical region,
        // as it is too ambiguous to identify a specific place or businesses.
        // Use `place_info` instead to match to a specific place by name and
        // coordinates.
        google.type.LatLng lat_lng = 2;
      }
    }
    

    实现说明

    类型 字段 备注
    字符串 place_id 可选,只能存在 place_idaddressplace_infobusiness_profile_idlat_lng 中的一个。
    Places API 定义的 PlaceId。 在 Google 上唯一标识地图注点。可以使用 Places API 端点(例如地点搜索或地点自动补全)获取来源,也可以使用 Things to Do Center 中的“查找营业地点匹配”工具手动获取。
    字符串 地址 可选,只能存在 place_idaddressplace_infobusiness_profile_idlat_lng 中的一个。
    已弃用。旧单行地址。长度上限:200。 各组成部分应以英文逗号分隔,其中第一个组成部分应是 Google 上显示的地点名称。为了提高匹配准确性,请使用 Google 上显示的相应地点的街道地址。
    PlaceInfo place_info 可选,只能存在 place_idaddressplace_infobusiness_profile_idlat_lng 中的一个。
    结构化地点信息。
    uint64 business_profile_id 可选,只能存在 place_idaddressplace_infobusiness_profile_idlat_lng 中的一个。
    商家资料 ID,可在 Google 商家资料设置页面中找到。当直接从地点所有者获取营业地点时,请使用此字段,地点所有者有权访问该地点的 Google 商家资料,并且可以提供此类 ID。
    google.type.LatLng lat_lng 可选,只能存在 place_idaddressplace_infobusiness_profile_idlat_lng 中的一个。
    地理坐标。此字段只能用于确定城市或地理区域,因为其含义不明确,无法标识具体的地点或商家。请改用 place_info 来按名称和坐标匹配具体地点。

    示例

    "place_id": "ChIJ3S-JXmauEmsRUcIaWtf4MzE"
    
    "address": "Eiffel Tower, 5 Av. Anatole France, 75007 Paris, France"
    
    "place_info": {
      "name": "Eiffel Tower",
      "unstructured_address": "5 Av. Anatole France, 75007 Paris, France"
    }
    
    "business_profile_id": 11458995034835395294
    
    "lat_lng": {
      "latitude": -25.3511774,
      "longitude": 131.0326859
    }
    

    PlaceInfo

    Proto

    message PlaceInfo {
      // Place or business name.
      // For higher matching accuracy, this should be the same as the name shown on
      // Google for the place. For places with a claimed Google Business Profile,
      // this should be the same as the business name configured in the business
      // profile.
      // Max length: 300.
      // Required.
      string name = 1;
    
      // Phone number, including the international prefix.
      // For higher matching accuracy, this should be the same as the phone number
      // shown on Google for the place.
      // It can include commonly used separator characters.
      // Examples: "+1 212-363-3200", "+91 562 222 7261".
      // Max length: 30.
      // Optional.
      string phone_number = 2;
    
      // Website URL shown on Google for the place, preferably the URL linked from
      // the business listing in Google Maps or Search for the place.
      // Max length: 1000.
      // Optional.
      string website_url = 3;
    
      // Geographic coordinates of the place.
      // If left empty, Google will infer the coordinates from the address.
      // Optional, but either `coordinates` or one of `address_type` must be
      // provided.
      google.type.LatLng coordinates = 4;
    
      // Optional, but either `coordinates` or one of `address_type` must be
      // provided.
      oneof address_type {
        // Structured address.
        // Prefer this format whenever possible for higher matching accuracy.
        StructuredAddress structured_address = 5;
    
        // Unstructured address.
        // It should not include the place or business name, which must instead be
        // provided separately using the `name` field.
        //
        // Examples:
        // - `name`: "Colosseum", `unstructured_address`: "Piazza del Colosseo, 1,
        // 00184 Roma RM, Italy".
        // - `name`: "The British Museum", `unstructured_address`: "Great Russell
        // St, London WC1B 3DG, United Kingdom".
        //
        // Max length: 400.
        string unstructured_address = 6;
      }
    }
    

    实现说明

    类型 字段 备注
    字符串 name 必填。长度上限:300 个字符。地点或商家名称。为了提高匹配准确性,此名称应与 Google 上显示的地点名称相同。对于已声明 Google 商家资料所有权的地点,此值应与商家资料中配置的商家名称相同。
    字符串 phone_number 可选。长度上限:30 个字符。电话号码,包括国际前缀。为了获得更高的匹配准确度,该号码应与 Google 上显示的该地点的电话号码相同。可以包含常用的分隔符。示例:“+1 212-363-3200”“+91 562 222 7261”。
    字符串 website_url 可选。长度上限:1000。在 Google 上显示该地点的网站网址,最好是 Google 地图或 Google 搜索上相应地点的商家信息所链接的网址。
    google.type.LatLng 坐标 可选。地点的地理坐标。如果留空,Google 将根据该地址推断坐标。可选,但必须提供 coordinates 或者 structured_addressunstructured_address 中的任意一个。
    StructuredAddress structured_address 可选,structured_addressunstructured_address 中只能存在一个,不能同时存在。
    字符串 unstructured_address 可选,structured_addressunstructured_address 中只能存在一个,不能同时存在。

    示例

    "place_info": {
      "name": "Colosseum",
      "phone_number": "+39 063 99 67 700",
      "website_url": "https://colosseo.it/",
      "coordinates": {
        "latitude": 41.8902102,
        "longitude": 12.4922309
      },
      "structured_address" {
        "street_address": "Piazza del Colosseo, 1",
        "locality": "Roma",
        "administrative_area": "RM",
        "postal_code": "00184",
        "country_code": "IT"
      }
    }
    
    "place_info": {
      "name": "Eiffel Tower",
      "unstructured_address": "5 Av. Anatole France, 75007 Paris, France"
    }
    
    "place_info": {
      "name": "Mutitjulu Waterhole",
      "coordinates": {
        "latitude": -25.3511774,
        "longitude": 131.0326859
      }
    }
    

    StructuredAddress

    Proto

    message StructuredAddress {
      // Street address, including house number and any other component that cannot
      // be provided using the more specific fields defined below. It should not
      // include the place or business name, which must instead be provided
      // separately using the `name` field under `PlaceInfo`. It should also not
      // include postal code, locality or country as those should be provided using
      // the corresponding fields below.
      //
      // Examples:
      // - "Piazza del Colosseo, 1" for the Colosseum.
      // - "Great Russell St" for The British Museum.
      // - "Champ de Mars, 5 Av. Anatole France" for the Eiffel Tower.
      //
      // Max length: 200.
      // Required.
      string street_address = 1;
    
      // Locality, generally referring to the city/town portion of an address.
      // Examples: "New York", "Rome", "London", "Tokyo".
      // In regions of the world where localities are not well defined or do not fit
      // into this structure well, leave empty.
      // Max length: 80.
      // Optional.
      string locality = 2;
    
      // Highest administrative subdivision used for postal addresses of the
      // specific country or region. This can be a state, a region, a province, an
      // oblast, a prefecture, etc.
      // It can be an abbreviation or a full name, depending on how the region is
      // usually represented in the postal addresses of the specific country. For
      // example, "CA" or "California" for US addresses, "RM" for Rome province in
      // Italy.
      // Many countries don't use an administrative area in postal addresses. For
      // instance, this field should not be used for addresses in Switzerland.
      // Max length: 80.
      // Optional.
      string administrative_area = 3;
    
      // The postal code or zip code.
      // Examples: "75007", "WC1B 3DG", etc.
      // Required if the country supports postal codes, otherwise it should be left
      // empty.
      // Max length: 30.
      // Optional.
      string postal_code = 4;
    
      // Country code, as defined by Unicode's "CLDR", itself based on the ISO 3166
      // alpha-2 standard. See
      // https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html.
      //
      // Examples: "US" for the United States, "FR" for France, "GB" for the United
      // Kingdom, etc.
      // Max length: 2.
      // Required.
      string country_code = 5;
    }
    

    实现说明

    类型 字段 备注
    字符串 street_address 必填。长度上限:200。街道地址,包括门牌号以及使用下面定义的更具体的字段无法提供的任何其他组成部分。其中不应包含地点或商家名称,而必须使用 PlaceInfo 下的 name 字段单独提供。它还不应包含邮政编码、市行政区或国家/地区,因为应使用以下相应字段提供这些信息。
    字符串 locality 可选。长度上限:80 个字符。市行政区,通常是指地址中的城市或城镇部分。对于没有明确定义市行政区或者其无法很好地对应这个结构的地区,请将此字段留空。
    字符串 administrative_area 可选。长度上限:80 个字符。指定国家或地区的邮政地址使用的最高行政区划。它可以是州、地区、省、州或县等。它可以是缩写或全名,具体取决于具体地区在特定国家/地区的邮政地址中通常的显示方式。
    字符串 postal_code 可选。长度上限:30 个字符。邮政编码。如果国家/地区支持邮政编码,则为必需,否则应留空。
    字符串 country_code 可选。长度上限:2 个。国家/地区代码,由 Unicode“CLDR”定义,自身基于 ISO 3166 alpha-2 标准。请参阅 Unicode 文档。

    示例

    {
      "structured_address" {
        "street_address": "Piazza del Colosseo, 1",
        "locality": "Roma",
        "administrative_area": "RM",
        "postal_code": "00184",
        "country_code": "IT"
      }
    }
    

    LocalizedTextSet

    Proto

    // Values of the localized fields.
    message LocalizedTextSet {
      // Per-locale LocalizedText values.
      repeated google.type.LocalizedText localized_texts = 1;
    }
    

    实现说明

    类型 字段 备注
    重复
    google.type.LocalizedText
    localized_texts 按语言区域进行的本地化文本值。

    示例

    {
        "language_code": "en",
        "text": "Sunrise tour"
    }
    

    CancellationPolicy

    Proto

    // Cancellation policy for a product.
    message CancellationPolicy {
      // Defines a single refund condition. Multiple refund conditions could be
      // used together to describe "refund steps" as various durations before the
      // service start time.
      message RefundCondition {
        // Duration in seconds before the start time, until when the customer can
        // receive a refund for part of the service's cost specified in
        // `refund_percent`.
        // When unset or set to 0 the service can be cancelled at any time.
        // Optional.
        uint32 min_duration_before_start_time_sec = 1;
    
        // The percent that can be refunded, as long as the service booking is
        // cancelled at least `min_duration_before_start_time` before the service
        // start time, in the range of [0, 100].
        // When unset or set to 0, the service is not refundable. When set to 100
        // this service is fully refundable.
        // Optional.
        uint32 refund_percent = 2;
    
        // A flat fee deducted on refund. Could be used separately, or in
        // combination with the refund_percent above. In the latter case, refund
        // percent applies first, then the fee is deducted.
        // Optional.
        google.type.Money refund_fee = 3;
      }
      // Zero or more refund conditions applicable to the policy.
      // Max number of refund conditions: 10.
      repeated RefundCondition refund_conditions = 1;
    }
    

    实现说明

    指定单个退款条件。您可以同时使用多个退款条件来将“退款步骤”描述为服务开始时间之前的不同时间段。

    类型 字段 备注
    RefundCondition refund_conditions 可选,退款条件数量上限:10 个。

    RefundCondition

    类型 字段 备注
    uint32 min_duration_before_start_time_sec 可选。
    开始时间之前的时长(以秒为单位),直到客户能够收到 refund_percent 中指定的部分服务费用的退款为止。如果此政策未设置或设为 0,用户可以随时取消该服务。
    uint32 refund_percent 可选。
    只要在服务开始时间前至少 min_duration_before_start_time取消服务预订,就可以退款的百分比,范围为 [0, 100]。如果未设置或设为 0,则该服务不可退款。将此值设为 100 时,表示此服务可全额退款。
    google.type.Money refund_fee 可选。
    退款时会扣除固定费用。可以单独使用,也可以与上述 refund_percent 结合使用。对于后一种情况,系统会先应用退款百分比,然后再扣除相应费用。

    示例

    "refund_conditions": [
      {
        "min_duration_before_start_time_sec": 86400,
        "refund_percent": 100
      }]