產品動態饋給

產品動態饋給是向 Google 提供待辦事物產品清單的主要方式,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_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 時為必填。
以 0 為基點。您不必依序轉移區塊。只有在上傳完整的資料分割區後,系統才會開始處理。
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
}

產品

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 個。
評分 rating 建議使用。
強烈建議提供評分,因為顯示評分的產品點閱率會更高。
repeated
Media
related_media 建議上限:30 個媒體檔案
強烈建議提供多張圖片。如需圖片相關指南,請參閱圖片規範
布林值 use_media_order 選用
提示 Google,在選擇要顯示的圖片時,應考量動態消息中相關媒體的顯示順序。
重複
選項
選項 必填,選項數量上限:20
每項產品至少須有一個產品選項。
運算子 運算子 選用。
列舉 已淘汰
inventory_type
選用。
INVENTORY_TYPE_OFFICIAL 只能在連結至景點官方票券網站的產品中設定。只有在通過資格審查後,才能設定這個值。
這個欄位已淘汰,並由新的重複欄位 inventory_types 取代。
repeated inventory_types 選用。
這項產品所屬的專屬廣告空間類型重複清單。
INVENTORY_TYPE_OFFICIAL 只能在連結至景點官方票券網站的產品中設定。只有在通過資格審查後,才能設定這個值。
INVENTORY_TYPE_OPERATOR_DIRECT 只能在連結至旅遊業者網站的產品中設定。 只有在通過資格審查後,才能設定這個值。
列舉 confirmation_type 選用。
FulfillmentType fulfillment_type 建議使用。如果已設為 true,fulfillment_rype 中至少必須有一個欄位設為 true。
設定取得文件以確認預訂的方式。你可以選擇多種服務組合,例如行動裝置 + 沖印服務,或是在家沖印 + 親自取件。
LocalizedTextSet brand_name 長度上限為 100 個字元。
產品應顯示的品牌名稱,取代現已淘汰的 `operator/name`。只能設定這兩個值中的一個。

範例

{
  "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?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?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 建議使用。
repeated
類別
option_categories 選用,類別數量上限:100。
這個選項的相關類別。如需其他建議值,請參閱「產品類別」說明文件。
重複的
RelatedLocation
related_location 建議值:地點數量上限為 100。
提供正確的相關地點清單非常重要,才能讓產品顯示在最相關的位置,但如果標記過多或提供不正確的資料,產品就會遭到移除。詳情請參閱地點和搜尋點指南。
bool base_ticket 選用。
用於指出產品選項是否為基本入場票。
repeated
PriceOption
price_options 必填,至少 1 個。
此選項的所有可能價格。 注意:系統僅支援成人價格。如果提供多個價格選項,系統會使用第一個通過地理位置限制檢查的價格。如果是團體票,則必須改用整個團體的全額價格。
uint32 duration_sec 選用。
適用情況下,以秒為單位的選項時間長度,例如導覽行程、船遊行程。這應反映體驗的持續時間 (而非有效時間)。
重複的
語言
語言 建議的語言數量上限: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?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:Feature 是包含項目。
  • TEXT_FEATURE_EXCLUSION:地圖項目是排除項目。
  • TEXT_FEATURE_HIGHLIGHT:Feature 是精選內容。
  • TEXT_FEATURE_MUST_KNOW:功能是「必知」項目。
  • TEXT_FEATURE_SAFETY_INFORMATION:功能代表安全措施的相關資訊。
  • LocalizedTextSet 必填,建議長度不超過 1000 個半形字元,長度上限:2000 個半形字元。
    支援的 HTML 格式標記:br、strong、em、i
    僅支援上述四個標記。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>"
                }
            ]
        }
    }
    

    Rating

    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 歸因 選用,建議長度: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;
    }
    
    

    實作注意事項

    定義選項和地點之間的關係。

    類型 欄位 附註
    位置 位置 必填。
    與選項相關的位置。可以是 POI (例如艾菲爾鐵塔)、街區 (例如 Old Town) 或地址 / 任意地圖點。
    列舉 relation_type 必填。
    指定地點的選項關係類型。可能的值:
  • RELATION_TYPE_RELATED_NO_ADMISSION:位置相關,但關係不允許入場,或入場與位置無關,例如位置是城市遊覽中標示的廣場。
  • RELATION_TYPE_ADMISSION_TICKET:關係可讓使用者進入這個相關地點。
  • RELATION_TYPE_SUPPLEMENTARY_ADDON:Relation 會宣告額外服務,不會將使用者帶入相關位置,例如停車罰單或臨時展覽。
  • 範例

    // 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;
    
      // 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;
    
      reserved 2, 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 URL 範本。

    範例

    // Example 1: single landing page URL.
    {
      "url": "https://www.danstour.com/bike-tours/?language={lang}&currency={currency}"
    }
    
    // Example 2: localized landing page url with fallback
    {
      "url": "https://www.danstour.com/bike-tours/?currency={currency}",
      "localized_url": {
        "localized_texts": [{
              "language_code": "de",
              "text": "https://www.danstour.com.de/bike-tours/?currency={currency}"
        }, {
              "language_code": "es-MX",
              "text": "https://mx.danstour.com/bike-tours/?currency={currency}"
        }, {
              "language_code": "zh-HK",
              "text": "https://hk.danstour.com.es/bike-tours/?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 name (已淘汰) 選用,建議長度:50,長度上限:100。
    這項產品的賣家品牌名稱。OTA 應將此設為 OTA 品牌。 這個欄位現已淘汰,並由產品下的 brand_name 取代
    LocalizedTextSet google_business_profile_name 必填,長度上限:100 個字元。
    業者名稱 (如已註冊於 Google 商家檔案並顯示在 Google 地圖上)。如要參與操作員預訂模組,必須填入這個欄位。
    字串 phone_number 選用,長度上限:64 個半形字元。
    作業員電話號碼。請使用完整的國際電話號碼格式。
    重複
    位置
    位置 選用,最多 1 個。
    營業人的營業地址。 如果使用地址字串,請將商家名稱納入地址字串。例如「商家名稱、街道地址」。如果操作員的業務無法在 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 定義的 2 個字母國家/地區代碼。
    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 上識別 POI 的唯一 ID。你可以使用 Places API 端點 (例如 Place Search 或 Place Autocomplete) 取得來源,也可以手動使用 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: 100.
      // 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;
      }
    }
    
    

    實作注意事項

    類型 欄位 附註
    字串 名稱 必填。長度上限: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 會從地址推斷座標。選填,但必須提供 coordinatesstructured_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.
      // Maximum repeatedness: 50
      repeated google.type.LocalizedText localized_texts = 1;
    }
    
    

    實作注意事項

    類型 欄位 附註
    repeated
    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
      }]