特定の料金の空き状況スロットを予約すると、ユーザーはサービス フィードで定義した URL を使用して予約ページにリダイレクトされます。以下に、使用可能な URL テンプレートの例を示します。
このテンプレートのパラメータは、フィードで指定された値を使用して動的に追加され、ユーザーが予約ページに移動する際に使用するリンクの作成に使用されます。
`https://reservation-provider.com/examplerestaurant/book?date={availability_slot_start_seconds}&num_guests={resources_party_size}`
URL テンプレートで使用可能な値
テンプレート パラメータ | 必須 / 省略可 | フィード | フィールド | 値の例 |
---|---|---|---|---|
availability_slot_availability_tag | 任意 | 稼働率 | availability_tag | タグ |
availability_slot_duration_seconds | 任意 | 稼働率 | duration_sec | 3600 |
availability_slot_start_seconds | 必須 | 稼働率 | start_sec | 4152695841 |
resources_party_size | 必須 | availability.resources | party_size | 2 |
resources_room_id | 任意 | availability.resources | room_id | bar_123 |
URL テンプレートの定義
サービス フィードで送信される URL テンプレートは次のとおりです。
Message Services {
// ..
UriTemplate uri_template;
// A template specifying how Google should generate URLs to external site.
message UriTemplate {
// The uri template must follow the RFC6570, see
// https://datatracker.ietf.org/doc/html/rfc6570.
// Supports Level 2 templates.
// e.g.
// http://example.com/book/{foo}?b={bar}
// * foo = 2
// * bar = abc
// https://example.com/book/2?b=abc
// These parameters will be resolved to their values specified in their
// respective entities.
// 1) {availability_slot_start_seconds} :: populated from start_sec field in
// availability feed
// 2) {resources_party_size} :: populated from party_size field in
// availability feed
// 3) {availability_slot_duration_seconds} :: populated from duration_sec
// field in availability feed
// 4) {resources_room_id} :: populated from room_id field in the
// resource section of the availability feed
// 5) {availability_slot_availability_tag} :: populated from availability_tag
// field of the availability feed
string uri_template = 1;
}
}